Reverse Shells

Web Shells

One Line Reverse Shells with One-Lin3r

How to Use One-Lin3r to Quickly Generate Reverse Shells, Privesc Commands & More

Spawning a TTY Shell

Many of these will also allow you to escape jail shells.

python -c 'import pty; pty.spawn("/bin/sh")'
python -c 'import pty; pty.spawn("/bin/bash")'
python3 -c 'import pty; pty.spawn("/bin/sh")'
#CTR+Z to background proccess
stty raw -echo # Get autocompletion 
#fg + enter to bring proccess to frondground
export TERM=screen

Escaping Restricted Shell (GTFOBins)


/bin/sh -i


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

From within Nmap


From within Vi

:set shell=/bin/bash:shell