Skip to content
PHASE 02/16OP ECHO

Subdomain enumeration, passive

Noise
Passive
Reads
org/domains.txt
Writes
subs/passive.txtsubs/all.txt
6 min readRecon Atlas

A name you never list is a host nobody tests. Build the biggest list of subdomain names you can from third-party data: Certificate Transparency logs, passive DNS databases, search engines, code search and scan indexes. None of these tools contact the target, so you can run them on any program.

Passive results include dead names. That is fine. Phase 4 sorts live from dead.

Tool Noise Strength Status
Subfinder Passive Fast, many sources, easy API key config Maintained
Amass enum Passive Deepest source coverage, graph database of results Maintained, CLI changed in v4 and v5
Assetfinder Passive Tiny, pipes well Works, rarely updated
Findomain Passive Fast Rust binary Maintained
Chaos Passive ProjectDiscovery’s dataset for bug bounty programs Maintained, needs a free key
github-subdomains Passive Names mentioned in public GitHub code Maintained
uncover Passive Queries Shodan, Censys, FOFA and others from one CLI Maintained
shosubgo Passive Subdomains Shodan has seen for a domain, needs a Shodan key Maintained
AlienVault OTX Passive Passive DNS and URLs from the Open Threat Exchange, free Online service
BeVigil Passive Subdomains and URLs pulled out of the company’s mobile apps Online service, free tier
crt.sh Passive Certificate Transparency, free, no key Online service, slow at times
Sublist3r Passive Historical favourite Old and mostly unmaintained. Subfinder covers its sources
Source What you get What you do not get Tool
Certificate Transparency Every name a public certificate authority (CA) put on a certificate Hosts that never requested a public certificate: internal VPN, plain HTTP, SSH Subfinder, crt.sh
Passive DNS Names resolvers actually answered, with first-seen and last-seen dates Bulk history, unless you pay SecurityTrails, VirusTotal, or DNSDB SecurityTrails, VirusTotal, DNSDB
Public code Staging URLs and CI hosts pasted into scripts Mock hostnames and sample configs that were never registered github-subdomains
Internet-wide scans Names from TLS (encrypted connection) handshakes and HTTP responses the scanners stored Anything that does not answer on a port those scanners touch uncover, Shodan, Censys
Curated bounty sets A ready list for programs Chaos already tracks New names on a mature program. Other hunters already pulled the same set Chaos

Subfinder is the default aggregator. -all adds the slow sources a quick run skips. Run Amass when you want it to walk archived HTML for names the API tools never indexed. That run is slow and heavy on memory. Query crt.sh yourself when an API quota dies or you suspect the aggregator dropped names. Use github-subdomains with a personal access token when you are hunting staging names in code. Use uncover when the name exists only in a banner or a certificate a scanner stored.

{
"issuer_name": "C=US, O=Let's Encrypt, CN=R3",
"common_name": "dev-api.example.com",
"name_value": "dev-api.example.com\napi-v2-dev.example.com",
"id": 1827409123,
"entry_timestamp": "2024-03-12T14:22:01.450"
}

A public log recorded that a CA issued a certificate for dev-api.example.com and api-v2-dev.example.com on 12 March 2024. It does not mean either name resolves today, that a server is up, or that Example Inc still holds the domain.

Domain: vpn-backup.example.com
Record Type: A
Value: 203.0.113.77
First Seen: 2022-11-04
Last Seen: 2023-06-19
Source: Recursive Resolver Telemetry

Some resolver saw vpn-backup.example.com answer 203.0.113.77 between November 2022 and June 2023. It does not mean that name still points there, or that the address still belongs to Example Inc.

# Leaked in .github/workflows/deploy.yml
env:
STAGING_GATEWAY: "https://internal-metrics.example.com"
AUTH_SERVICE: "https://auth-qa.example.com"

Someone committed those strings. It does not mean either name was ever in public DNS. The line can be a plan that never shipped, or a split-horizon name you cannot resolve from the internet.

Unauthenticated calls to free endpoints get rate-limited or stuck on a Cloudflare captcha. Keys for Chaos, Shodan, Censys, and SecurityTrails take setup time and return fuller lists that finish.

CT shows *.internal.example.com. You strip the star, add internal.example.com, and resolve it:

Terminal window
dig +short internal.example.com
# empty

The certificate covered customer tenants or pods. Nobody ever published an A or AAAA for the apex.

Passive DNS still lists ideas.example.com as a CNAME to example.uservoice.com from 2018. Live DNS is NXDOMAIN. The UserVoice contract ended and the CNAME was deleted. There is nothing to probe unless the CNAME is still in live DNS.

GitHub search hits sandbox-billing-db.example.com inside client_test.go. The label looks expensive. It was a string in a unit test. Nobody created the DNS record.

A search cache still has example-store.com and a pile of product URLs. The company sold that brand three years ago. The name now points at a broker’s parking page.

  1. Subfinder with every source. -all uses every source, including slow ones. With API keys configured, this is usually your biggest single list.

    Terminal window
    # Enumerate subdomains for every root domain using all sources
    subfinder -dL org/domains.txt -all -silent -o subs/subfinder.txt

    Subfinder reads provider keys from ~/.config/subfinder/provider-config.yaml, and AlienVault OTX works with no key at all. The full file, including the Shodan and Censys entries, is in field kit setup. Confirm the sources it will actually query:

    Terminal window
    # Show which sources subfinder sees as configured
    subfinder -ls
  2. Amass. Amass stores results in a local database, then you query names out of it. In v5, enum runs without active techniques unless you pass -active.

    Terminal window
    # Run an Amass enumeration for one root domain (no -active flag)
    amass enum -d example.com
    Terminal window
    # Print the subdomain names Amass has stored for that domain
    amass subs -names -d example.com > subs/amass.txt
  3. Small fast tools. They overlap with Subfinder but each one finds a few names the others miss.

    Terminal window
    # Assetfinder: subdomains only, no related domains
    assetfinder --subs-only example.com > subs/assetfinder.txt
    Terminal window
    # Findomain: quiet mode prints only subdomains
    findomain -t example.com -q > subs/findomain.txt
    Terminal window
    # Chaos dataset (reads PDCP_API_KEY)
    chaos -d example.com -silent > subs/chaos.txt
    Terminal window
    # shosubgo: subdomains Shodan has indexed for the domain
    shosubgo -d example.com -s "$SHODAN_API_KEY" > subs/shosubgo.txt
    Terminal window
    # AlienVault OTX passive DNS, no key needed
    curl -s "https://otx.alienvault.com/api/v1/indicators/domain/example.com/passive_dns" | jq -r '.passive_dns[].hostname' | sort -u > subs/otx.txt

    BeVigil indexes names and URLs taken apart from the company’s published mobile apps, which is a source none of the DNS or certificate tools reach. Query it from its web UI or API with a free key when the target ships an app.

  4. Certificate Transparency directly. Useful as a cross-check and when your API quotas run out.

    Terminal window
    # Pull every name crt.sh has seen for the domain, strip wildcards
    curl -s "https://crt.sh/?q=%25.example.com&output=json" | jq -r '.[].name_value' | tr '[:upper:]' '[:lower:]' | sed 's/^\*\.//' | sort -u > subs/crtsh.txt

    When the JSON endpoint rate-limits or returns 502, query crt.sh’s Postgres database directly. It is the same data, usually faster, and it never serves a captcha.

    Terminal window
    # Same names straight from the crt.sh Postgres mirror
    psql -h crt.sh -p 5432 -U guest certwatch -At -c \
    "SELECT ci.name_value FROM certificate_identity ci WHERE reverse(lower(ci.name_value)) LIKE reverse(lower('%.example.com'));" \
    | tr '[:upper:]' '[:lower:]' | sed 's/^\*\.//' | sort -u > subs/crtsh-pg.txt
  5. GitHub code. Developers paste hostnames into configs, CI files and READMEs.

    Terminal window
    # Search public GitHub code for subdomains of the target
    github-subdomains -d example.com -t "$GITHUB_TOKEN" -o subs/github.txt
  6. Scan indexes through uncover. These return hosts that internet scanners saw serving the target’s certificates.

    Terminal window
    # Ask Shodan and Censys for hosts with the domain in TLS data, print hostnames
    uncover -q 'ssl:"example.com"' -e shodan,censys -f host -silent > subs/uncover.txt
  7. Merge, clean and record. Keep only names under your root domains, lowercase them, and add new ones to the master list.

    Terminal window
    # Merge every source, keep names under example.com, dedupe
    cat subs/subfinder.txt subs/amass.txt subs/assetfinder.txt subs/findomain.txt subs/chaos.txt subs/shosubgo.txt subs/otx.txt subs/crtsh.txt subs/crtsh-pg.txt subs/github.txt subs/uncover.txt 2>/dev/null \
    | tr '[:upper:]' '[:lower:]' | grep -E '(^|\.)example\.com$' | sort -u > subs/passive.txt
    Terminal window
    # Append only new names to the master list and print them
    anew subs/all.txt < subs/passive.txt
  • subs/all.txt is the seed for permutations and brute force in phase 3.
  • subs/all.txt goes straight into resolution in phase 4 if the program bans active DNS work.
  • The word list you can extract from subs/all.txt (dev, staging, api-v2) shapes the permutation patterns next.
  • Running Subfinder without API keys and concluding the target is small.
  • Forgetting -all, which skips slower but valuable sources.
  • Keeping out-of-scope names in the list, then probing them later by accident.
  • Trusting Sublist3r alone because an old tutorial used it.
  • Treating passive output as live hosts. Many names are years old.
  • Throwing away a name that showed up in only one source. A single GitHub hit or one old certificate is often the host nobody else tested.
What to look for
  • Environment words: dev, stage, staging, uat, qa, test, sandbox, preprod
  • Internal tool names: jenkins, gitlab, jira, grafana, kibana, sonar, vault, argo
  • Version and legacy markers: old, legacy, v1, beta, 2019
  • Regional or customer-specific hosts: eu-west, customer-acme, partner
  • Names that appear in only one source, especially GitHub or certificates

Next, guess the names no source recorded with brute force and permutations in phase 3.

Connections4 backlinks · 3 outgoing · 1 cross-guideFull 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.