Reverse Shell Cheat Sheet

Too lazy to even find a reverse shell on google ?
Way too much lazy to enter your own ip address ?
Luckilly we got it :

IP address
check URL encode

If you want to fully understand each command, here is a handy website :


Some versions of bash can send you a reverse shell:

UDP version:


Here’s a shorter, feature-free version of the perl-reverse-shell:

Windows only:


This was tested under Linux / Python 2.7:




This code assumes that the TCP connection uses file descriptor 3. This worked on my test system. If it doesn’t work, try 4, 5, 6…



Netcat is rarely present on production systems and even if it is there are several version of netcat, some of which don’t support the -e option. You can also check if nc.traditional is present on your target, as it always has the -e option. nc.openbsd can sometimes also have useful options to try.

if you have the wrong version of netcat installed, Jeff Price points out here that you might still be able to get your reverse shell back using either mkfifo:

Or mknod:

FREEBSD reverse shell

Those can become handy if you are trying to do a reverse shell on freebsd.


Upgrading from tty reverse shell to full shell

This will allow you to make your reverse shell a "true" shell. That mean you will be able to use CTRL+C, CTRL+[any letter] etc, arrows to navigate through your shell history, and autocomplete with tabulation. Well, basicaly, something a lil' better then the casual shitty nc reverse shell that you close by error doing a CTRL+C to kill a program.

Here are a few more things you can do to improve even more your reverse shell. Those could be particuliary useful if you are facing the error "Unknown terminal type" when launching programs such as nano.