Red/Blue Cheatsheet | NORI ZAMURAI
  • Introduction
  • Pentesting Cheatsheets
    • Reconnaissance
      • Other method
      • Nmap
    • Enumeration
      • DNS (53)
      • SSH (22)
      • FTP (21)
      • SMTP (25)
      • WEB (80,443)
      • POP3 (110)
      • SMB (139,445)
      • MySQL (3306)
    • Privilege Escalation
      • Linux
      • Windows
    • Shell
      • Reverse Shell
      • Upgrade Shell
      • Meterpreter
    • Password Crack
      • Hash Analysis
      • Bruteforce
    • Exploit
      • Search Exploit
      • Attacks
    • Paylaod
      • Msfvenom
    • File Transfer
    • Port Forwarding
    • Service Login and Interaction
  • Useful Commands
    • Linux Commands
    • Powershell
    • CMD
    • Python
    • Editor: Vi & Tmux
    • Metasploit
    • Powershell Empire
Powered by GitBook
On this page

Was this helpful?

  1. Pentesting Cheatsheets
  2. Shell

Upgrade Shell

Shell Spawning

Python

python -c 'import pty;pty.spawn("/bin/bash")'

Echo

echo os.system('/bin/bash')

/bin/sh

/bin/sh -i

Perl

perl —e 'exec "/bin/sh";'

perl: exec "/bin/sh";

Ruby

ruby: exec "/bin/sh"

Lua

lua: os.execute('/bin/sh')

Exec from within IRB

exec "/bin/sh"

From within vi

:!bash

:set shell=/bin/bash:shell

From within Nmap

!sh

PreviousReverse ShellNextMeterpreter

Last updated 5 years ago

Was this helpful?

Spawning a TTY ShellNetSec
Logo