githubEdit

Cheatsheet

Resource: https://wiki.zacheller.dev/pentest/privilege-escalation/spawning-a-tty-shell

Python 1

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

Python 2

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

Sh Interactive

/bin/sh -i

Perl 1

perl β€”e 'exec "/bin/sh";'

Perl 2

perl: exec "/bin/sh";

Ruby

ruby: exec "/bin/sh"

Lua

(From within IRB)

(From within vi)

(From within vi)

(From within nmap)

From netsec.ws

Last updated