
Recon Part 1: Passive Recon and Subdomain Enumeration
Most people start bug bounty wrong. They open a famous program’s homepage and poke the login form that ten thousand other hunters already poked. A week later they have nothing and quit, convinced the field is saturated. It is not. They skipped the step every real hunter spends most of their time on, and it is not exploitation. It is reconnaissance.
Recon is big enough that we are splitting it across three parts:
- Part 1, today: passive recon and subdomain enumeration, finding the target’s assets without touching them
- Part 2: active recon, live hosts, DNS, port scanning with nmap, and technology fingerprinting
- Part 3: content discovery, parameter mining, JavaScript secret hunting, and turning the map into attack surface
This is Part 1 of the recon block and the real Day 1 of the series. By the end you will have actual commands, a real subdomain list, and a disclosed report that shows exactly why passive recon pays.
One hard rule for the entire series. You only test what a program’s scope allows, or systems you own. Passive recon on public data is fine anywhere, because you never touch the target. Active recon, which starts in Part 2, only happens inside scope. That line is what separates a hunter from a criminal, and it never moves.
Why recon is the whole game
The bug is almost never on the page everyone is looking at. It is on the forgotten subdomain, the old API version, the staging box someone left exposed, the acquired company’s infrastructure that got bolted on and never secured.
A real example you can read right now. A hunter reported a subdomain takeover on Ford, where one of ford.com’s subdomains pointed to an Azure resource with an unclaimed CNAME, meaning anyone could claim that subdomain. Full disclosed report: https://hackerone.com/reports/484420
Nobody found that by staring at ford.com. They found it by enumerating Ford’s subdomains and checking where each one pointed. That is recon, and that is the bug. The exploit was almost trivial once the dangling subdomain was discovered. Finding it was the whole skill.
That is the pattern for this series: two hunters with identical exploitation skill get wildly different results based purely on who mapped more surface. You are not competing on who can exploit a bug. You are competing on who found the asset that had one. Passive recon, today, is how you find more assets than the next hunter.
Step 0: read the scope first
Before any tool, open the program’s policy page and read it fully. Write these into a notes file for the target:
TARGET: example.com
In scope: *.example.com, api.example.com
Out of scope: blog.example.com, third-party SaaS
Severity: accepted classes
Rules: rate limits, scanning allowed?, test accounts
The scope is your legal authorization and your treasure map at once. A wildcard like *.example.com is an open invitation to enumerate every subdomain. Out of scope assets stay off limits no matter what you find.
Part 1a: subdomain enumeration from certificate transparency
Every TLS certificate issued on the internet is logged in public certificate transparency logs, and each certificate names the domains it covers. That means the public record already lists most of a company’s subdomains, including internal sounding ones, with zero interaction.
Pull from crt.sh:
# every subdomain ever named in a cert for the target
curl -s "https://crt.sh/?q=%25.example.com&output=json" \
| jq -r '.[].name_value' \
| sed 's/\*\.//g' \
| sort -u > ct_subs.txt
wc -l ct_subs.txt
The %25 is a URL-encoded %, the wildcard crt.sh uses. One command, often hundreds of subdomains, and the target never saw you.
Part 1b: aggregate passive sources
Many providers collect passive DNS and subdomain data. Instead of querying each, use a tool that queries all of them at once.
subfinder, passive mode:
# pulls from dozens of passive providers, no direct contact
subfinder -d example.com -silent -all > subfinder_subs.txt
wc -l subfinder_subs.txt
amass, passive mode, for a second opinion:
# amass has a different provider set, so it finds different subs
amass enum -passive -d example.com -silent > amass_subs.txt
Merge everything into one master list:
cat ct_subs.txt subfinder_subs.txt amass_subs.txt | sort -u > all_subs.txt
wc -l all_subs.txt
This all_subs.txt is your passive subdomain map. The target still has not received a single packet from you.
Part 1c: JavaScript and URL history recon (still passive)
Public archives have crawled and stored the target for years. Old pages and old JavaScript files name endpoints and subdomains that are no longer linked anywhere but often still work.
Pull historical URLs from public archives:
# gau = get all urls, from wayback, commoncrawl, etc. (passive)
gau example.com > gau_urls.txt
wc -l gau_urls.txt
# waybackurls is an alternative source
echo example.com | waybackurls > wayback_urls.txt
Extract JavaScript files, they are a goldmine of endpoints:
cat gau_urls.txt wayback_urls.txt | sort -u \
| grep -iE '\.js(\?|$)' | sort -u > js_files.txt
wc -l js_files.txt
Mine those URLs for extra subdomains you might have missed:
# pull any *.example.com hostnames out of the historical URLs
cat gau_urls.txt wayback_urls.txt \
| grep -oE 'https?://[a-zA-Z0-9._-]+\.example\.com' \
| sed -E 's#https?://##' | sort -u > js_subs.txt
# fold them back into the master list
cat all_subs.txt js_subs.txt | sort -u -o all_subs.txt
wc -l all_subs.txt
JS recon regularly surfaces API hosts and internal endpoints that no subdomain tool found, because they only ever appeared inside a script, never in DNS brute lists.
Part 1d: search engine recon (dorking, passive)
Search engines already crawled the target. Advanced operators surface exposed files, login portals, and pages the company forgot were public. Run these in a browser, they touch the search engine, not the target:
site:example.com -www # subdomains and sections beyond www
site:example.com ext:pdf OR ext:xls # exposed documents
site:example.com inurl:admin # admin panels
site:example.com intitle:“index of” # open directory listings
site:example.com inurl:api # API surfaces
A human writing a dork with intent finds things no automated scanner will.
The output of Part 1: a passive asset map
Recon is not a one time step, it is an artifact you grow:
target/
scope.txt # engagement header
ct_subs.txt # from certificate transparency
all_subs.txt # merged passive subdomain list
js_files.txt # JS files to mine in Part 3
gau_urls.txt # historical URL corpus
Part 1 mindset: you are not hunting bugs yet, and you have not touched the target. You have built a silent map of its surface. Everything in Part 2 and Part 3 operates on this map.
One early win you can check now
Before moving on, look at where your subdomains point. A dangling DNS record, a subdomain aimed at a service that no longer exists, is a subdomain takeover, the exact Ford bug class. The WebSummit report is a clean example: a forgotten DNS entry pointed at a non existent S3 bucket, the hunter created a bucket with that name and proved takeover. Report: https://hackerone.com/reports/193056
We confirm takeovers properly with active DNS checks in Part 2. For now, just note any subdomain whose name sounds abandoned, those are your first leads.
Tools to install before Part 2
go install github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
go install github.com/owasp-amass/amass/v4/...@master
go install github.com/lc/gau/v2/cmd/gau@latest
go install github.com/tomnomnom/waybackurls@latest
# plus: jq, curl (already on most systems)
Homework for Part 1
- Pick one program with a wildcard scope and read its full policy. Write your scope header.
- Build
ct_subs.txt from crt.sh for the main domain.
- Run subfinder and amass in passive mode, then merge everything into
all_subs.txt.
- Run gau and waybackurls, extract
js_files.txt, and mine the URLs for any extra subdomains to fold back in.
- Run the five search dorks above and note anything exposed.
- Read both disclosed reports: Ford (https://hackerone.com/reports/484420) and WebSummit (https://hackerone.com/reports/193056). For each, note the one recon step that surfaced the bug.
By the end you have a target folder with a scope header and a passive asset map, built without touching the target once.
Part 2 goes active, inside scope: resolving which hosts are actually alive, DNS enumeration, port scanning with nmap, and technology fingerprinting, turning this silent list into a live, detailed map.