Skip to content
PHASE 03/16OP SONAR

Subdomain enumeration, active

Noise
Light active
Reads
subs/all.txt
Writes
subs/brute.txtsubs/perms.txtsubs/all.txt

Scope checkActive phase. Check the program policy first. Send traffic only to in-scope assets, at the rate the program allows.

6 min readRecon Atlas

Other hunters run the same passive tools, so the names only brute force and permutation find are the ones nobody has tested. Find names that no public source has recorded. Two techniques do this:

  • Brute force tries a wordlist of common labels: admin.example.com, vpn.example.com, and so on.
  • Permutation mutates names you already know: api.example.com becomes api-dev.example.com, api2.example.com, dev.api.example.com.

Both resolve millions of candidate names. Your queries go to public resolvers, and cache misses reach the target’s authoritative nameservers. That is light traffic per name, but a lot of names, so check the program allows it.

Tool Noise Role
MassDNS Light active The fast resolver engine underneath the others
PureDNS Light active Brute force and resolve with wildcard filtering and trusted-resolver validation
ShuffleDNS Light active ProjectDiscovery’s wrapper around MassDNS, with wildcard handling
alterx Passive Pattern-based permutation generator. Generates names, sends nothing
dnsgen Passive Permutation generator from known names and a word list
gotator Passive Permutation generator with depth and number options
regulator Passive Learns the target’s naming pattern from known names, then generates likelier guesses
Trickest resolvers Passive Daily validated public resolver lists
Assetnote and SecLists DNS lists Passive Wordlists built from real DNS data

The generators are passive. The noise comes when you resolve their output.

Brute force the root first, with a list built from real DNS such as the Assetnote best-dns list. vpn, sso, gitlab, and monitoring usually sit on the root or on one operational zone. Brute force will not invent a naming scheme the company made up.

Use alterx once you can see the pattern. If you already have api-prod-us.example.com and web-prod-us.example.com, alterx is the tool that tries api-dev-us and api-prod-eu. Cap it. Uncapped output on a big seed list is how you mint hundreds of millions of names.

Use dnsgen or gotator on a smaller seed list. A lot of their mutations are nonsense, so resolve before you keep anything. regulator is the smarter option on a mature target. Instead of pasting words onto every name, it learns the rules behind the names you already found and generates guesses that fit the scheme. Its output resolves at a higher rate.

Use PureDNS to resolve. It sprays lookups across public resolvers, then checks every hit again against a short trusted list such as 1.1.1.1, 8.8.8.8, and 9.9.9.9. That second pass is what drops poisoned answers. ShuffleDNS is the same idea if the rest of your pipeline is ProjectDiscovery tools. Do not keep raw MassDNS output. Without a wildcard filter and a trusted re-check, bad resolvers will hand you tens of thousands of fake names.

A wildcard DNS record (*.example.com) makes every name resolve. Without filtering, brute force “finds” every word in your list. Test before you start.

Terminal window
# Resolve a random label; an answer means the zone has a wildcard
dig +short "$(head -c 12 /dev/urandom | md5sum | cut -c1-12).example.com"

PureDNS and ShuffleDNS detect wildcards and drop the fake results. If you resolve with plain MassDNS, filter wildcards yourself.

A clean root does not mean the zones under it are clean. *.dev.example.com can wildcard while example.com does not. Test the sub-zones you are about to brute force, or a dictionary run will log every word as a host.

;; QUESTION SECTION:
;auth-staging.example.com. IN A
;; ANSWER SECTION:
auth-staging.example.com. 300 IN A 203.0.113.25
;; Query time: 24 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)

The authoritative server for example.com published an A record, and a trusted resolver returned it. It does not mean anything is listening on port 80 or 443. A firewall can drop every connection from outside the company.

;; QUESTION SECTION:
;x98dfh2ks0df.example.com. IN A
;; ANSWER SECTION:
x98dfh2ks0df.example.com. 60 IN A 203.0.113.99

*.example.com answers for labels nobody created. A brute force run that does not filter this will record the whole wordlist.

;; QUESTION SECTION:
;completely-made-up-name.example.com. IN A
;; ANSWER SECTION:
completely-made-up-name.example.com. 10 IN A 198.51.100.1

An untrusted resolver replaced NXDOMAIN with an address of its own, often an ad page or a captive portal. The company did not create that record. A trusted resolver is the check that matters.

A random label under example.com returns nothing, so you brute force anyway. Every word under dev.example.com then resolves to 203.0.113.80. The wildcard is *.dev.example.com. The root test never saw it, and the tool wrote down tens of thousands of fake names.

A stale resolver list turns 500,000 candidates into 4,000 names at 198.51.100.14. dig @1.1.1.1 on any of them is NXDOMAIN. One public resolver was sending misses to an ISP landing page.

Brute force finds status-preview.example.com:

status-preview.example.com. 300 IN CNAME example-old.statuspage.io.

example-old.statuspage.io is NXDOMAIN. Statuspage will not attach a custom domain until you prove ownership with a TXT record. The CNAME is dead. It is not a takeover.

Permutation finds pr-1842-web.example.com at 203.0.113.110. Port 443 returns HTTP 503 from an Nginx ingress. The pull request merged, the preview pod is gone, and the DNS cleanup job never deleted the record.

  1. Refresh resolvers. Stale resolvers are the top cause of junk results.

    Terminal window
    # Download today's resolver lists
    wget -qO ~/wordlists/resolvers.txt https://raw.githubusercontent.com/trickest/resolvers/main/resolvers.txt
    wget -qO ~/wordlists/resolvers-trusted.txt https://raw.githubusercontent.com/trickest/resolvers/main/resolvers-trusted.txt
  2. Brute force with PureDNS. It resolves through public resolvers, then re-checks hits against trusted resolvers to remove poisoned answers.

    Terminal window
    # Brute force example.com with the Assetnote list, wildcard-aware
    puredns bruteforce ~/wordlists/best-dns-wordlist.txt example.com \
    -r ~/wordlists/resolvers.txt --resolvers-trusted ~/wordlists/resolvers-trusted.txt \
    --rate-limit 3000 -w subs/brute.txt

    The ShuffleDNS equivalent, if you prefer ProjectDiscovery tools:

    Terminal window
    # Brute force with ShuffleDNS (newer versions need -mode)
    shuffledns -d example.com -w ~/wordlists/best-dns-wordlist.txt -r ~/wordlists/resolvers.txt -mode bruteforce -silent -o subs/brute-shuffle.txt
  3. Add brute force hits to the master list so permutations use them as seeds.

    Terminal window
    # Record new names from brute force
    cat subs/brute*.txt | anew subs/all.txt
  4. Generate permutations. Pick one generator to start. alterx learns words from your list with -enrich. Cap the output, because permutations grow fast.

    Terminal window
    # alterx: patterns plus words extracted from known names, capped at 2 million
    alterx -l subs/all.txt -enrich -limit 2000000 -silent > subs/perms-raw.txt
    Terminal window
    # dnsgen: classic permutation generator reading known names from a file
    dnsgen subs/all.txt > subs/perms-dnsgen.txt
    Terminal window
    # gotator: depth 1, numbers up to 3, skip duplicate-looking mutations
    gotator -sub subs/all.txt -perm ~/wordlists/perm-words.txt -depth 1 -numbers 3 -mindup -adv -md -silent > subs/perms-gotator.txt

    For perm-words.txt, start with 50 to 200 words: environments (dev, stg, uat), roles (api, admin, internal) and words from the target’s own names.

  5. Resolve the permutations.

    Terminal window
    # Resolve generated names, wildcard-filtered, and keep the live ones
    cat subs/perms-*.txt | sort -u | puredns resolve -r ~/wordlists/resolvers.txt \
    --resolvers-trusted ~/wordlists/resolvers-trusted.txt -w subs/perms.txt
    Terminal window
    # Record the new names
    anew subs/all.txt < subs/perms.txt
  6. Repeat once. New names make new permutations. A second round on only the newly found names often finds a few more. Stop after two rounds; returns drop fast.

Each of these is optional and worth one try per zone. They cost a handful of requests and now and then hand you the whole list.

  1. Zone transfer. A misconfigured authoritative server hands out every record in the zone. Rare, but when it works you can stop brute forcing.

    Terminal window
    # Ask each authoritative nameserver for a full zone transfer
    for ns in $(dig +short NS example.com); do dig AXFR @"$ns" example.com; done

    A real transfer prints dozens of records. Transfer failed or an empty answer is the normal, secure case.

  2. NSEC and NSEC3 walking. A DNSSEC-signed zone that uses NSEC answers a nonexistent name with the next name that does exist, so you can walk the whole zone without guessing. NSEC3 hashes the names, so you capture the hashes and crack them offline.

    Terminal window
    # Walk an NSEC-signed zone
    ldns-walk example.com
    Terminal window
    # Enumerate NSEC/NSEC3 records, then crack NSEC3 hashes with nsec3walker or hashcat
    nsec3map -o dns/nsec3.txt example.com
  3. Virtual host brute force. A name can exist only as a Host header on a shared IP, with no DNS record at all. The method lives in phase 11; run it once you have origin IPs from phase 4.

  • subs/all.txt now holds passive, brute force and permutation names. Phase 4 resolves all of it and records IPs and CNAMEs.
  • subs/brute.txt and subs/perms.txt are worth tagging in your notes. Names found only by active methods are the ones other hunters’ passive pipelines missed.
  • Using a home connection. Millions of DNS queries can knock your router over and get your ISP’s attention.
  • Skipping resolver refresh, then chasing hundreds of fake subdomains.
  • Running alterx with no -limit on 20,000 seeds and generating hundreds of millions of names.
  • Brute forcing a wildcard zone with a tool that does not filter wildcards.
  • Brute forcing on a program that bans automated testing.
What to look for
  • Names found only by brute force or permutation, such as api-internal next to a known api
  • Numbered siblings: app2, app3 where only app was public
  • Environment variants of high-value hosts: admin-staging, payments-uat
  • Deep names like dev.api.eu.example.com that hint at an internal naming scheme

Next, resolve every name and drop CDN addresses in phase 4.

Connections1 backlink · 2 outgoingFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Recon AtlasFor authorized testing only. Your scope is the map edge.