Domain 1Recon & ReportingCORE

Cheat Sheet Summary

Complete cheat sheet for OSCP Information Gathering chapter. Quick reference for all essential commands, tool selection matrix, common pitfalls, Nmap script categories, port reference tables, SecLists locations, decision trees, emergency scan commands, one-page checklist, and memory aids for exam day.

Domain: Domain 1: Reconnaissance & Reporting•Updated: 2026-09-01
#cheat-sheet#quick-reference#commands#summary

Cheat Sheet Summary

Attack Chain Position

graph LR
    A[Reconnaissance] --> B[This Cheat Sheet]
    B --> C[Passive Commands]
    B --> D[Active Commands]
    B --> E[Vuln Analysis]
    B --> F[Exploitation]
    
    style B fill:#f9d56e,stroke:#333,stroke-width:3px

Purpose: This cheat sheet provides quick-reference commands, tables, and decision aids for the Information Gathering phase. Keep this handy during OSCP exam preparation and use it as a quick lookup during the exam.


Table of Contents

  1. Quick Reference - All Essential Commands
  2. Tool Selection Matrix
  3. Common Pitfalls and Solutions
  4. OSCP Exam Tips - Top 10 Rules
  5. Nmap Script Categories Reference
  6. Common Port Reference Table
  7. SecLists Wordlist Locations
  8. Quick Decision Trees
  9. Emergency Quick Scan Commands
  10. One-Page Recon Checklist
  11. Memory Aids and Mnemonics

Quick Reference - All Essential Commands

Passive Reconnaissance Commands

WHOIS and DNS

# WHOIS lookup
whois target.com
whois -h whois.radb.net -- '-i origin ASXXXX'

# DNS record queries
dig A target.com
dig AAAA target.com
dig MX target.com
dig NS target.com
dig TXT target.com
dig SOA target.com
dig CNAME target.com
dig SRV target.com

# DNS zone transfer attempt
dig AXFR target.com @ns1.target.com
dig AXFR target.com @ns2.target.com

# Reverse DNS lookup
dig -x 10.10.10.10
host 10.10.10.10
nslookup 10.10.10.10

# DNS brute force
dnsenum target.com
fierce -dns target.com

Subdomain Discovery

# theHarvester
theHarvester -d target.com -b bing,google,virustotal,crtsh -l 500 -f results -n
theHarvester -d target.com --full -l 1000 -f comprehensive -n -t

# Amass (passive)
amass enum -passive -d target.com -o amass_passive.txt
amass enum -passive -d target.com -src bing,google,virustotal,crtsh

# Amass (active + passive)
amass enum -d target.com -o amass_full.txt
amass enum -d target.com -dir /path/to/subdomains.txt -o amass_custom.txt

# Subfinder
subfinder -d target.com -o subfinder_results.txt
subfinder -d target.com -t 50 -o subfinder_results.txt

# Gobuster DNS
gobuster dns -d target.com -w /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-5000.txt
gobuster dns -d target.com -w wordlist.txt -o gobuster_dns.txt

# Assetfinder
assetfinder target.com > assetfinder_results.txt

# Findsubdomains
findsubdomains.org target.com

Certificate Transparency

# crt.sh query
curl -s "https://crt.sh/?q=target.com&output=json&include_subdomains=1" | \
  grep -oP '"name_value"\s*:\s*"\K[^"]+' | \
  sed 's/\*\.//' | sort -u

# crt.sh with jq
curl -s "https://crt.sh/?q=target.com&output=json" | \
  jq -r '.[].name_value' | sed 's/\*\.//' | sort -u

Search Engine Dorking

# Google dorks (use in browser)
site:target.com
site:target.com filetype:pdf
site:target.com filetype:doc
site:target.com filetype:docx
site:target.com filetype:xls
site:target.com filetype:xlsx
site:target.com filetype:csv
site:target.com filetype:sql
site:target.com filetype:log
site:target.com filetype:bak
site:target.com filetype:zip
site:target.com filetype:tar.gz
site:target.com inurl:admin
site:target.com inurl:login
site:target.com inurl:phpmyadmin
site:target.com inurl:wp-admin
site:target.com inurl:config
site:target.com inurl:backup
site:target.com intitle:"index of"
site:target.com ext:php
site:target.com ext:asp
site:target.com ext:jsp

# Google Hacking Database
# https://www.exploit-db.com/google-hacking-database

Email Harvesting

# theHarvester emails
theHarvester -d target.com -b hunter,linkedin,google,bing -l 500 -f emails

# Email format detection
# Look for patterns: firstname.lastname, firstinitiallastname, firstname, etc.

Active Reconnaissance Commands

Host Discovery

# Nmap ping sweep
nmap -sn 10.10.10.0/24 -oA host_discovery
nmap -sn 10.10.10.0/16 -oA host_discovery_large

# Nmap with multiple techniques
nmap -sn -PS21,22,23,25,80,443 -PU53,161,162 10.10.10.0/24 -oA host_discovery

# fping
fping -a -g 10.10.10.0/24 > live_hosts.txt
fping -g 10.10.10.0/24 -a -f > live_hosts.txt

# netdiscover (ARP scan, LAN only)
netdiscover -r 10.10.10.0/24
netdiscover -r 10.10.10.0/24 -P

Port Scanning

# Quick scan (top 100 ports)
nmap -sV -p 1-1000 10.10.10.10 -oA quick_scan

# Top 1000 ports with service version
nmap -sV -p 1-1000 10.10.10.10 -oA top1000_scan

# All TCP ports
nmap -sV -p- 10.10.10.10 -oA full_tcp_scan

# All TCP ports with scripts and OS detection
nmap -sV -sC -O -p- 10.10.10.10 -oA comprehensive_scan

# Aggressive scan
nmap -A -p- 10.10.10.10 -oA aggressive_scan

# UDP scan (top 20 ports)
nmap -sU -p 53,67,68,69,123,161,162,389,500,514,520,521,1434,1900,4500,5060,5353,6901,8545,19000 10.10.10.10 -oA udp_scan

# UDP scan (top 100)
nmap -sU --top-ports 100 10.10.10.10 -oA udp_top100

# SYN scan (stealth)
nmap -sS -p- 10.10.10.10 -oA syn_scan

# Connect scan
nmap -sT -p- 10.10.10.10 -oA connect_scan

# FIN scan (firewall evasion)
nmap -sF -p- 10.10.10.10 -oA fin_scan

# NULL scan (firewall evasion)
nmap -sN -p- 10.10.10.10 -oA null_scan

# Xmas scan (firewall evasion)
nmap -sX -p- 10.10.10.10 -oA xmas_scan

# Scan multiple hosts
nmap -sV -p- 10.10.10.10-20 -oA multi_host_scan

# Scan from file
nmap -sV -p- -iL targets.txt -oA file_scan

# Timings
nmap -T0 -p- 10.10.10.10 -oA paranoid      # Slowest, stealthiest
nmap -T1 -p- 10.10.10.10 -oA sneaky        # Very slow
nmap -T2 -p- 10.10.10.10 -oA polite        # Slow
nmap -T3 -p- 10.10.10.10 -oA normal        # Default
nmap -T4 -p- 10.10.10.10 -oA aggressive    # Fast
nmap -T5 -p- 10.10.10.10 -oA insane        # Fastest

Service Enumeration

# SMB enumeration
enum4linux -a 10.10.10.10
enum4linux-ng -a 10.10.10.10
nmap --script smb-enum-shares,smb-enum-users,smb-enum-groups -p 445 10.10.10.10

# SMB client
smbclient -L \\\\10.10.10.10\\
smbclient \\\\10.10.10.10\\SHARENAME
smbclient \\\\10.10.10.10\\SHARENAME -U username%password

# SNMP enumeration
snmpwalk -v2c -c public 10.10.10.10
snmpwalk -v2c -c private 10.10.10.10
snmpwalk -v1 -c public 10.10.10.10
onesixtyone -c /usr/share/doc/onesixtyone/dict.txt -i targets.txt

# FTP enumeration
ftp 10.10.10.10
# Try anonymous login
# anonymous / anonymous@

# SSH enumeration
ssh -v user@10.10.10.10
nmap --script ssh2-enum-algos,ssh-hostkey,ssh-auth-methods -p 22 10.10.10.10

# DNS enumeration
dig AXFR target.com @10.10.10.10
dnsrecon -d target.com -t axfr -n 10.10.10.10
dnsrecon -d target.com -t srv -n 10.10.10.10
dnsrecon -d target.com -t brute -D subdomains.txt -n 10.10.10.10

# LDAP enumeration
ldapsearch -x -h 10.10.10.10 -s base
ldapsearch -x -h 10.10.10.10 -s sub -b "dc=target,dc=com"
nmap --script ldap* -p 389 10.10.10.10

# MySQL enumeration
mysql -h 10.10.10.10 -u root -p
mysql -h 10.10.10.10 -u root (try no password)
nmap --script mysql* -p 3306 10.10.10.10

# PostgreSQL enumeration
psql -h 10.10.10.10 -U postgres
nmap --script postgresql* -p 5432 10.10.10.10

# Redis enumeration
redis-cli -h 10.10.10.10
redis-cli -h 10.10.10.10 INFO

# MongoDB enumeration
mongo --host 10.10.10.10
nmap --script mongodb* -p 27017 10.10.10.10

Web Enumeration

# Directory brute forcing
gobuster dir -u http://10.10.10.10 -w /usr/share/wordlists/dirb/common.txt -o gobuster_results
gobuster dir -u http://10.10.10.10 -w /usr/share/seclists/Discovery/Web-Content/common.txt -o gobuster_results
gobuster dir -u http://10.10.10.10 -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-small.txt -o gobuster_results
gobuster dir -u http://10.10.10.10 -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -o gobuster_results

# Gobuster with extensions
gobuster dir -u http://10.10.10.10 -w common.txt -x php,html,txt,backup,bak,zip,tar.gz -o gobuster_ext

# Gobuster with threads and status codes
gobuster dir -u http://10.10.10.10 -w common.txt -t 50 -s 200,204,301,302,307,403,500 -o gobuster_codes

# ffuf
ffuf -u http://10.10.10.10/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -o ffuf_results
ffuf -u http://10.10.10.10/FUZZ -w common.txt -e .php,.html,.txt -o ffuf_ext

# dirb
dirb http://10.10.10.10 /usr/share/wordlists/dirb/common.txt -o dirb_results

# Nikto
nikto -h http://10.10.10.10
nikto -h http://10.10.10.10 -o nikto_results.html
nikto -h http://10.10.10.10 -Tuning 123456789abcde

# whatweb
whatweb http://10.10.10.10
whatweb http://10.10.10.10 -v

# Wappalyzer (browser extension)
# Install in browser and visit target

# WordPress enumeration
wpscan --url http://10.10.10.10
wpscan --url http://10.10.10.10 --enumerate ap,tt,db,u
wpscan --url http://10.10.10.10 --enumerate ap (plugins)
wpscan --url http://10.10.10.10 --enumerate tt (themes)
wpscan --url http://10.10.10.10 --enumerate db (plugins with DB entries)
wpscan --url http://10.10.10.10 --enumerate u (users)
wpscan --url http://10.10.10.10 --enumerate u1-50 (top 50 users)

# Joomla enumeration
joomscan --url http://10.10.10.10
joomscan --url http://10.10.10.10 --enum-plugins
joomscan --url http://10.10.10.10 --enum-templates

# Drupal enumeration
droopescan drupal enum --url http://10.10.10.10

# PHP information
curl http://10.10.10.10/phpinfo.php
curl http://10.10.10.10/info.php
curl http://10.10.10.10/test.php

Vulnerability Analysis Commands

# SearchSploit
searchsploit Apache 2.4.41
searchsploit OpenSSH 8.2
searchsploit WordPress 5.8
searchsploit -m 49362 (copy exploit to current directory)
searchsploit -m 49362.py (copy specific file)

# ExploitDB (web)
# https://www.exploit-db.com
# Search for service and version

# CVE search
# https://cve.mitre.org
# https://nvd.nist.gov

# CVSS calculator
# https://www.first.org/cvss/calculator/3.1

Credential Testing Commands

# Hydra (brute force)
hydra -l admin -P /usr/share/wordlists/rockyou.txt ssh://10.10.10.10
hydra -l admin -P /usr/share/wordlists/rockyou.txt ftp://10.10.10.10
hydra -l admin -P /usr/share/wordlists/rockyou.txt http-post-form://10.10.10.10/login.php:username=^USER^&password=^PASS^:F=invalid
hydra -L users.txt -P passwords.txt ssh://10.10.10.10
hydra -l admin -P /usr/share/wordlists/rockyou.txt -t 64 ssh://10.10.10.10

# Medusa
medusa -h 10.10.10.10 -u admin -P /usr/share/wordlists/rockyou.txt -M ssh

# Ncrack
ncrack -user admin -P /usr/share/wordlists/rockyou.txt ssh://10.10.10.10

Output and Documentation Commands

# Nmap output formats
nmap -sV -p- 10.10.10.10 -oA nmap_results        # All formats (.xml, .gnmap, .nmap)
nmap -sV -p- 10.10.10.10 -oN nmap_results.txt     # Normal format
nmap -sV -p- 10.10.10.10 -oX nmap_results.xml     # XML format
nmap -sV -p- 10.10.10.10 -oG nmap_results.gnmap   # Grepable format

# Screenshot (for report)
gnome-screenshot -f screenshot.png
import -window root screenshot.png

# Save command history
history > command_history.txt

# Copy output to clipboard (Linux)
cat output.txt | xclip -selection clipboard

Tool Selection Matrix

Goal-Based Tool Selection

Goal Primary Tool Alternative Notes
Subdomain discovery theHarvester Amass, Subfinder Use multiple sources
DNS enumeration dig, nslookup dnsrecon, dnsenum Try zone transfer
Port scanning Nmap masscan, rustscan Nmap is standard
Service enumeration Nmap scripts Manual tools Enum4linux, snmpwalk
Web directory brute force gobuster ffuf, dirb gobuster is fastest
Web technology detection whatweb Wappalyzer, BuiltWith Browser extensions help
WordPress enumeration wpscan Manual Check plugins and themes
Exploit search searchsploit ExploitDB web Copy exploits with -m
Password brute force hydra Medusa, Ncrack Use rockyou.txt
Certificate analysis crt.sh Censys, CertSpotter No API key needed
Visual mapping Maltego BloodHound Maltego for OSINT
Passive recon framework Recon-ng SpiderFoot Modular approach

Scenario-Based Tool Selection

Scenario Tools Commands
Quick recon (5 min) Nmap nmap -sV -p 1-1000 TARGET -oA quick
Full recon (30 min) Nmap, gobuster, theHarvester Full scan + web enum + subdomains
Web-focused target gobuster, wpscan, nikto, whatweb Directory brute + CMS enum + vuln scan
Infrastructure-focused Nmap, enum4linux, snmpwalk Port scan + SMB + SNMP enum
Internal network Nmap, netdiscover, enum4linux ARP scan + port scan + SMB enum
Large network (/16) fping, Nmap Host discovery + targeted scanning
Time-constrained Nmap quick scan nmap -sV -p Top 100 TARGET

Common Pitfalls and Solutions

Pitfall Table

Pitfall Symptom Solution
Nmap too slow Scan takes hours Use -T4 timing, limit ports with -p
Nmap misses ports Known port not showing Try different scan type (-sS, -sT, -sF)
Firewall blocking All ports filtered Try FIN/NULL/Xmas scans, use decoys
gobuster too slow Directory scan takes forever Reduce threads, use smaller wordlist
Too many false positives Nikto reports many issues Verify manually, focus on high severity
theHarvester no results Empty output Try different sources, check domain spelling
Amass timeout Scan hangs Use -passive flag, reduce sources
wpscan rate limited 429 errors Use --throttle flag, add delays
Hydra too slow Brute force takes hours Increase threads -t 64, use smaller wordlist
Missing UDP services Only TCP scanned Always run UDP scan for top ports
Not saving output Lost results Always use -oA flag with Nmap
Wrong wordlist No directories found Try multiple wordlists, increase size
Ignoring subdomains Missing targets Always enumerate subdomains first
Skipping service enum Missing version info Always use -sV flag with Nmap
Not checking defaults Missing easy wins Always try default credentials

Quick Troubleshooting

# Nmap not working?
nmap -v -sV -p 80 TARGET          # Verbose mode for debugging
nmap -sT -p 80 TARGET             # Try connect scan instead of SYN
nmap -Pn -p 80 TARGET             # Skip host discovery

# gobuster not finding anything?
gobuster dir -u http://TARGET -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt
gobuster dir -u http://TARGET -w /usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt

# theHarvester no results?
theHarvester -d TARGET -b bing,google -l 500 -v  # Try verbose mode
theHarvester -d TARGET -b virustotal,crtsh -l 500  # Try different sources

# wpscan rate limited?
wpscan --url http://TARGET --throttle 1000 --delay 1

OSCP Exam Tips - Top 10 Rules

┌─────────────────────────────────────────────────────────────────┐
│              TOP 10 OSCP RECON RULES                             │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  #1  ALWAYS save Nmap output with -oA                          │
│      nmap -sV -p- TARGET -oA nmap_results                      │
│                                                                 │
│  #2  ALWAYS scan UDP ports (top 20 minimum)                    │
│      nmap -sU -p 53,67,68,69,123,161,162,389,500,514,         │
│           520,521,1434,1900,4500,5060,5353,6901,8545,19000    │
│           TARGET -oA udp_scan                                   │
│                                                                 │
│  #3  ALWAYS enumerate services after finding open ports        │
│      Don't just note the port - find the version               │
│                                                                 │
│  #4  ALWAYS try default credentials                            │
│      admin/admin, root/toor, test/test, etc.                   │
│                                                                 │
│  #5  ALWAYS check for anonymous access                         │
│      FTP anonymous, SMB null session, SNMP public              │
│                                                                 │
│  #6  ALWAYS enumerate web directories                          │
│      gobuster dir -u http://TARGET -w common.txt               │
│                                                                 │
│  #7  ALWAYS search for exploits for each service               │
│      searchsploit <service> <version>                          │
│                                                                 │
│  #8  ALWAYS take notes and save commands                       │
│      Record everything for the report                          │
│                                                                 │
│  #9  Set time limits for each phase                            │
│      Passive: 15-20 min, Active: 30-45 min                     │
│                                                                 │
│  #10 If stuck for 30 minutes, MOVE ON                          │
│      Park the target and return later                          │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Nmap Script Categories Reference

Script Categories

Category Description When to Use
default Default script set General scanning
safe Scripts considered safe When safety is a concern
vuln Vulnerability detection Vulnerability assessment
exploit Exploitation scripts When vuln is confirmed
auth Authentication scripts Testing auth mechanisms
broadcast Broadcast discovery Network discovery
discovery Service discovery Initial reconnaissance
dos Denial of service NOT for OSCP (destructive)
external External service queries When external access available
fuzzer Fuzzing scripts Input validation testing
intrusive Intrusive scripts When thoroughness needed
malware Malware detection Malware assessment
safe Non-intrusive scripts Safe scanning
version Version detection Service version info
wizard Beginner-friendly scripts Learning NSE

Common Nmap Scripts

# Default scripts
nmap -sC -p- TARGET

# Vulnerability scripts
nmap --script vuln -p- TARGET
nmap --script http-vuln* -p 80,443 TARGET
nmap --script smb-vuln* -p 445 TARGET
nmap --script ssl-vuln* -p 443 TARGET

# SMB scripts
nmap --script smb-enum-shares -p 445 TARGET
nmap --script smb-enum-users -p 445 TARGET
nmap --script smb-enum-groups -p 445 TARGET
nmap --script smb-enum-sessions -p 445 TARGET
nmap --script smb-security-mode -p 445 TARGET
nmap --script smb-os-discovery -p 445 TARGET

# HTTP scripts
nmap --script http-enum -p 80,443 TARGET
nmap --script http-headers -p 80,443 TARGET
nmap --script http-methods -p 80,443 TARGET
nmap --script http-robots.txt -p 80,443 TARGET
nmap --script http-title -p 80,443 TARGET
nmap --script http-enum -p 80,443 TARGET
nmap --script http-shellshock -p 80,443 TARGET
nmap --script http-apache-users -p 80,443 TARGET

# DNS scripts
nmap --script dns-zone-transfer -p 53 TARGET
nmap --script dns-srv-enum -p 53 TARGET

# SNMP scripts
nmap --script snmp-info -p 161 TARGET
nmap --script snmp-netstat -p 161 TARGET
nmap --script snmp-processes -p 161 TARGET

# SSH scripts
nmap --script ssh2-enum-algos -p 22 TARGET
nmap --script ssh-hostkey -p 22 TARGET
nmap --script ssh-auth-methods -p 22 TARGET

# MySQL scripts
nmap --script mysql-info -p 3306 TARGET
nmap --script mysql-enum -p 3306 TARGET

# LDAP scripts
nmap --script ldap* -p 389 TARGET

# All scripts for a service
nmap --script "*smb*" -p 445 TARGET
nmap --script "*http*" -p 80,443 TARGET
nmap --script "*ssh*" -p 22 TARGET

Script Arguments

# Specify script arguments
nmap --script http-enum --script-args http-enum.basepath=/admin -p 80 TARGET

# Multiple scripts
nmap --script "smb-enum-shares,smb-enum-users,smb-enum-groups" -p 445 TARGET

# Script with category
nmap --script "vuln and smb" -p 445 TARGET

Common Port Reference Table

TCP Ports

Port Service Common Vulnerabilities Enumeration Commands
21 FTP Anonymous login, weak creds ftp TARGET, anonymous login
22 SSH Weak keys, old versions, creds ssh -v user@TARGET, nmap --script ssh*
23 Telnet Cleartext credentials telnet TARGET, capture creds
25 SMTP Open relay, VRFY/ECHO nc TARGET 25, VRFY command
53 DNS Zone transfer, cache poisoning dig AXFR, dnsrecon
80 HTTP Web vulns, directory listing gobuster, nikto, wpscan
110 POP3 Weak credentials nc TARGET 110, USER/PASS
111 RPCBind RPC services rpcinfo -p TARGET
135 MS-RPC DCE/RPC vulns nmap --script msrpc*
139 NetBIOS SMB over NetBIOS enum4linux, nbtscan
143 IMAP Weak credentials nc TARGET 143, LOGIN
389 LDAP Anonymous bind, injection ldapsearch, nmap --script ldap*
443 HTTPS Same as HTTP + SSL vulns gobuster, nikto, SSL check
445 SMB EternalBlue, null session enum4linux, smbclient
512 Rexec Remote execution Check for old services
513 Rlogin Remote login Check for old services
514 Rsh Remote shell Check for old services
515 LPD Print spooler Check for old services
636 LDAPS Same as LDAP + SSL ldapsearch -H ldaps://
993 IMAPS Same as IMAP + SSL nc TARGET 993
995 POP3S Same as POP3 + SSL nc TARGET 995
1099 RMI Java RMI exploitation Check for Java services
1433 MSSQL SQL injection, weak creds nmap --script ms-sql*
1521 Oracle DB Oracle vulns, weak creds Check for Oracle services
2049 NFS NFS export misconfig showmount -e TARGET
3306 MySQL Weak creds, anonymous mysql -h TARGET, nmap --script mysql*
3389 RDP BlueKeep, weak creds xfreerdp, nmap --script rdp*
5432 PostgreSQL Weak creds, anonymous psql -h TARGET, nmap --script postgresql*
5900 VNC Weak/no password vncviewer TARGET:0
5985 WinRM Weak creds, unauth evil-winrm, crackmapexec
6379 Redis No auth, RCE redis-cli -h TARGET
8080 HTTP-Proxy Same as HTTP gobuster, nikto
8443 HTTPS-Alt Same as HTTPS gobuster, nikto
8888 HTTP-Alt Same as HTTP gobuster, nikto
9090 HTTP-Alt Same as HTTP gobuster, nikto
27017 MongoDB No auth, RCE mongo --host TARGET

UDP Ports

Port Service Common Vulnerabilities Enumeration Commands
53 DNS Zone transfer, amplification dig AXFR, dnsrecon
67/68 DHCP DHCP information leak nmap --script dhcp*
69 TFTP Anonymous file access tftp TARGET
123 NTP NTP monlist, amplification ntpdc -n TARGET
161/162 SNMP Community string brute force snmpwalk -v2c -c public TARGET
389 LDAP Same as TCP LDAP ldapsearch -h TARGET -p 389
500/4500 IKE VPN configuration Check for VPN services
514 Syslog Log injection Check for open syslog
520 RIP Routing information Check for routing protocols
1434 MSSQL-Browser MSSQL instance info nmap --script ms-sql*
1900 UPnP UPnP exploitation Check for UPnP services
5060 SIP VoIP vulnerabilities Check for SIP services
5353 mDNS Local network discovery avahi-browse
6901 X11 X11 display access Check for X11 services

SecLists Wordlist Locations

Common Wordlist Paths (Kali Linux)

/usr/share/wordlists/
├── dirb/
│   ├── common.txt                    # Common directories
│   ├── common.gz                     # Compressed common
│   └── ...
├── dirbuster/
│   ├── directory-list-lower-2.3-small.txt
│   ├── directory-list-lower-2.3-medium.txt
│   ├── directory-list-lower-2.3-big.txt
│   └── ...
├── seclists/
│   ├── Discovery/
│   │   ├── DNS/
│   │   │   ├── subdomains-top1million-110000.txt    # Large DNS list
│   │   │   ├── subdomains-top1million-5000.txt       # Medium DNS list
│   │   │   ├── subdomains-top1million-110000.txt     # Large DNS list
│   │   │   └── ...
│   │   ├── Web-Content/
│   │   │   ├── common.txt                            # Common web dirs
│   │   │   ├── directory-list-2.3-small.txt          # Small dir list
│   │   │   ├── directory-list-2.3-medium.txt         # Medium dir list
│   │   │   ├── directory-list-2.3-big.txt            # Large dir list
│   │   │   ├── raft-medium-directories.txt           # RAFT medium
│   │   │   ├── raft-large-directories.txt            # RAFT large
│   │   │   └── ...
│   │   └── ...
│   ├── Passwords/
│   │   ├── default-passwords.txt                     # Default passwords
│   │   ├── Best-Passwords.txt                        # Common passwords
│   │   └── ...
│   ├── Usernames/
│   │   ├── names.txt                                 # Common names
│   │   └── ...
│   └── ...
├── rockyou.txt                                   # Most common password list
├── fern/
│   └── wifi-default-passwords.lst                # WiFi default passwords
└── ...

Quick Wordlist Reference

Purpose Wordlist Path Size
Common directories /usr/share/wordlists/dirb/common.txt ~4K entries
**
Small directory list /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-small.txt ~12K entries
Medium directory list /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt ~45K entries
Large directory list /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-big.txt ~700K entries
RAFT medium /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt ~25K entries
DNS subdomains (small) /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt ~5K entries
DNS subdomains (large) /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt ~110K entries
Passwords (rockyou) /usr/share/wordlists/rockyou.txt ~14M entries
Default passwords /usr/share/seclists/Passwords/default-passwords.txt ~1K entries
Common passwords /usr/share/seclists/Passwords/Best-Passwords.txt ~20K entries
Usernames /usr/share/seclists/Usernames/names.txt ~5K entries

Wordlist Selection Guide

Scenario Recommended Wordlist Reason
Quick web scan dirb/common.txt Fast, covers basics
Standard web scan directory-list-2.3-small.txt Good coverage, reasonable speed
Thorough web scan directory-list-2.3-medium.txt Comprehensive coverage
Maximum web scan directory-list-2.3-big.txt Exhaustive (slow)
Quick DNS enum subdomains-top1million-5000.txt Fast, common subdomains
Thorough DNS enum subdomains-top1million-110000.txt Comprehensive
Password brute force rockyou.txt Most common passwords
Default creds default-passwords.txt Service defaults

Quick Decision Trees

Which Tool to Use?

graph TD
    A[What do you need?] --> B{Subdomains?}
    A --> C{Open Ports?}
    A --> D{Web Directories?}
    A --> E{Service Details?}
    A --> F{Exploits?}
    A --> G{Passwords?}
    
    B --> B1[theHarvester]
    B --> B2[Amass]
    B --> B3[Subfinder]
    
    C --> C1[Nmap -sV -p-]
    
    D --> D1[gobuster dir]
    D --> D2[ffuf]
    D --> D3[dirb]
    
    E --> E1[Nmap scripts]
    E --> E2[enum4linux]
    E --> E3[snmpwalk]
    
    F --> F1[searchsploit]
    F --> F2[ExploitDB]
    
    G --> G1[hydra]
    G --> G2[Medusa]
    
    style A fill:#f9d56e,stroke:#333,stroke-width:2px

Nmap Scan Type Decision

graph TD
    A[What scan do you need?] --> B{Time available?}
    B -->|Plenty| C[Full scan: -sV -sC -O -p-]
    B -->|Limited| D{Target size?}
    D -->|Single host| E[Quick: -sV -p 1-1000]
    D -->|Multiple hosts| F[Host discovery: -sn]
    C --> G[UDP scan: -sU -p top 20]
    E --> G
    F --> H[Targeted scan on live hosts]
    
    style A fill:#f9d56e,stroke:#333,stroke-width:2px

Web Enumeration Decision

graph TD
    A[Web service found] --> B{CMS detected?}
    B -->|WordPress| C[wpscan]
    B -->|Joomla| D[joomscan]
    B -->|Drupal| E[droopescan]
    B -->|Unknown| F[gobuster + nikto]
    
    C --> G[Check plugins/themes]
    D --> G
    E --> G
    F --> H[Manual browsing]
    
    G --> I[Search for exploits]
    H --> I
    
    style A fill:#f9d56e,stroke:#333,stroke-width:2px

Emergency Quick Scan Commands

5-Minute Quick Scan

# Ultra-quick scan (2 minutes)
nmap -sV -p 21,22,23,25,53,80,110,111,135,139,143,389,443,445,993,995,1433,1521,3306,3389,5432,5900,5985,8080,8443 TARGET -oA emergency_scan

# Quick web check (1 minute)
gobuster dir -u http://TARGET -w /usr/share/wordlists/dirb/common.txt -t 50 -q

# Quick exploit search (1 minute)
searchsploit <service_from_scan>

# Quick default credential check (1 minute)
# Try: admin/admin, root/toor, test/test, guest/guest

10-Minute Standard Scan

# Standard scan (5 minutes)
nmap -sV -sC -p 1-1000 TARGET -oA standard_scan

# UDP quick scan (3 minutes)
nmap -sU -p 53,67,68,69,123,161,162 TARGET -oA udp_quick

# Web enumeration (2 minutes)
gobuster dir -u http://TARGET -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-small.txt -t 50 -q

20-Minute Comprehensive Scan

# Full TCP scan (10 minutes)
nmap -sV -sC -O -p- TARGET -oA full_scan

# Full UDP scan (5 minutes)
nmap -sU -p 53,67,68,69,123,161,162,389,500,514,520,521,1434,1900,4500,5060,5353,6901,8545,19000 TARGET -oA udp_full

# Web enumeration (5 minutes)
gobuster dir -u http://TARGET -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -t 50 -o gobuster_full
nikto -h http://TARGET -o nikto_results.html

One-Page Recon Checklist

┌─────────────────────────────────────────────────────────────────────────────┐
│                        ONE-PAGE RECON CHECKLIST                              │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  PASSIVE RECON (15-20 min)                                                  │
│  ─────────────────────────                                                  │
│  □ whois TARGET                                                             │
│  □ dig A/MX/NS/TXT/SOA TARGET                                               │
│  □ dig AXFR TARGET @ns1.TARGET                                              │
│  □ theHarvester -d TARGET -b bing,google,virustotal,crtsh -l 500 -f pass -n │
│  □ amass enum -passive -d TARGET -o amass.txt                               │
│  □ subfinder -d TARGET -o subfinder.txt                                     │
│  □ Google dorks: site:TARGET, filetype:pdf, inurl:admin                     │
│  □ crt.sh query for certificates                                            │
│                                                                             │
│  ACTIVE RECON (30-45 min)                                                   │
│  ────────────────────                                                       │
│  □ nmap -sn TARGET/24 -oA hosts                                            │
│  □ nmap -sV -p 1-1000 TARGET -oA quick                                     │
│  □ nmap -sV -sC -O -p- TARGET -oA full                                     │
│  □ nmap -sU -p 53,67,68,69,123,161,162,389,500,514,520,521,1434,           │
│       1900,4500,5060,5353,6901,8545,19000 TARGET -oA udp                   │
│  □ gobuster dir -u http://TARGET -w common.txt -o gobuster                  │
│  □ nikto -h http://TARGET                                                   │
│  □ whatweb http://TARGET                                                    │
│                                                                             │
│  SERVICE ENUM (15-20 min)                                                   │
│  ────────────────                                                           │
│  □ SMB: enum4linux -a TARGET                                                │
│  □ SNMP: snmpwalk -v2c -c public TARGET                                     │
│  □ FTP: ftp TARGET (anonymous)                                              │
│  □ SSH: ssh -v user@TARGET                                                  │
│  □ DNS: dig AXFR TARGET @TARGET                                             │
│  □ LDAP: ldapsearch -x -h TARGET                                            │
│  □ MySQL: mysql -h TARGET -u root -p                                        │
│  □ Redis: redis-cli -h TARGET                                               │
│  □ MongoDB: mongo --host TARGET                                             │
│                                                                             │
│  VULN ANALYSIS (15-20 min)                                                  │
│  ─────────────────                                                          │
│  □ searchsploit <service> <version>                                         │
│  □ Try default credentials for each service                                 │
│  □ Check for anonymous access                                               │
│  □ wpscan --url http://TARGET (if WordPress)                                │
│  □ joomscan --url http://TARGET (if Joomla)                                 │
│                                                                             │
│  PRE-EXPLOITATION                                                           │
│  ────────────────                                                           │
│  □ Build attack vector list                                                 │
│  □ Prioritize vulnerabilities                                               │
│  □ Prepare exploits and payloads                                            │
│  □ Configure listeners                                                      │
│  □ Save all notes and outputs                                               │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Memory Aids and Mnemonics

Nmap Scan Types

SYN Scan    = -sS  (Stealth, most common)
TCP Scan    = -sT  (Full connect, when SYN blocked)
UDP Scan    = -sU  (For UDP services)
FIN Scan    = -sF  (Firewall evasion)
NULL Scan   = -sN  (Firewall evasion)
Xmas Scan   = -sX  (Firewall evasion)

Mnemonic: “Stealth SYN, Total TCP, UDP Uncovered, FINal Firewall, NULL Nothing, Xmas Xtra”

Nmap Timing Templates

T0 = Paranoid (slowest)
T1 = Sneaky
T2 = Polite
T3 = Normal (default)
T4 = Aggressive (fast)
T5 = Insane (fastest)

Mnemonic: “Paranoid Sneak Politely Normally, get Aggressive, go Insane”

Common Default Credentials

Service      Username    Password
─────────    ────────    ────────
FTP          anonymous   anonymous
SSH          root        toor
MySQL        root        (blank)
PostgreSQL   postgres    (blank)
Redis        (none)      (none)
MongoDB      (none)      (none)
SNMP         (none)      public
VNC          (none)      (blank)
Tomcat       admin       admin
Tomcat       tomcat      tomcat
phpMyAdmin   root        (blank)
WordPress    admin       admin
Joomla       admin       admin
Drupal       admin       admin

Mnemonic: “Anonymous Anonymous, Root Toor, MySQL Blank, PostgreSQL Blank, SNMP Public”

Port Memory Aid

21  FTP     - "F**T**P is **21** grams" (soul weight)
22  SSH     - "**22** jumps" (Jack and Beanstalk)
23  Telnet  - "**23**and Me" (book)
25  SMTP    - "**25**th hour" (email late)
53  DNS     - "**53** degrees" (name resolution)
80  HTTP    - "**80** columns" (terminal width)
443 HTTPS   - "**443** area code" (secure call)
445 SMB     - "**445** reasons" (to share)
3306 MySQL  - "**3306** MySQL" (33-06)
3389 RDP    - "**3389** remote" (33-89)
5432 PGSQL  - "**5432** Postgres" (54-32)
6379 Redis  - "**6379** Redis" (63-79)
8080 HTTP   - "**8080** proxy" (80-80)
27017 Mongo - "**27017** Mongo" (27-017)

Gobuster Quick Reference

# Basic directory brute force
gobuster dir -u URL -w WORDLIST

# With extensions
gobuster dir -u URL -w WORDLIST -x php,html,txt

# With threads and status codes
gobuster dir -u URL -w WORDLIST -t 50 -s 200,301,302,403

# DNS brute force
gobuster dns -d DOMAIN -w WORDLIST

theHarvester Quick Reference

# Basic harvest
theHarvester -d DOMAIN -b SOURCES -l LIMIT -f OUTPUT

# With DNS resolution
theHarvester -d DOMAIN -b SOURCES -l LIMIT -f OUTPUT -n

# With takeover detection
theHarvester -d DOMAIN -b SOURCES -l LIMIT -f OUTPUT -t

# All sources
theHarvester -d DOMAIN --full -l 1000 -f OUTPUT

Summary

This cheat sheet provides quick-reference commands and tables for the OSCP Information Gathering phase. Key takeaways:

  1. Always save output: Use -oA with Nmap, -o with other tools
  2. Always scan UDP: Top 20 UDP ports minimum
  3. Always enumerate services: Find versions before searching for exploits
  4. Always try defaults: Default credentials are easy wins
  5. Always take notes: Document everything for the report
  6. Manage time: Set limits for each phase
  7. Have backups: Multiple tools for each task
  8. Prioritize: Focus on high-value targets first

Keep this cheat sheet handy during exam preparation and use it as a quick reference during the OSCP exam.