Spawning a TTY Shell
Spawning TTY Shells
/bin/sh -i
/usr/bin/script -qc /bin/bash /dev/null
echo os.system('/bin/bash')
# Python
python3 -c 'import pty;pty.spawn.("/bin/bash");'
# Perl
perl —e 'exec "/bin/sh";'
perl: exec "/bin/sh"; # it should be run from a script
# Ruby
ruby: exec "/bin/sh" # it should be run from a script
# Lua
lua: os.execute('/bin/sh') # it should be run from a script
# AWK
awk 'BEGIN {system("/bin/sh")}'
# Find
find / -name nameoffile -exec /bin/awk 'BEGIN {system("/bin/sh")}' \\;
find . -exec /bin/sh \\; -quit
# Vim
vim -c ':!/bin/sh'
# Vim Escape
vim
:set shell=/bin/sh
:shellUpgrading TTY Shells
Last updated