⬡ Recon · Step 1

Subdomain Enumeration Automation

Every penetration test and bug bounty engagement begins with one question: what does the target actually own? Subdomain enumeration answers it — and it is the foundation the entire recon pipeline builds on. Miss a subdomain and you miss everything behind it. This guide covers passive versus active enumeration, how to chain Subfinder, Amass, and Assetfinder into one automated discovery workflow, and how PhantomRed runs it for you.

PhantomRed Academy · Recon Series · Updated June 2026

Why Manual Subdomain Enumeration Breaks

Subdomain discovery looks simple — run a tool, get a list. In practice, doing it well means running several tools, each with different sources and blind spots, then reconciling their output. Done manually, this falls apart in three ways.

FAILURE 01
Single-Source Blindness
No single tool sees every subdomain. Rely on one and you miss the names that only show up in certificate logs, or only via DNS brute force. Coverage gaps become exploitable blind spots.
FAILURE 02
Stale Snapshots
A manual run captures the target as it was that day. New subdomains spin up constantly — staging, dev, acquired infrastructure — and a one-off list goes out of date almost immediately.
FAILURE 03
Messy Merging
Running three tools means three output files in three formats, full of duplicates. Manually merging and deduplicating is tedious and a frequent source of dropped hosts.

Automation runs the full toolset together, merges and deduplicates the output, and can re-run on a schedule — turning a stale snapshot into a live, complete asset inventory.

How Automation Improves Subdomain Discovery

The goal of enumeration is completeness — finding every name an attacker could find, before they do. Automation is what makes completeness achievable at scale.

Passive vs Active Enumeration

Passive enumeration pulls subdomains from third-party sources — certificate transparency logs, search engines, DNS aggregators — without touching the target. Active enumeration queries the target's own DNS directly, including brute-forcing candidate names. Passive is stealthy and fast; active finds internal names that exist nowhere public. A complete workflow runs both.

Multi-Tool Coverage

Subfinder, Amass, and Assetfinder each draw from overlapping but distinct source sets. Running all three and merging the results consistently finds more than any one alone — automation makes that practical instead of painful.

Clean Handoff

Automated enumeration ends with one deduplicated list, ready to pipe straight into httpx for live-host probing. No reformatting, no manual cleanup between phases.

Why This Matters The single most common cause of an incomplete assessment is a subdomain that was never discovered. Everything downstream — probing, scanning, exploitation — can only act on assets enumeration found. Get this phase right and the rest of the pipeline has something complete to work with.

Example Subdomain Enumeration Workflow

This workflow runs three enumeration tools, merges and deduplicates their output, then hands the unified list to httpx — the next phase in the chain. Each tool contributes names the others miss.

bash Phase 1 — Passive Enumeration (Subfinder)
# Define target and output directory
TARGET="example.com"
mkdir -p recon/$TARGET

# Subfinder — fast passive discovery from 40+ sources
/opt/homebrew/bin/subfinder \
  -d $TARGET \
  -all \
  -silent \
  -o recon/$TARGET/subfinder.txt

# Output: subfinder.txt — passive subdomain list
bash Phase 2 — Active + CT Logs (Amass)
# Amass — certificate transparency + active enumeration
/opt/homebrew/bin/amass enum \
  -passive \
  -d $TARGET \
  -o recon/$TARGET/amass.txt

# Assetfinder — lightweight extra source coverage
/opt/homebrew/bin/assetfinder \
  --subs-only $TARGET \
  > recon/$TARGET/assetfinder.txt

# Output: two more lists from different source sets
bash Phase 3 — Merge, Dedupe & Hand Off
# Merge all three sources into one unique list
cat recon/$TARGET/subfinder.txt \
    recon/$TARGET/amass.txt \
    recon/$TARGET/assetfinder.txt \
  | sort -u > recon/$TARGET/all-subs.txt

# Hand off straight to httpx for live-host probing
cat recon/$TARGET/all-subs.txt \
  | /opt/homebrew/bin/httpx -silent -title -tech-detect \
  -o recon/$TARGET/live-hosts.txt

# Output: all-subs.txt (complete) + live-hosts.txt (probed)
Operational Note Passive enumeration is safe to run broadly — it never touches the target. Active enumeration and DNS brute forcing generate traffic to the target's infrastructure, so confirm it is within your authorized scope before enabling it. When in doubt, run passive only.

Subdomain Enumeration Tool Reference

Each tool earns its place by covering sources the others miss. The strongest result comes from running all three and merging.

Tool Type Notes
subfinder Passive -d target.com -all -silent — fast, draws from 40+ passive sources; the everyday workhorse
amass Passive + Active enum -d target.com — certificate transparency, DNS brute force, deeper but slower
assetfinder Passive --subs-only target.com — lightweight, pulls from additional sources for extra coverage
httpx Handoff Next phase — filters the merged list to live hosts and fingerprints them

How PhantomRed Automates Subdomain Enumeration

PhantomRed runs subdomain enumeration as the opening phase of every scan — executing the full toolset, merging and deduplicating the results, and handing a clean list to the probing phase automatically. No tool juggling, no manual merge.

Within the platform pipeline, enumeration delivers:

Enumeration is step one of the full chain — see how it feeds the rest on the autonomous penetration testing page, or generate a custom workflow with the recon workflow generator.

Benefits of Automated Subdomain Enumeration

Related Recon Resources

Explore connected techniques in the PhantomRed Academy workflow library.

Frequently Asked Questions

Discover Every Asset Automatically

PhantomRed runs subdomain enumeration, probing, scanning, and validation in one coordinated scan — starting with complete asset discovery.

Start Free Scan →