GO KALI FREE

Subfinder

Information Gathering

Beginnerlow risk

Subfinder is a fast, passive subdomain discovery tool built by ProjectDiscovery. It finds valid subdomains of any target domain by collecting data from dozens of public online sources — Certificate Transparency logs, passive DNS databases, search engines, and threat-intelligence APIs — without ever sending a single packet to the target. Written in Go with a clean modular design, it is a favourite first step for bug bounty hunters, penetration testers, and security researchers who need reliable subdomain enumeration in seconds.

Installation

sudo apt install subfinder

Basic Syntax

subfinder -d <domain> [options]

Quick Facts

Tool Name
Subfinder
Purpose
Passive Subdomain Discovery
Developer
ProjectDiscovery
Language
Go (Golang)
License
Open Source (MIT)
Platforms
Kali, Linux, macOS, Windows
First Release
2019
Data Sources
Dozens of passive sources

Tool Overview

The Subfinder tool is a fast, passive subdomain enumeration tool created by ProjectDiscovery. Its single job is to discover as many valid subdomains of a target domain as possible — such as mail.example.com, api.example.com, and dev.example.com — by pulling together information that is already public on the internet. Because it never queries the target directly, Subfinder is one of the safest and stealthiest ways to begin reconnaissance.

Subfinder was created to solve a very common problem in cybersecurity: before you can test or defend a website, you first need to know every place it lives online. Large organisations often run hundreds of subdomains, and many are forgotten, misconfigured, or left exposed. Subfinder gathers these subdomains from Certificate Transparency logs, passive DNS providers, search engines, and threat-intelligence APIs, then merges everything into one clean, de-duplicated list.

The tool is written in Go, which is why it is so fast: it can query dozens of data sources at the same time and return results in seconds. Distribution is a single self-contained binary, so it runs identically on Kali Linux, Ubuntu, Debian, macOS, and Windows with no messy dependencies. This simplicity is a big reason Subfinder has become a default choice for beginners and professionals alike.

Subfinder is best known in the bug bounty and penetration testing communities, where passive subdomain discovery is the essential first step of attack-surface mapping. It is also widely used for OSINT investigations, external asset monitoring, and defensive security, where blue teams run it against their own domains to spot shadow IT and unexpected exposures before attackers do.

One of Subfinder's greatest strengths is how well it plays with other tools. Its output is designed to be piped directly into ProjectDiscovery's httpx to find live hosts and nuclei to scan them for vulnerabilities. This makes Subfinder the foundation of a modern, automated reconnaissance pipeline rather than just a standalone utility.

Common Commands

subfinder -d example.comBasic passive subdomain discovery for a single target domain
subfinder -d example.com -allUse every configured passive source for maximum subdomain coverage
subfinder -d example.com -o results.txtSave every discovered subdomain to a plain text output file
subfinder -dL domains.txt -o all-subs.txtEnumerate subdomains for many root domains listed in a file
subfinder -d example.com -silentSilent mode: print only subdomains, no banner or status lines
subfinder -d example.com -json -o subs.jsonStructured JSON output with the source that found each subdomain
subfinder -d example.com -silent | httpx -title -status-codePipe live hosts straight into httpx for HTTP probing
subfinder -d example.com -o subdomains.txtPassive subdomain enumeration
subfinder -d example.com -all -o all-subs.txtUse all sources
subfinder -d example.com -silentSilent output
subfinder -d example.com -recursiveRecursive enumeration
subfinder -d example.com -timeout 3030-second timeout
subfinder -d example.com -provider githubUse GitHub provider
subfinder -d example.com -t 2020 concurrent threads
subfinder -d example.com -o results.json -jsonJSON output

Step-by-Step Guide

  1. 1Install Subfinder on Kali Linux with 'sudo apt install subfinder', or grab the latest release using Go with 'go install'.
  2. 2Run your first passive scan by pointing it at a domain you are authorised to test: 'subfinder -d example.com'.
  3. 3Open the provider config at ~/.config/subfinder/provider-config.yaml and add free API keys to unlock more data sources.
  4. 4Add the -all flag to query every source, and -recursive to expand discovered subdomains further.
  5. 5Save clean results with -o results.txt (or -json for machine-readable output) so you can reuse them later.
  6. 6Pipe the output into httpx to find which subdomains are live, then into nuclei or nmap for deeper analysis.

Warnings

Use Cases

Bug Bounty Recon

Map a program's full attack surface passively and safely before hunting for vulnerabilities within scope.

OSINT Investigations

Gather an organisation's public subdomains from certificate logs and passive DNS for open-source intelligence.

Reconnaissance

Run Subfinder as the first recon step to build a target list for deeper scanning and enumeration.

Attack Surface Discovery

Reveal forgotten staging, dev, and admin hosts that expand an organisation's real attack surface.

External Asset Monitoring

Track newly created subdomains over time to detect shadow IT and unexpected internet exposure.

Cloud Enumeration

Surface cloud-hosted subdomains and endpoints that public data sources have already recorded.

Web Security Assessment

Feed discovered subdomains into httpx and nuclei to assess the security of every live web asset.

Security Research

Study infrastructure and passive DNS relationships for threat intelligence and academic research.

Key Features

Comparison

Subfinder vs Amass vs Assetfinder — Passive Recon Matrix

FeatureSubfinderAmassAssetfinder
SpeedVery fastSlower (thorough)Fast
Passive SourcesDozens (with API keys)Many + activeSeveral
Active Brute-forceNo (passive only)Yes (optional)No
Config ComplexityLow (one YAML)Higher (config file)Very low
Output FormatsTXT/JSONTXT/JSON/DBTXT
Best ForFast day-to-day passive reconDeep, exhaustive mappingQuick one-off lookups

Passive vs Active Subdomain Discovery — Where Subfinder Fits

FeaturePassive (Subfinder)Active (DNS brute-force)Certificate Transparency
Touches Target DNSNo — queries third-party sourcesYes — resolves guessed namesNo — reads public CT logs
Detection RiskVery lowHigher (query volume)Very low
Finds Unpublished HostsOnly if a source knows themYes (if guessable)Only if a cert was issued
Typical Toolsubfinder -alldnsenum / gobuster dnssubfinder (crtsh source)
When To UseFirst, stealthy passWhen passive is exhaustedAlways — cheap coverage

Subfinder Output & Piping — Choosing the Right Flags

FeatureGoalFlagPipes Into
Human-readable listQuick review-o subs.txtManual triage
Machine-readableAutomation-oJ -o subs.jsonjq / scripts
Live-host probingFind live web hosts-silent | httpxhttpx
Vulnerability scanFind issues-silent | httpx | nucleinuclei
Max coverageEvery source-all -recursivededupe + resolve

Best Practices

Common Errors

No subdomains found
Use a root domain (example.com), add API keys, and run with -all to query every source.
Could not read provider config / API errors
Recreate ~/.config/subfinder/provider-config.yaml, check YAML indentation, and verify each API key is valid.
permission denied
Run 'chmod +x' on the binary or reinstall via apt, and ensure your Go bin directory is on PATH.
subfinder: command not found
Add 'export PATH=$PATH:$(go env GOPATH)/bin' to your shell profile, or install via apt instead.
context deadline exceeded / timeout
Increase the timeout with -timeout, check your connection, and retry; exclude the failing source with -es.
rate limit exceeded
Apply a global rate limit with -rl, reduce concurrency with -t, or wait before retrying.

People Also Ask

How do I use Subfinder in Kali Linux?

Run 'subfinder -d example.com' for a basic passive scan. Add '-all' to query every configured source, '-o results.txt' to save output, and '-json' for structured JSON with source attribution. Pipe results into httpx for live-host validation: 'subfinder -d example.com -silent | httpx'.

What do the -d and -o flags do in Subfinder?

The -d flag specifies the target domain: 'subfinder -d example.com'. The -o flag writes results to a file: 'subfinder -d example.com -o results.txt'. Use -dL instead of -d to read multiple domains from a text file.

How accurate is Subfinder?

Very accurate for subdomains recorded in public sources. Results may include stale subdomains that no longer resolve, so pipe output into httpx to validate which ones are live.

What output does Subfinder produce?

Plain text by default (one subdomain per line). Use -json for structured output that includes the source that found each subdomain. Use -silent to suppress the banner for clean piping.

Is Subfinder used for bug bounty?

Yes, Subfinder is a staple of bug bounty reconnaissance. Hunters use it as the first step to map a program's attack surface, because passive enumeration stays within scope and does not trigger security alerts.

Where can I download Subfinder?

Download from GitHub: 'github.com/projectdiscovery/subfinder/releases' has prebuilt binaries for Linux, macOS, and Windows. Or install via package managers: 'sudo apt install subfinder' (Kali/Debian), 'brew install subfinder' (macOS), or 'go install' from source.

Related Tools

Amass

Information Gathering

OWASP attack-surface mapper with passive and active subdomain enumeration.

theHarvester

Information Gathering

OSINT tool that gathers emails, hosts, and subdomains from public sources.

httpx

Information Gathering

Fast HTTP toolkit that probes discovered subdomains for live hosts.

Nuclei

Web Application

Template-based vulnerability scanner for the discovered live hosts.

DNSRecon

Information Gathering

DNS enumeration tool for records, zone transfers, and brute-force.

DNSenum

Information Gathering

All-in-one DNS enumeration with zone transfer and brute-force.

Fierce

Information Gathering

DNS reconnaissance and subdomain brute-forcing tool.

Gobuster

Web Application

Fast brute-force tool for DNS subdomains, directories, and vhosts.

FFUF

Web Application

High-speed web fuzzer for subdomains, paths, and parameters.

Dig

Information Gathering

Classic DNS lookup utility for querying records manually.

WhatWeb

Information Gathering

Web technology fingerprinting for discovered live hosts.

Nmap

Information Gathering

The industry-standard port scanner and service detector.

Nikto

Web Application

Web server scanner for common vulnerabilities and misconfigurations.

Frequently Asked Questions

What is the Subfinder tool?

Subfinder is a passive subdomain discovery tool that finds valid subdomains of a target domain using public online sources. Developed by ProjectDiscovery and written in Go, it queries Certificate Transparency logs, passive DNS databases, search engines, and security APIs without sending any traffic to the target, which makes it fast and safe for reconnaissance.

How does Subfinder work?

Subfinder works by asking many third-party data sources what subdomains they already know about for your target. It collects answers from sources like crt.sh, VirusTotal, and Shodan, removes duplicates, optionally filters wildcards, and prints a clean, unique list. Because all the lookups happen against public sources and not the target itself, the whole reconnaissance process is completely passive.

Is Subfinder free to use?

Yes. Subfinder is free and open source under the MIT license. You can download it, read the source code, and use it in personal or professional engagements at no cost. Some optional data sources need free API keys, but the tool itself never charges anything.

Who developed Subfinder?

Subfinder is developed and maintained by ProjectDiscovery, an open-source security company that builds a popular ecosystem of reconnaissance tools including httpx, nuclei, naabu, and dnsx. Subfinder is designed to integrate cleanly with these other tools.

What is ProjectDiscovery?

ProjectDiscovery is an open-source company that creates fast, automation-friendly security tools for reconnaissance and vulnerability scanning. Its tools — Subfinder for subdomains, httpx for HTTP probing, and nuclei for vulnerability detection — are widely used together to build modern bug bounty and penetration testing pipelines.

Is Subfinder passive or active?

Subfinder is a passive tool. It never sends probes, brute-force requests, or DNS queries directly to the target's infrastructure. Instead it gathers already-public data from external sources, so the target sees no traffic from your enumeration. For active discovery you would combine it with a tool such as Amass in active mode.

Can beginners learn Subfinder?

Absolutely. Subfinder is one of the most beginner-friendly recon tools because a full scan is a single command: subfinder -d example.com. There are no complex configuration files needed to get started, and you can practise safely in our Terminal Sandbox before running it against real, authorised targets.

Is Subfinder used for bug bounty?

Yes, Subfinder is a staple of bug bounty reconnaissance. Hunters use it as the first step to map a program's attack surface, because passive enumeration stays within scope and does not trigger security alerts. As part of a wider bug bounty OSINT process, the discovered subdomains are then probed with httpx and tested with nuclei.

How accurate is Subfinder?

Subfinder is accurate for subdomains that have appeared in public records such as TLS certificates and passive DNS. Its coverage improves dramatically when you add API keys and use the -all flag. It will not find subdomains that were never publicly logged, so pairing it with active tools gives the most complete picture.

Can Subfinder discover hidden subdomains?

Subfinder can uncover forgotten or lightly-used subdomains such as staging, dev, and admin hosts, as long as those names were recorded by a public source like a certificate log. It cannot discover truly private subdomains that were never published anywhere. For unpublished names, combine Subfinder with DNS enumeration and brute-forcing tools.

Does Subfinder require API keys?

No, Subfinder runs without any API keys and still returns useful results from free sources. However, adding free API keys for services like SecurityTrails, Shodan, VirusTotal, and Censys unlocks many more sources and can double or triple the number of subdomains discovered. Keys are stored in ~/.config/subfinder/provider-config.yaml.

What programming language is Subfinder written in?

Subfinder is written in Go (Golang). Go gives the tool its speed, easy cross-platform single-binary distribution for Linux, macOS, and Windows, and highly concurrent querying of many data sources at once, which is why Subfinder can enumerate subdomains so quickly.

What is the difference between Subfinder and Amass?

Subfinder is passive-only and extremely fast, ideal for a quick first pass. Amass is a heavier OWASP project that supports both passive and active enumeration, DNS brute-forcing, and network mapping. Use Subfinder for speed and stealth, and Amass when you need deeper, active attack-surface mapping. Many professionals run both and merge the results.

What is the difference between Subfinder and Assetfinder?

Both are passive subdomain tools, but Subfinder queries a larger set of sources, supports API keys, JSON output, recursion, and resolution filtering, and is actively maintained by ProjectDiscovery. Assetfinder is a lightweight single-purpose utility. Subfinder is generally the better default for thorough passive enumeration.

What is the difference between Subfinder and theHarvester?

theHarvester is a broad OSINT tool that gathers emails, names, hosts, and subdomains from public sources, while Subfinder focuses purely on fast, high-coverage subdomain discovery. They complement each other: use theHarvester for wide OSINT and Subfinder for the deepest subdomain list.

How do I install Subfinder on Kali Linux?

On Kali Linux, which ships with a large collection of Kali Linux tools, run 'sudo apt update && sudo apt install subfinder'. To install the very latest version instead, use Go: 'go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest'. Verify the install with 'subfinder -version'.

How do I save Subfinder output to a file?

Use the -o flag, for example 'subfinder -d example.com -o results.txt'. For structured output use '-json -o results.json', and to append results from many domains use -dL with a domains list. Saved files are ready to feed into other reconnaissance tools.

How do I make Subfinder find more subdomains?

Add free API keys in the provider config, run with the -all flag to enable every source, and use -recursive to enumerate subdomains of subdomains. Combining these three steps gives you the widest passive coverage Subfinder can offer.

How do I fix 'No subdomains found' in Subfinder?

First confirm the domain is spelled correctly and is a root domain (example.com, not http://example.com). Then add API keys and run with -all, since the free sources alone may return little for smaller domains. A network or proxy issue can also block source queries, so check your connection using basic Linux commands like ping and curl.

Can Subfinder be used in automated pipelines?

Yes. Subfinder's silent mode and clean stdout make it ideal for automation. A common pipeline is 'subfinder -d target.com -silent | httpx -silent | nuclei', which discovers subdomains, finds the live ones, and scans them for vulnerabilities. It runs well in cron jobs and CI/CD for continuous attack-surface monitoring.

How do I add API keys to Subfinder?

Edit the provider config at ~/.config/subfinder/provider-config.yaml and add each service's key under its name, for example 'virustotal: [YOUR_KEY]'. Free keys are available from SecurityTrails, Shodan, VirusTotal, Censys, and GitHub. After saving, run 'subfinder -d example.com -all' to use every configured source. Keep this file private since it contains secrets.

What does the -all flag do in Subfinder?

The -all flag tells Subfinder to query every configured data source rather than just the fast default set. It maximises subdomain coverage at the cost of a slightly slower scan and more API usage. Combine -all with API keys for the widest possible passive results.

What is the difference between Subfinder and a DNS brute-force tool?

Subfinder is passive: it collects subdomains that already exist in public records without querying the target. A DNS brute-force tool like DNSenum actively guesses names against the target's DNS servers. Passive enumeration is stealthy and in-scope for most bug bounties, while brute-forcing finds unpublished names but generates traffic.

How do I resolve subdomains found by Subfinder?

Subfinder focuses on discovery, not resolution. Pipe its output into a resolver or into httpx to confirm which subdomains are live: 'subfinder -d example.com -silent | httpx -silent'. This filters a large name list down to hosts that actually respond, which is the practical next step in recon.

Does Subfinder work on Windows and macOS?

Yes. Because Subfinder is a single Go binary, it runs on Windows, macOS, and Linux. Download the release for your platform from the ProjectDiscovery GitHub, or install with 'go install' if you have Go. The commands and provider config work identically across all three operating systems.

How do I update Subfinder to the latest version?

If you installed via apt, run 'sudo apt update && sudo apt upgrade subfinder'. If you installed with Go, re-run 'go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest'. Keeping Subfinder current matters because data-source integrations change over time. Check your version with 'subfinder -version'.

Why does Subfinder return duplicate or wildcard subdomains?

Different sources often report the same subdomain, and some domains use wildcard DNS that makes every random name resolve. Subfinder deduplicates automatically, and you can add resolution filtering (pipe into httpx or dnsx) to drop wildcard noise. Always validate results before treating them as real assets.

Is it legal to use Subfinder on any domain?

Subfinder only queries public data sources, so passive enumeration is low-risk, but you should still only enumerate domains you own or are explicitly authorised to test. Follow the rules of engagement for penetration tests and the scope of bug bounty programs. When in doubt, practise on your own domains or in the Terminal Sandbox.

How does Subfinder fit into a recon workflow?

Subfinder is typically the first step: it maps the subdomain attack surface passively. Its output feeds httpx to find live hosts, then nuclei for vulnerability scanning, and tools like Amass or DNSenum for deeper active coverage. This chain is the backbone of a modern passive-first reconnaissance workflow.

What output formats does Subfinder support?

Subfinder supports plain text (default), JSON with '-json' for structured automation, and can write to a file with '-o'. JSON output includes the source that found each subdomain, which is useful for auditing and for feeding results into other tools programmatically.

Can Subfinder enumerate subdomains recursively?

Yes. The -recursive flag makes Subfinder enumerate subdomains of the subdomains it discovers, which can surface deeper nested hosts. Recursion increases runtime and source usage, so combine it with -all and API keys when you need the most thorough passive map for a large target.

Tags

#subfinder#subdomain enumeration#passive recon#osint#bug bounty#projectdiscovery#subdomain discovery#dns#reconnaissance#attack surface

Output Explanation

Subfinder prints one discovered subdomain per line, for example api.example.com, mail.example.com, and dev.example.com. Because every result comes from passive online sources, the list can include subdomains that no longer resolve, so it is normal to validate the output with a tool like httpx before scanning. In silent mode (-silent) only the subdomains are shown, which makes the output perfect for piping into other tools. With -json each entry becomes a structured record that also names the exact source (such as crtsh, virustotal, or shodan) that discovered the subdomain, which is useful for auditing coverage and building automated pipelines.

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.