Skip to content
Pwnversity
RECON-SUBDOMINIOSintermediate · 5 min · upd. 2026-10

Subdomain Enumeration

T1590.002

Each of an organization’s subdomains (mail., dev., vpn., jira., admin.) is a potential door, and often the weakest: forgotten, staging, or third-party-service subdomains tend to be worse protected than the main domain. Enumerating subdomains widens the attack surface, and it’s one of the first recon steps because each finding opens new lines of work.

You combine all three for maximum coverage; none is enough on its own:

  • Passive: ask third-party sources that already know subdomains.
  • Brute force: try a dictionary of names against the target’s DNS.
  • Permutations: generate variations of what you already found.

The flow chains discovery, resolution, and live filtering:

flowchart LR
    A[Domain] --> B[Passive: CT, aggregators]
    A --> C[DNS brute force]
    A --> D[Permutations]
    B --> E[Raw candidate list]
    C --> E
    D --> E
    E --> F[Resolve with dnsx]
    F --> G[Probe live with httpx]
    G --> H[Individual fingerprint]

Aggregators query dozens of sources at once:

Ventana de terminal
subfinder -d target.com -all -silent
amass enum -passive -d target.com

Certificate Transparency is especially powerful: every issued certificate lands in public logs and reveals internal subdomains that were never published. Direct query to crt.sh:

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

Other passive sources: SecurityTrails, VirusTotal, Censys, DNSDumpster.

Try a dictionary of common names against the target’s DNS, resolving with your own resolver list to go fast:

Ventana de terminal
puredns bruteforce subs.txt target.com -r resolvers.txt
gobuster dns -d target.com -w subdomains.txt
ffuf -w subs.txt -u https://FUZZ.target.com # by HTTP response

The SecLists wordlists (DNS/ folder) are the usual starting point.

From what you found, generate variations (dev1, dev-api, api.dev) and resolve them:

Ventana de terminal
gotator -sub subs.txt -perm permutations.txt | puredns resolve -r resolvers.txt
# alternatives: altdns, dnsgen

Separate two things: DNS resolution (does the host exist?) and HTTP probing (is there a web app?). A subdomain that doesn’t resolve is dropped; but one that resolves and does not answer over HTTP isn’t useless: it may expose DNS, mail, VPN, SSH or another non-web service. Don’t discard it just because httpx doesn’t flag it alive:

Ventana de terminal
dnsx -l subs.txt -a -resp # does it resolve? to which IP?
httpx -l resolved.txt -title -status-code -tech-detect # alive? what is it?
  • Subdomain takeover: does any CNAME point to a released third-party service? (see Subdomain Takeover).
  • Staging/dev environments: usually have fewer controls, default credentials, and debug mode on.
  • Admin panels, APIs, and VPN: high-value authentication surface.
  • Different technologies per subdomain: fingerprint each one individually (see Technology Fingerprinting).

Several sites on the same IP are told apart by the Host header. There may be vhosts not listed in DNS, appearing only when you fuzz that header:

Ventana de terminal
ffuf -w vhosts.txt -u https://target.com -H "Host: FUZZ.target.com" -fs <base_size>
gobuster vhost -u https://target.com -w vhosts.txt
  • Staying only passive: you miss the subdomains that aren’t in any third-party source.
  • Brute force without reliable resolvers: false positives from wildcard DNS and inconsistent results.
  • Not detecting the wildcard (*.target.com that resolves everything): you must filter the wildcard IP.
  • Enumerating but not probing live: a huge list without httpx prioritizes nothing.

Reduce exposure: don’t leave dev/staging subdomains reachable from the Internet, clean up stale DNS records (prevents takeovers), monitor Certificate Transparency to spot unexpected certificates or subdomains, and apply the same controls to the humblest subdomain as to the main one.

  • Passive enumeration (subfinder / amass / crt.sh).
  • DNS brute force with a good dictionary (SecLists).
  • Permutations of what you found (gotator / dnsgen).
  • Resolve and filter live (dnsx + httpx).
  • Look for subdomain takeover (dangling CNAMEs).
  • Identify staging / dev / admin / API / VPN.
  • Discover vhosts via the Host header.
  • Individual fingerprint of each interesting subdomain.