Subdomain Enumeration
Building the most complete, resolvable list of hostnames under a target’s root domains by combining passive datasets (CT logs, passive DNS, archives) with active generation (brute force, permutations, vhosts), then filtering wildcards and probing for live services.
How it works
The pipeline is the same across nearly every methodology and framework in the sources: root domains → passive collection → resolve/filter → active generation (brute force + permutations) → resolve/filter again → HTTP probe. Wiz’s masterclass phases it as passive (subfinder) → resolution (puredns, dig) → active (puredns, alterx) → root-domain discovery (acquisitions, WHOIS) → public exposure (httpx), and puts a medium-sized company at 30–60 minutes of work.
- Passive never touches the target’s infrastructure: CT logs, passive-DNS aggregators, search engines, web archives. Fast and stealthy, but accepts stale or bogus names blindly.
- Active sends DNS queries to the target’s authoritative servers (brute force, alterations, zone transfer, NSEC walking) or HTTP requests to its web servers (vhost fuzzing, crawling). It finds names that never appeared in any public dataset.
- Enumeration only finds names. Volume is not attack surface: wildcard DNS, CDNs and dead records inflate the count until the list is resolved and fingerprinted.
Root-domain expansion (acquisitions, reverse WHOIS, ASN/org search) comes before this step and lives in Asset Discovery. OWASP Amass intel handles part of it.
Techniques / commands
Passive sources
| Source | Command |
|---|---|
| subfinder (dozens of passive APIs) | subfinder -d target.com -all -recursive -silent · JSON: -oJ |
| Chaos (ProjectDiscovery dataset, API key) | chaos -d target.com -silent |
| assetfinder / findomain | assetfinder --subs-only target.com · findomain -t target.com -q |
| Amass passive | amass enum -passive -d target.com -src |
| crt.sh (CT logs) | curl -s "https://crt.sh/?q=%25.target.com&output=json" \| jq -r '.[].name_value' \| sed 's/\*\.//g' \| sort -u |
| Wayback CDX | curl -s "http://web.archive.org/cdx/search/cdx?url=*.target.com/*&output=text&fl=original&collapse=urlkey" \| unfurl -u domains |
| gau | gau target.com --threads 10 --subs \| unfurl -u domains |
| Others with plain HTTP APIs | hackertarget hostsearch, Anubis (jldc.me), subdomain.center, WhoisXML, Riddler |
| Search / internet scanners | site:*.target.com -site:www.target.com (Google Dorking); Shodan hostname:target.com; Censys |
| theHarvester | theHarvester -d target.com -b all -f out.json. Also yields emails, ASNs and IPs |
Notes:
- Configure API keys (
~/.config/subfinder/provider-config.yaml, Chaos~/.config/chaos/config.yaml, Amassdatasources.yaml). Keyless runs return a fraction of the results. - Certificate Transparency leaks internal app names whenever an org requests a public cert for an internal host. Use the Certspotter API (throttled free tier) for one-off lookups and
gungnirto stream new certs within seconds of issuance.ctfr-reloaded -d target.com --source all --resolve --alive --takeover --tls --cdncombines CT lookup with resolution, liveness and takeover hints, and has--watch --interval 1800for monitoring and--pipe | httpxfor chaining. - Findomain 11.0.0 is a rewrite: 55 passive sources (42 new, incl. chaos, censys, shodan, netlas, fofa, zoomeye, wayback, commoncrawl, crt.name), keys from config or
FINDOMAIN_*env,--list-keysreports which sources are skipped or on free quota without printing values. crt.sh is queried through its public PostgreSQL mirror with JSON API fallback (more results than the API alone), paginated sources are walked to the end, and--source-timeout/--source-budget/--archive-budgetstop a dead API from holding a run open. Breaking changes:--external-subdomainsis gone (run subfinder/amass yourself, thenfindomain -t example.com --import-subdomains subfinder.txt amass.txt -r), the built-in port scanner is now nmap (--pscan,--nmap-syn,--nmap-arg), monitoring defaults to./findomain.dbSQLite instead of localhost PostgreSQL,threatcrowddropped. New:--permutations [--permutations-wordlist],--cnamecolumn, optional nuclei/ffuf stages on HTTP-confirmed hosts with passthrough args, Retry-After handling for rate-limited Discord/Slack webhooks, IPv6-only fixed end to end (Findomain 11.0.0). - Normalize and dedupe immediately:
cat subs_*.txt | tr '[:upper:]' '[:lower:]' | sort -u.
Resolution and resolvers
puredns resolve subs.txt -r resolvers.txtwraps massdns. Its value is wildcard and DNS-poisoning filtering: public resolvers return bogus answers that ruin raw massdns output. ProjectDiscovery’s one-shot script found 28,711 names with shuffledns, andpuredns resolvecut that to 12,039 after detecting the wildcard root*.signon.aws.amazon.com.- Resolver lists must be validated (reconFTW uses
dnsvalidator). Bad resolvers produce both false positives and silent drops. BBOT 3.1 samplesdns.brute_max_resolvers(default 600) at random, drops dead resolvers at startup, and reports resolver diagnostics when brute-force delivery drops. - Don’t treat one failed resolution as proof a name is gone. Quasar keeps passive candidates that fail PureDNS resolution because a DNS failure at one point in time is not permanent.
Brute force
puredns bruteforce wordlist.txt target.com -r resolvers.txt
shuffledns -d target.com -w n0kovo_subdomains_huge.txt -r resolvers.txt -o out.txt
gobuster dns -d target.com -w wordlist.txt
amass enum -brute -w wordlist.txt -d target.com # see [[OWASP Amass]]Results depend on the wordlist. Build a target-specific list from naming patterns in passive results, then expand it with mksub (Trickest). SecLists and n0kovo lists are the common bases.
Permutations / alterations
Naming conventions are predictable. If dev-billing exists, try staging-billing, qa-billing and dev-billing-v2, and go deeper than one level (api-v2.dev.us-east.target.com):
cat all_passive_subs.txt | alterx -silent | dnsx -silent -a -resp -o resolved_permutations.txt
amass enum -alts -d target.com # or hashcat-style masks: -awm / -wm "zzz-?l?l?l"- Subwiz (Hadrian) is an ML model that predicts likely subdomains from known ones. v1.0 was retrained on a 5x larger dataset that includes the apex and TLD, adds
--multi-apex, and has a recursive mode where iteration k output seeds iteration k+1 up tomax-recursion. Starting from onlywwwof a large social network, it found ~1,200 subdomains. - BBOT
-p subdomain-enumcombines passive APIs with recursive DNS brute force using target-specific mutations.-rf passiverestricts it to passive sources. In 3.1, massdns was replaced by blastdns 2.0, which halved wall time on a large wildcard scan with the same results. New passive sources:otilabsandscanmalware(opt-in).
Other active sources
- Vhost fuzzing: names that share an IP but are routed by
Host:ffuf -c -r -u 'https://www.target.com/' -H 'Host: FUZZ.target.com' -w dns-wordlist.txt. Flag outlier responses. - Reverse DNS over discovered or ASN IP ranges:
cat ips.txt | dnsx -ptr -resp-only. subdive also sweeps the /24 around each discovered IP. - TLS SANs from handshakes against resolved hosts, and AXFR attempts against every authoritative NS (subdive,
amass enum -active). - Crawling and JS: Burp’s passive crawl and headless DOM analysis pull API and microservice hostnames out of a single page visit. See JavaScript Analysis.
Wildcard handling
Test first: dig +short randomstring998877.target.com. If it resolves, use puredns’s wildcard filtering, or filter by IP and page size at the HTTP-probe stage. BBOT 3.1 fixed nested wildcard detection (is_wildcard), which matters because wildcards are often scoped to a sub-zone (*.api.target.com).
Probe and fingerprint
httpx -silent -ports 80,443,8080,8000,8888 -threads 200 < subs.txt > alive.txt
httpx -silent -sc -title -tech-detect < alive.txt > alive-info.txtGUI alternative: VanguardHTTP (Go + Wails) probes HTTPS with HTTP fallback at 1–1,000 workers under a token-bucket RPS limit, fingerprints tech and WAFs offline, inspects TLS certs and DNS, computes Shodan-compatible MMH3 favicon hashes, hides same-size noise, proxies through Burp/ZAP and exports TXT for nuclei/ffuf (VanguardHTTP).
Then hand off to Port Scanning, Content Discovery and takeover checks (Subdomain Takeover: dangling CNAMEs, and BBOT’s baddns DELEGATION checks for _acme-challenge, _dmarc and DKIM selectors).
Rate limiting / WAF
Active enumeration across many hosts behind one bot-protection vendor can get you banned from all of them. Rate-limit, rotate egress and follow program rules. BBOT 3.1 filters CDN/WAF ports in its core by default; --allow-cdn-ports turns that off.
- SUBX (
pip install subx-recon, Python): async passive enumeration across 12 sources (Shodan, Censys, VirusTotal, crt.sh, Chaos and others), in-scope/out-of-scope filtering, thendnsxresolution andhttpxprobing that runs only on hosts that resolve. Results go to SQLite or PostgreSQL withfirst_seen/last_seen/last_seen_alivetimestamps for change monitoring (PyPI). See also OSINT and Python Security.
Notable cases
- 100K subdomains → 2 assets: an external assessment started from ~100,787 names that all resolved to one IP (wildcard DNS). After correlating DNS, redirects and fingerprints, two real assets remained. One was an outdated SmarterMail (build 100.0.7242, 2019) in affected ranges for CVE-2025-52691 (unauthenticated file upload to RCE) and CVE-2026-23760 (password-reset auth bypass). Its
POST /api/v1/auth/force-reset-passwordreached server-side processing unauthenticated, and webmail login was served over plaintext HTTP. Lesson: recon quality beats quantity. - CT logs exposing internal tools: certificates issued for internal and staging apps reveal names that are often reachable from the internet and expose unauthenticated APIs. The proposed fix is private PKI or wildcard certs (
*.internal.foo.com) to shrink the leak. - YesWeHack walkthrough on ATG’s public program: Censys and Shodan
hostname:, subfinder-oJ, Amass, asite:dork, gobuster DNS, ffuf vhosts, dnsx PTR and the Burp crawler, all run against one real scope.
Defenses
- Monitor your own CT logs (gungnir or Certspotter) and run periodic
amass track-style diffs to catch shadow assets before attackers do. See Asset Discovery. - Use private PKI or wildcard certificates for internal-only hostnames.
- Remove dangling records and delegations. See Subdomain Takeover.
Related
- Reconnaissance (hub)
- OWASP Amass · Asset Discovery · Subdomain Takeover · Port Scanning · Content Discovery · JavaScript Analysis · Google Dorking
- Bug Bounty Automation · Bug Bounty Methodology · Domain and Infrastructure OSINT
Sources
- Findomain 11.0.0 release · original
- VanguardHTTP: HTTP Probing and Deep Fingerprinting Suite · original
- ProjectDiscovery: Reconnaissance 102, Subdomain Enumeration · original
- YesWeHack: Subdomain enumeration with active and passive methods · original
- ProjectDiscovery: Building a fast one-shot recon script · original
- Wiz: Reconnaissance Overview, Bug Bounty Masterclass · original
- The Practical Web Recon Playbook · original
- Advanced Recon: Taking subdomain discovery to the next level · original
- Ultimate Guide to Subdomain Enumeration for Bug Bounty · original
- Recon Methodology: Subdomain Enumeration · original
- Finding Hidden Internal Apps Through Public Certificate Logs · original
- ctfr-reloaded: CT subdomain discovery · original
- Subwiz v1.0 release · original
- BBOT 3.1.0 release notes · original
- blacklanternsecurity/bbot · original
- subdive: subdomain enumerator · original
- Quasar: cross-platform subdomain enumeration framework · original
- reconFTW: Automated Recon Tool · original
- From 100K Subdomains to a Real Attack Surface · original
- SUBX: subdomain recon and asset management framework · original