🛡️ Methodology Checklist

  • Passive enumeration: crt.sh, Shodan, VirusTotal passive DNS
  • Zone transfer attempt against all NS records
  • Active brute-force with quality wordlist (SecLists subdomains)
  • Virtual host fuzzing with ffuf for unlisted vhosts
  • Permutation generation with altdns
  • DNS resolution of all candidates with massdns or dnsx
  • Dedup and prioritise: internal, staging, vpn, mail subdomains first

🎯 Operational Context

Use when: Starting web recon — map all in-scope subdomains via passive CT logs + active DNS brute before any application testing. Think Dumber First: subfinder -d target.com -all takes 30 seconds and finds what weeks of manual searching misses. Run it first, always. Then validate with dnsx before crawling anything. Skip when: Single-domain scope with no subdomain enumeration permitted.


⚡ Tactical Cheatsheet

CommandTactical Outcome
curl -s "https://crt.sh/?q=[DOMAIN]&output=json" | jq -r '.[] | .name_value' | sort -uExtract subdomains from CT logs
curl -s "https://crt.sh/?q=[DOMAIN]&output=json" | jq -r '.[] | select(.name_value | contains("dev")) | .name_value' | sort -uFiltered CT log query (e.g., dev subdomains)
dig axfr @[NAMESERVER] [DOMAIN]Zone transfer attempt (active)
dnsenum --enum [DOMAIN] -f [WORDLIST] -rBrute-force subdomains with dnsenum
gobuster vhost -u http://[DOMAIN] -w [WORDLIST] --append-domainVHost fuzzing
gobuster vhost -u http://[DOMAIN] -w [WORDLIST] --append-domain -t 50VHost fuzzing with 50 threads

🔬 Deep Dive & Workflow

Why Subdomains Matter

Subdomains are often less secured than the main domain and can host:

  • Dev/Staging environments — relaxed security, debug modes, test data
  • Hidden login portals — admin panels, employee portals
  • Legacy applications — forgotten apps running unpatched software
  • Sensitive info — exposed configs, internal docs, backups

Keywords to prioritize: dev, test, staging, api, admin, vpn, internal, backup

Passive Enumeration (Stealthy)

MethodDescription
Certificate Transparency (CT) LogsPublic SSL cert repos — check SAN field for listed subdomains
Search Engine Dorkssite:example.com -www filters for subdomains
Online AggregatorsVirusTotal, Censys, Shodan — crawled DNS history

CT Logs advantage: Reveals historical subdomains that no longer resolve but may still have vulnerable servers. Completely passive — no target contact.

Active Enumeration (Intrusive)

MethodTools
Zone Transfers (AXFR)dig axfr
Brute-Forcednsenum, ffuf, gobuster, amass, puredns

CT Log Extraction (Fastest Exam Method)

# All subdomains
curl -s "https://crt.sh/?q=[DOMAIN]&output=json" | jq -r '.[] | .name_value' | sort -u
 
# Clean wildcards
sed -i 's/\*\.//g' results.txt && sort -u results.txt -o results.txt

Run this before any brute-force — often finds internal/dev subdomains not in wordlists.

Strategy (Exam)

  1. Passive first — CT logs + search dorks (no alerts triggered)
  2. Check CNAMEs — may point to external services vulnerable to subdomain takeover
  3. Dictionary attacksubdomains-top1million-110000.txt (SecLists)
  4. Analyze results — focus on dev, test, staging, api, admin, vpn

🛠️ Troubleshooting & Edge Cases

ProblemCauseFix
subfinder returns few resultsMissing API keysConfigure ~/.config/subfinder/provider-config.yaml with Shodan, VirusTotal, SecurityTrails keys
amass enum hangs indefinitelyDefault timeout too longUse amass enum -passive -d target.com -timeout 30 for passive-only quick run
dnsx resolves everything to same IPCDN or load balancerExpected behavior — IP clustering means CDN; look for origin IPs via SSRF or misconfigured headers
CT log search returns expired/revoked certscrt.sh includes all historyFilter: https://crt.sh/?q=%.target.com&output=json and check not_after field
Subdomain takeover false positiveCNAME points to unclaimed serviceVerify with subjack or nuclei -t takeovers/ before reporting

📝 Reporting Trigger

Finding Title: Subdomain Enumeration Reveals Expanded Attack Surface Impact: Discovery of undocumented subdomains may expose internal applications, legacy services, and admin interfaces not subject to the same security controls as the primary domain. Root Cause: Lack of subdomain lifecycle management; subdomains created for temporary projects or tests are never decommissioned or secured. Recommendation: Implement DNS zone auditing and certificate transparency monitoring alerts. Decommission unused subdomains. Apply equivalent security controls (WAF, auth, TLS) to all subdomains.