root@sparrow:~/writeups$ cat subfinder.md
// recon
Subfinder
21 Jul 2026
· 3 min read
subfinder is a passive subdomain enumerator from the ProjectDiscovery arsenal: it queries dozens of public sources (certificates, search engines, DNS databases) without sending direct traffic against the target. It is built for the reconnaissance phase, where it widens the attack surface by discovering hosts that are not visible at first glance.
The key point is that passive does not mean complete: by default subfinder only uses sources that need no key, so the result depends directly on the API keys you configure in config.yaml and on whether you enable -all. It also does not confirm that the subdomains exist: it returns candidates you must later resolve or validate (which is why it fits so well chained with dnsx, httpx, or naabu).
1. Beginner level — basic passive enumeration

| Command | What it does |
|---|---|
subfinder -d dom.com | Enumerates subdomains |
subfinder -d dom.com -o subs.txt | Saves the output |
subfinder -dL domains.txt | Multiple domains from a file |
subfinder -d dom.com -silent | Only the subdomains (no banner) |
subfinder -d dom.com -all | Uses all sources |
subfinder -d dom.com -recursive | Recursive sources |
subfinder -d dom.com -sources crtsh | Specific source |
subfinder -d dom.com -json -o out.json | Output in JSON |
subfinder -d dom.com -t 50 | Concurrency |
subfinder -d dom.com -timeout 30 | Timeout per source |
subfinder -version | Shows the version |
subfinder -d dom.com -ip | Also shows the resolved IP |
subfinder -ls | Lists the available sources |
subfinder -d dom.com | httpx -silent | Chains with httpx |
2. Advanced level — exhaustiveness and chaining

| Command | What it does |
|---|---|
subfinder -d dom.com -all -recursive -o subs.txt | Exhaustive enumeration |
subfinder -dL scope.txt -all -o all.txt | Multi-domain with all sources |
subfinder -d dom.com -es crtsh | Excludes a source |
subfinder -d dom.com -config config.yaml | Config with API keys |
subfinder -d dom.com -rl 10 | Requests-per-second limit |
subfinder -d dom.com -proxy http://127.0.0.1:8080 | Routes through a proxy |
subfinder -d dom.com -active | Only active subdomains (that resolve) |
subfinder -d dom.com -nc | No colors |
subfinder -d dom.com -oI -o ips.txt | Saves only the IPs |
subfinder -d dom.com -match subs.txt | Filters by a list |
subfinder -d dom.com | dnsx -silent -a -resp | Resolves with dnsx |
subfinder -d dom.com -all | naabu -silent | Chains with port scanning |
subfinder -d dom.com -stats | Shows statistics per source |
subfinder -d dom.com | httpx -sc -title | Feeds into httpx with status and title |
3. Details people miss
- subfinder's real potential is unlocked with
API keys: without configuring them in~/.config/subfinder/provider-config.yaml, sources like SecurityTrails, Censys, or Shodan stay silent and you lose many subdomains. -allenables every source, including the slow ones and those requiring a key; it is more complete but also noisier and slower, so save it for deep reconnaissance rather than quick sweeps.- subfinder only returns passive candidates: it does not check that they resolve. Use
-activeor chain withdnsxto keep only the live subdomains before attacking them. - To avoid blowing through API limits and getting blocked, control the pace with
-rl(requests per second) rather than just raising concurrency with-t. - When integrating it into pipelines or scripts, use
-silentto get only the subdomains (no banner or colors), or-jsonif you are going to parse the output with another tool.
Responsible use
These commands are for systems you own or have explicit written authorisation to test (labs, CTFs, contracted engagements). Using them against third-party infrastructure without permission is illegal in most countries.