Subdomain Enumeration: A Complete Guide to the Essential Tools
Subdomain Enumeration: A Complete Guide to the Essential Tools
Subdomain enumeration is one of the most critical phases of reconnaissance. It expands the attack surface, reveals forgotten or misconfigured assets, and often uncovers the entry point that leads to a full compromise. Whether you are a bug bounty hunter, penetration tester, or red teamer, having the right subdomain enumeration tools in your arsenal is essential.
This guide covers over 40 tools, from passive discovery to active brute‑forcing, permutation, certificate transparency, and API‑based enumeration. Each tool is presented with its purpose, installation methods, basic usage, and guidance on when to use it.
⚠️ Legal and ethical notice: Subdomain enumeration queries public data sources and sometimes sends DNS queries to target infrastructure. Only enumerate domains you own or have explicit written authorization to test. Unauthorized reconnaissance may violate laws and terms of service.
Table of Contents
- Why Subdomain Enumeration Matters
- Passive Enumeration Tools
- Active Brute‑Forcing & Resolution
- Permutation & Mutation
- Certificate Transparency & SSL
- API‑Based Tools
- All‑in‑One Frameworks
- Reverse DNS & IP Mapping
- Specialized Resources
- Comparison Table
- Best Practices & Workflow
- Final Tips
Why Subdomain Enumeration Matters
A single organization may own hundreds or thousands of subdomains. Many are forgotten, misconfigured, or running outdated software. Discovering them is the first step toward understanding the full attack surface. Subdomain enumeration helps you:
- Identify development, staging, and legacy systems
- Find exposed admin panels, APIs, and databases
- Uncover assets that bypass main‑domain security controls
- Map the organization’s digital footprint for comprehensive testing
Passive Enumeration Tools
Passive tools gather subdomains from third‑party sources without sending any traffic to the target. They are fast, stealthy, and safe to use even without direct authorization (though you should still respect scope).
Sublist3r
Fast subdomain enumeration tool for penetration testers.
Sublist3r queries multiple search engines and data sources (Google, Bing, Yahoo, Baidu, Ask, Netcraft, VirusTotal, ThreatCrowd, DNSdumpster, ReverseDNS) to discover subdomains.
Installation:
git clone https://github.com/aboul3la/Sublist3r.gitcd Sublist3rpip install -r requirements.txt
Basic Usage:
python sublist3r.py -d example.compython sublist3r.py -d example.com -o subdomains.txtpython sublist3r.py -d example.com -b -p 80,443 # bruteforce + port scan
When to use: Quick passive enumeration with a simple interface. Good for beginners.
Amass (Passive Mode)
In‑depth attack surface mapping and asset discovery.
Amass is a comprehensive framework that aggregates data from over 80 sources. Its passive mode is ideal for stealthy reconnaissance.
Installation:
sudo apt install amass # Kali/Debiango install -v github.com/owasp-amass/amass/v4/...@master
Basic Usage:
amass enum -passive -d example.com -o subdomains.txtamass enum -passive -d example.com -src # show sources
When to use: Comprehensive passive coverage; integrates with a graph database.
Findomain
The fastest and cross‑platform subdomain enumerator.
Findomain is written in Rust and supports multiple sources including CertSpotter, crt.sh, VirusTotal, and more.
Installation:
# Download binary from GitHub releaseswget https://github.com/Findomain/Findomain/releases/latest/download/findomain-linuxchmod +x findomain-linuxsudo mv findomain-linux /usr/local/bin/findomain
Basic Usage:
findomain -t example.comfindomain -t example.com -o subdomains.txtfindomain -f domains.txt -o all_subdomains.txt
When to use: Fast, cross‑platform, and easy to automate.
Sudomy
Subdomain enumeration and automated reconnaissance for bug hunting.
Sudomy bundles many passive sources and performs analysis, including screenshotting and port scanning.
Installation:
git clone https://github.com/screetsec/Sudomy.gitcd Sudomypip install -r requirements.txt
Basic Usage:
./sudomy -d example.com./sudomy -d example.com -o results/
When to use: When you want enumeration plus light‑weight analysis in one tool.
Subfinder
Fast passive subdomain discovery tool.
Subfinder is a ProjectDiscovery tool that queries a curated list of passive sources.
Installation:
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest# orsudo apt install subfinder
Basic Usage:
subfinder -d example.comsubfinder -d example.com -o subdomains.txtsubfinder -dL domains.txt -o all_subs.txt
When to use: The go‑to tool for quick passive enumeration, often paired with httpx.
Assetfinder
Find domains and subdomains related to a given domain.
Assetfinder uses sources like crt.sh, certspotter, and Facebook’s certificate transparency.
Installation:
go install github.com/tomnomnom/assetfinder@latest
Basic Usage:
assetfinder example.comassetfinder --subs-only example.com
When to use: Minimalist, fast, and works well in pipelines.
chaos-client
Go client to communicate with the Chaos DNS API.
Chaos is a ProjectDiscovery service that maintains a public DNS dataset.
Installation:
go install github.com/projectdiscovery/chaos-client/cmd/chaos@latest
Basic Usage:
chaos -d example.com
When to use: When you have a Chaos API key and want access to their curated dataset.
crtndstry
Yet another subdomain finder.
A simple tool that queries crt.sh for subdomains.
Installation:
go install github.com/n4xm/crtndstry@latest
Basic Usage:
crtndstry example.com
When to use: Lightweight certificate transparency lookups.
subdominator
Fast and powerful subdomain enumeration (50+ passive sources).
Subdominator aggregates results from many passive sources and is designed for speed.
Installation:
go install github.com/RevoltSecurities/Subdominator@latest
Basic Usage:
subdominator -d example.com
When to use: When you need maximum passive coverage from a single tool.
tugarecon
Fast subdomain enumeration tool for penetration testers.
Tugarecon combines multiple passive sources with a simple interface.
Installation:
git clone https://github.com/masasron/tugareconcd tugareconpip install -r requirements.txt
Basic Usage:
python tugarecon.py -d example.com
When to use: Alternative to Sublist3r with a slightly different source set.
domained
Multi‑tool subdomain enumeration.
Domained wraps several other tools (Sublist3r, Amass, etc.) into a single interface.
Installation:
git clone https://github.com/TypeError/domainedcd domainedpip install -r requirements.txt
Basic Usage:
python domained.py -d example.com
When to use: When you want to run multiple passive tools in one go.
Substr3am
Passive reconnaissance/enumeration by watching for SSL certificates being issued.
Substr3am monitors certificate transparency logs in real time and notifies you of new subdomains.
Installation:
git clone https://github.com/nexxai/Substr3amcd Substr3ampip install -r requirements.txt
Basic Usage:
python substr3am.py -d example.com
When to use: Continuous monitoring for new subdomains as certificates are issued.
cero
Scrape domain names from SSL certificates of arbitrary hosts.
Cero connects to hosts and extracts domain names from their SSL certificates.
Installation:
go install github.com/glebarez/cero@latest
Basic Usage:
cero example.com
When to use: When you have a list of IPs and want to find associated domains.
shosubgo
Small tool to grab subdomains using Shodan API.
Shosubgo queries Shodan for subdomains of a given domain.
Installation:
go install github.com/incidrthreat/shosubgo@latest
Basic Usage:
shosubgo -d example.com -s YOUR_SHODAN_API_KEY
When to use: If you have a Shodan API key and want to leverage its data.
haktrails
Golang client for querying SecurityTrails API data.
Haktrails queries SecurityTrails for subdomains, associated domains, and more.
Installation:
go install github.com/hakluke/haktrails@latest
Basic Usage:
haktrails subdomains example.com -k YOUR_API_KEY
When to use: When you have a SecurityTrails API key.
github-subdomains
Searches GitHub and parses results to find subdomains.
This tool searches GitHub code for the target domain and extracts subdomains.
Installation:
go install github.com/gwen001/github-subdomains@latest
Basic Usage:
github-subdomains -d example.com -t YOUR_GITHUB_TOKEN
When to use: To find subdomains leaked in public code repositories.
gitlab-subdomains
Searches GitLab and parses results to find subdomains.
Similar to github-subdomains but for GitLab.
Installation:
go install github.com/gwen001/gitlab-subdomains@latest
Basic Usage:
gitlab-subdomains -d example.com -t YOUR_GITLAB_TOKEN
When to use: For GitLab‑hosted code leaks.
csprecon
Discover new target domains using Content Security Policy.
CSP headers often list allowed domains, which can reveal subdomains.
Installation:
go install github.com/edoardottt/csprecon@latest
Basic Usage:
csprecon -d example.com
When to use: To find subdomains from CSP headers of the main domain.
related-domains
Find related domains of a given domain.
This tool searches for domains registered by the same people/companies.
Installation:
go install github.com/gwen001/related-domains@latest
Basic Usage:
related-domains -d example.com
When to use: To expand scope to other domains owned by the same entity.
Active Brute‑Forcing & Resolution
Active tools send DNS queries directly to the target’s nameservers. They are more thorough but also more detectable.
massdns
High‑performance DNS stub resolver for bulk lookups.
Massdns is a blazing‑fast DNS resolver used by many other tools for brute‑forcing.
Installation:
git clone https://github.com/blechschmidt/massdnscd massdnsmakesudo make install
Basic Usage:
massdns -r resolvers.txt -t A -o S -w results.txt subdomains.txt
When to use: As a backend for tools like shuffledns and puredns.
shuffledns
Wrapper around massdns for active bruteforce and resolution.
Shuffledns combines massdns with wildcard handling and easy input/output.
Installation:
go install -v github.com/projectdiscovery/shuffledns/cmd/shuffledns@latest
Basic Usage:
shuffledns -d example.com -w wordlist.txt -r resolvers.txt -o subdomains.txt
When to use: Active brute‑forcing with wildcard filtering.
puredns
Fast domain resolver and subdomain bruteforcing with accurate wildcard filtering.
Puredns is designed to eliminate false positives from wildcard DNS.
Installation:
go install github.com/d3mondev/puredns/v2@latest
Basic Usage:
puredns bruteforce wordlist.txt example.com -r resolvers.txt -w subdomains.txtpuredns resolve subdomains.txt -r resolvers.txt -w resolved.txt
When to use: When wildcard DNS is present and you need clean results.
dnsx
Fast and multi‑purpose DNS toolkit.
Dnsx allows you to run multiple DNS queries with a list of resolvers.
Installation:
go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest
Basic Usage:
dnsx -d example.com -w wordlist.txt -r resolvers.txt -o subdomains.txtdnsx -l subdomains.txt -a -resp
When to use: Versatile DNS resolution and brute‑forcing.
dns-parallel-prober
Parallelised domain name prober.
This tool finds as many subdomains as possible in parallel.
Installation:
git clone https://github.com/lorenzog/dns-parallel-probercd dns-parallel-proberpip install -r requirements.txt
Basic Usage:
python dns-parallel-prober.py example.com wordlist.txt
When to use: Quick parallel brute‑forcing.
dnscan
Python wordlist‑based DNS subdomain scanner.
Dnscan is a simple, effective brute‑forcer.
Installation:
git clone https://github.com/rbsec/dnscancd dnscanpip install -r requirements.txt
Basic Usage:
python dnscan.py -d example.com -w wordlist.txt
When to use: Basic brute‑forcing when you need a lightweight Python tool.
knock
Knockpy is a Python tool to enumerate subdomains via wordlist.
Knockpy also performs wildcard detection and can use VirusTotal.
Installation:
git clone https://github.com/guelfoweb/knockcd knockpip install -r requirements.txt
Basic Usage:
python knockpy.py example.com
When to use: Another Python alternative with VirusTotal integration.
altdns
Generates permutations, alterations and mutations of subdomains and resolves them.
Altdns creates new subdomain candidates based on patterns (e.g., dev‑, ‑staging) and resolves them.
Installation:
git clone https://github.com/infosec-au/altdnscd altdnspip install -r requirements.txt
Basic Usage:
altdns -i subdomains.txt -o data_output -w words.txt -r -s results.txt
When to use: To discover subdomains that follow naming patterns.
brutesubs
Automation framework for running multiple subdomain bruteforcing tools.
Brutesubs uses Docker Compose to run several tools in parallel.
Installation:
git clone https://github.com/anshumanbh/brutesubscd brutesubs# edit docker-compose.ymldocker-compose up
Basic Usage: Configure and run.
When to use: When you want to run multiple brute‑forcers simultaneously.
Permutation & Mutation
altdns (already covered)
VHostScan
Virtual host scanner that performs reverse lookups.
VHostScan discovers virtual hosts by manipulating the Host header.
Installation:
git clone https://github.com/codingo/VHostScancd VHostScanpip install -r requirements.txt
Basic Usage:
python VHostScan.py -t example.com -w wordlist.txt
When to use: When virtual hosts are configured but not in DNS.
Certificate Transparency & SSL
censys-subdomain-finder
Subdomain enumeration using certificate transparency logs from Censys.
Installation:
git clone https://github.com/christophetd/censys-subdomain-findercd censys-subdomain-finderpip install -r requirements.txt
Basic Usage:
python censys-subdomain-finder.py --censys-api-id ID --censys-api-secret SECRET example.com
When to use: When you have Censys API credentials.
censys-enumeration
Extract subdomains/emails for a given domain using SSL/TLS certificate dataset on Censys.
Installation:
git clone https://github.com/0xbharath/censys-enumerationcd censys-enumerationpip install -r requirements.txt
Basic Usage:
python censys-enumeration.py -d example.com
When to use: For deeper Censys‑based enumeration.
crt.go
Go script to save and analyze subdomain output from crt.sh.
Installation:
go install github.com/glebarez/crt.go@latest
Basic Usage:
crt.go example.com
When to use: Simple, fast crt.sh querying.
API‑Based Tools
Many tools already mentioned use APIs (Shodan, SecurityTrails, Censys, etc.). This section highlights a few more.
chaos-client (already covered)
haktrails (already covered)
shosubgo (already covered)
github-subdomains (already covered)
gitlab-subdomains (already covered)
All‑in‑One Frameworks
bbot
A recursive internet scanner for hackers.
Bbot is a modular, recursive scanner that performs subdomain enumeration, port scanning, and more.
Installation:
pip install bbot
Basic Usage:
bbot -t example.com -f subdomain-enum
When to use: When you want a single tool to handle multiple recon phases.
scilla
Information gathering tool – DNS / Subdomains / Ports / Directories enumeration.
Scilla is a modular information gathering tool.
Installation:
git clone https://github.com/edoardottt/scillacd scillago build
Basic Usage:
./scilla -d example.com
When to use: For a comprehensive but lightweight recon suite.
sub3suite
Research‑grade suite of tools for subdomain enumeration, intelligence gathering, and attack surface mapping.
Sub3suite is a GUI‑based tool with advanced features.
Installation: Download from GitHub releases.
Basic Usage: GUI‑based.
When to use: When you prefer a graphical interface.
Sudomy (already covered)
domained (already covered)
tugarecon (already covered)
Reverse DNS & IP Mapping
hakrevdns
Small, fast tool for performing reverse DNS lookups en masse.
Installation:
go install github.com/hakluke/hakrevdns@latest
Basic Usage:
cat ips.txt | hakrevdns
When to use: When you have a list of IPs and want to find associated hostnames.
hakip2host
Takes a list of IP addresses and returns associated domain names.
Installation:
go install github.com/hakluke/hakip2host@latest
Basic Usage:
cat ips.txt | hakip2host
When to use: Similar to hakrevdns but with additional checks.
Specialized Resources
bugcrowd-levelup-subdomain-enumeration
Repository containing material from the talk "Esoteric sub‑domain enumeration techniques".
This is not a tool but a collection of techniques and resources. Highly recommended reading.
Link: https://github.com/bugcrowd-levelup/subdomain-enumeration
domain – enumall.py
Setup script for Regon‑ng.
Enumall.py is a script that uses Recon‑ng to enumerate subdomains.
Link: https://github.com/landhb/domain
Comparison Table
| Tool | Type | Speed | Best For |
|---|---|---|---|
| Sublist3r | Passive | Medium | Quick passive enumeration |
| Amass | Passive/Active | Slow | Comprehensive mapping |
| Findomain | Passive | Fast | Cross‑platform automation |
| Sudomy | Passive/Active | Medium | Enumeration + analysis |
| Subfinder | Passive | Fast | Pipeline integration |
| Assetfinder | Passive | Fast | Minimalist pipeline |
| chaos-client | API | Fast | Chaos dataset |
| crtndstry | CT | Fast | Simple crt.sh lookups |
| subdominator | Passive | Fast | Maximum passive sources |
| tugarecon | Passive | Medium | Alternative to Sublist3r |
| domained | Passive | Medium | Running multiple tools |
| Substr3am | CT | Real‑time | Monitoring new certs |
| cero | SSL | Fast | Extracting domains from certs |
| shosubgo | API | Fast | Shodan users |
| haktrails | API | Fast | SecurityTrails users |
| github-subdomains | Code | Medium | GitHub leaks |
| gitlab-subdomains | Code | Medium | GitLab leaks |
| csprecon | CSP | Fast | CSP header analysis |
| related-domains | OSINT | Medium | Finding related domains |
| massdns | Active | Very Fast | Bulk DNS resolution |
| shuffledns | Active | Fast | Brute‑forcing with wildcard handling |
| puredns | Active | Fast | Wildcard filtering |
| dnsx | Active | Fast | Multi‑purpose DNS queries |
| dns-parallel-prober | Active | Fast | Parallel brute‑forcing |
| dnscan | Active | Medium | Python brute‑forcing |
| knock | Active | Medium | VirusTotal integration |
| altdns | Permutation | Medium | Pattern‑based discovery |
| brutesubs | Automation | Varies | Running multiple brute‑forcers |
| VHostScan | VHost | Medium | Virtual host discovery |
| censys-subdomain-finder | CT/API | Fast | Censys users |
| censys-enumeration | CT/API | Fast | Censys deep enumeration |
| crt.go | CT | Fast | Go‑based crt.sh |
| bbot | Framework | Medium | All‑in‑one recon |
| scilla | Framework | Medium | Modular information gathering |
| sub3suite | Framework | GUI | Graphical interface |
| hakrevdns | Reverse DNS | Fast | Bulk reverse lookups |
| hakip2host | Reverse DNS | Fast | IP to host mapping |
Best Practices & Workflow
- Start passive. Use Subfinder, Amass (passive), Findomain, or subdominator to gather a broad list without touching the target.
- Add certificate transparency. Run crt.sh queries or use censys‑subdomain‑finder for additional coverage.
- Check code repositories. Use github‑subdomains and gitlab‑subdomains to find leaked subdomains.
- Perform active brute‑forcing. Use shuffledns, puredns, or dnsx with a good wordlist and custom resolvers. Always handle wildcards.
- Permute and mutate. Feed discovered subdomains into altdns to generate pattern‑based candidates.
- Resolve and validate. Use dnsx or puredns to resolve all candidates and filter out dead ones.
- Reverse DNS. If you have IP ranges, use hakrevdns or hakip2host to find associated domains.
- Integrate with port scanning. Pipe resolved subdomains into httpx, naabu, or nmap for further analysis.
- Automate. Combine tools in scripts or use frameworks like bbot or reNgine for continuous monitoring.
- Stay authorized. Always respect scope and obtain written permission.
Example Pipeline
# Passive enumerationsubfinder -d example.com -o passive.txtamass enum -passive -d example.com -o amass_passive.txt# Certificate transparencycurl -s "https://crt.sh/?q=%25.example.com&output=json" | jq -r '.[].name_value' | sed 's/\*\.//g' | sort -u > crt.txt# Combinecat passive.txt amass_passive.txt crt.txt | sort -u > all_subs.txt# Active brute‑forcingpuredns bruteforce wordlist.txt example.com -r resolvers.txt -w brute.txt# Permutationsaltdns -i all_subs.txt -o permuted.txt -w words.txt# Merge and resolvecat all_subs.txt brute.txt permuted.txt | sort -u > candidates.txtpuredns resolve candidates.txt -r resolvers.txt -w resolved.txt# Further analysiscat resolved.txt | httpx -silent -o live.txtnaabu -list resolved.txt -top-ports 1000 -o ports.txt
Final Tips
- Wordlists matter. A good subdomain wordlist (e.g., from SecLists) dramatically improves active brute‑forcing results.
- Resolvers matter. Use a reliable, fast resolver list for massdns/puredns/shuffledns. Public resolver lists are available from ProjectDiscovery.
- Wildcard DNS is the enemy. Always use tools with wildcard filtering (puredns, shuffledns) to avoid false positives.
- Combine passive and active. Passive gives breadth, active gives depth.
- Monitor continuously. Subdomains change; set up periodic scans to catch new assets.
- Keep tools updated. The subdomain enumeration landscape evolves quickly.
- Document everything. Keep logs of your enumeration for reporting and future reference.
Official Resources:
- SecLists: github.com/danielmiessler/SecLists
- ProjectDiscovery Resolvers: github.com/projectdiscovery/public-resolvers
- Bugcrowd LevelUp Talk: github.com/bugcrowd-levelup/subdomain-enumeration
Remember: Subdomain enumeration is a powerful reconnaissance technique. Use it responsibly, stay within scope, and always obtain proper authorization before testing any system.
Author
Discussion · 0
No comments yet — start the discussion.
Sign in to join the discussion.