Subdomains dramatically expand attack surface. A company might have a well-hardened www.target.com but a forgotten dev.target.com running an unpatched admin panel. Combine passive, active, and cloud-based discovery for maximum coverage.
Passive Techniques (No Traffic to Target)
Certificate Transparency
# crt.sh via JSON
curl -s "https://crt.sh/?q=TARGET.com&output=json" | jq -r '.[].name_value' | sed 's/\*\.//g' | sort -uEvery public TLS certificate ever issued for the domain — subdomains, wildcard entries, legacy names.
Third-Party APIs
# subfinder (uses many APIs — Virustotal, Shodan, Censys, etc.)
subfinder -d TARGET.com -silent
# amass passive
amass enum -passive -d TARGET.com
# assetfinder
assetfinder --subs-only TARGET.comEach tool queries different data sources. Running all three and merging catches subdomains no single tool would find.
Search Engines
site:*.TARGET.com -site:www.TARGET.com
Google / DuckDuckGo / Bing dorks reveal indexed subdomains.
DNS Aggregators
- SecurityTrails (free tier)
- VirusTotal
- HackerTarget
- DNSdumpster
Many have free web interfaces for quick lookups.
Active Techniques (Sends Traffic)
DNS Brute Force
# gobuster
gobuster dns -d TARGET.com -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt
# puredns — much faster
puredns bruteforce subdomains.txt TARGET.com -r resolvers.txt
# dnsrecon
dnsrecon -d TARGET.com -D wordlist.txt -t brtZone Transfer (if misconfigured)
for ns in $(dig +short NS TARGET.com); do
dig axfr @$ns TARGET.com
doneReverse DNS on Netblock
If you know the company’s IP range:
dnsrecon -r 10.0.0.0/24vHost Fuzzing
Subdomain might not exist in DNS but the web server still responds to a Host header for it:
ffuf -w wordlist.txt:FUZZ \
-u http://IP \
-H "Host: FUZZ.TARGET.com" \
-fs <baseline_size>Filter out the “default site” baseline — what’s left is a vhost.
Cloud Subdomain Discovery
Many orgs host subdomains on cloud services with predictable patterns:
# cloud_enum
cloud_enum -k TARGET
cloud_enum -k target-dev -k target-prod -k target-stagingChecks:
- AWS S3 buckets (
TARGET.s3.amazonaws.com) - Azure blobs (
TARGET.blob.core.windows.net) - GCS buckets (
storage.googleapis.com/TARGET) - Various DNS patterns per cloud
Open buckets leak huge amounts of data — backups, config files, user data.
Subdomain Takeover
Some subdomains point via CNAME to third-party services (GitHub Pages, Heroku, S3). If the subdomain still exists in DNS but the backing service has been deleted, an attacker can register the service name and take over the subdomain.
Detection
# subzy
subzy run --targets subdomains.txt
# subjack
subjack -w subdomains.txt -t 100 -timeout 30 -ssl -c fingerprints.jsonCommon Vulnerable Services
| CNAME Pattern | Service |
|---|---|
*.github.io | GitHub Pages |
*.herokuapp.com | Heroku |
*.s3.amazonaws.com | AWS S3 |
*.wordpress.com | WordPress.com |
*.readme.io | ReadMe |
*.netlify.app | Netlify |
*.pantheonsite.io | Pantheon |
Each service has its own “unclaimed” response that indicates takeover is possible.
Confirming Live Subdomains
After discovery, filter to only live hosts:
# httpx
cat all-subdomains.txt | httpx -silent -status-code -title
# or httprobe
cat all-subdomains.txt | httprobeLive-and-responsive subdomains are the actual attack surface. Dead ones can be ignored (except if they’re vulnerable to takeover).
Deduplication & Workflow
# combine all tools' output
subfinder -d TARGET.com -silent > subs.txt
amass enum -passive -d TARGET.com >> subs.txt
curl -s "https://crt.sh/?q=TARGET.com&output=json" | jq -r '.[].name_value' | sed 's/\*\.//g' >> subs.txt
puredns resolve subs.txt -r resolvers.txt | sort -u > live-subs.txt
# check which are HTTP-reachable
cat live-subs.txt | httpx -silent -status-code -title -tech-detect > web-subs.txtEnd result: a list of live subdomains with status codes, titles, and tech fingerprints — ready to prioritize for deep testing.
Related Recon
Subdomain discovery often reveals:
- Internal naming conventions (
dev-foo,stg-foo,prod-foo→ you know the pattern) - Service providers (subdomain pointing to Salesforce, Zendesk, etc.)
- Testing environments (
test,qa,staging— often less protected) - Admin interfaces (
admin,backoffice,internal— high-value targets)
