subfinder

Subfinder is a passive subdomain discovery tool by ProjectDiscovery that uses curated online sources to find valid subdomains for a site. The tool is optimized for speed and stealth and supports stdin/stdout for seamless integration into reconnaissance workflows.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "subfinder" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-ec7e219a73e0c0037c29cec1df995f6015a89b1daa19b372cbf2e71e54e2acfa. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/subfinder-passive-subdomain-enumeration before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Subfinder is a passive subdomain discovery tool by ProjectDiscovery that uses curated online sources to find valid subdomains for a site. The tool is optimized for speed and stealth and supports stdin/stdout for seamless integration into reconnaissance workflows.

0 Downloads

Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference

SkillPi interpretation

Inputs and outputs
subfinder -d example.com -o subdomains.txt
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: subfinder
description: >-
  Discover subdomains of a target domain using passive and active enumeration
  techniques. Use when tasks involve subdomain enumeration, attack surface mapping,
  DNS reconnaissance, finding hidden services, identifying forgotten subdomains,
  or expanding the scope of a security assessment. Subfinder uses passive sources
  (certificate transparency logs, DNS datasets, search engines) to find subdomains
  without touching the target directly.
license: Apache-2.0
compatibility: "Go 1.21+ or Docker"
metadata:
  author: terminal-skills
  version: "1.0.0"
  category: devops
  tags:
    - subdomain
    - reconnaissance
    - security
    - dns
    - enumeration

Subfinder

Overview

Discover subdomains of a target domain using passive sources. Subfinder queries certificate transparency logs, DNS datasets, search engines, and other OSINT sources to enumerate subdomains without directly touching the target infrastructure.

Instructions

Installation

# Go install (requires Go 1.21+)
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest

# Or download binary
# https://github.com/projectdiscovery/subfinder/releases

# Or Docker
docker pull projectdiscovery/subfinder:latest

Basic Usage

# Enumerate subdomains for a single domain
subfinder -d example.com

# Multiple domains
subfinder -d example.com,example.org

# From a file of domains
subfinder -dL domains.txt

# Output to file
subfinder -d example.com -o subdomains.txt

# JSON output (includes source information)
subfinder -d example.com -oJ -o subdomains.json

Configuration

API keys for better results

Subfinder works without API keys but returns significantly more results with them. Configure in ~/.config/subfinder/provider-config.yaml:

# ~/.config/subfinder/provider-config.yaml
# Add API keys for passive sources to dramatically increase results

binaryedge:
  - your-binaryedge-api-key          # https://app.binaryedge.io

censys:
  - your-censys-api-id:api-secret    # https://search.censys.io/account/api

chaos:
  - your-chaos-api-key               # https://chaos.projectdiscovery.io

github:
  - your-github-token                # Personal access token (public repos scope)

shodan:
  - your-shodan-api-key              # https://account.shodan.io

securitytrails:
  - your-securitytrails-key          # https://securitytrails.com/app/account

virustotal:
  - your-virustotal-api-key          # https://www.virustotal.com/gui/my-apikey

# Free sources that don't need keys:
# Certificate Transparency (crtsh), DNSdumpster, HackerTarget,
# Wayback Machine, AlienVault OTX, RapidDNS

Source selection

# Use all sources (default)
subfinder -d example.com -all

# Use only specific sources
subfinder -d example.com -s crtsh,dnsdumpster,hackertarget

# Exclude noisy sources
subfinder -d example.com -es github

# List available sources
subfinder -ls

Advanced Usage

Recursive enumeration

Find subdomains of subdomains (e.g., dev.api.example.com):

# Enable recursive mode — finds deeper subdomains
subfinder -d example.com -recursive

# Limit recursion depth
subfinder -d example.com -recursive -max-depth 3

Filtering and processing

# Show only results from specific sources
subfinder -d example.com -cs  # Show source for each subdomain

# Pipe to other tools for validation
subfinder -d example.com -silent | httpx -silent  # Check which are live
subfinder -d example.com -silent | dnsx -silent    # Resolve DNS
subfinder -d example.com -silent | naabu -silent   # Port scan

# Rate limiting (respect API limits)
subfinder -d example.com -rate-limit 5  # 5 requests/second max
subfinder -d example.com -t 10          # 10 concurrent threads

Integration with other recon tools

# Full recon pipeline:
# 1. Find subdomains
subfinder -d target.com -o subs.txt

# 2. Check which are live (httpx)
cat subs.txt | httpx -silent -status-code -title -o live.txt

# 3. Screenshot live hosts (gowitness)
cat live.txt | gowitness file -f -

# 4. Port scan discovered hosts (naabu)
cat subs.txt | naabu -silent -top-ports 1000 -o ports.txt

# 5. Run vulnerability scan (nuclei)
cat live.txt | nuclei -t cves/ -severity critical,high -o vulns.txt

Passive vs Active Enumeration

Subfinder is passive by default — it queries third-party data sources, NOT the target:

PASSIVE (subfinder default) — safe, stealthy
├── Certificate Transparency logs (crt.sh, Google CT)
├── DNS aggregation (SecurityTrails, DNSdumpster)
├── Search engines (Google, Bing dorking)
├── Threat intelligence (Shodan, Censys, BinaryEdge)
└── Internet archives (Wayback Machine)

ACTIVE (use additional tools) — touches the target
├── DNS brute-forcing (shuffledns, puredns)
├── DNS zone transfers (dig axfr)
├── Virtual host discovery (ffuf -H "Host: FUZZ.target.com")
└── TLS/SSL cert inspection (direct connection)

For authorized pentests, combine both: subfinder for passive discovery, then active brute-forcing for what passive sources missed.

Interpreting Results

Common subdomain patterns and what they reveal:

admin.example.com        → Admin panel (high-value target)
staging.example.com      → Staging environment (often less secured)
dev.example.com          → Development server (may have debug enabled)
api.example.com          → API endpoint (test for auth bypass)
old.example.com          → Legacy application (likely unpatched)
vpn.example.com          → VPN gateway (credential attacks)
mail.example.com         → Mail server (phishing target)
jenkins.example.com      → CI/CD (code execution potential)
grafana.example.com      → Monitoring (information disclosure)
*.s3.amazonaws.com       → S3 buckets (check for public access)

Prioritize targets: admin panels, staging environments, and legacy hosts are the highest-value findings because they're often less secured than production.

Examples

Map the attack surface of a target domain

Run subdomain enumeration on our domain example.com using subfinder. Find all subdomains, check which ones are live with httpx, identify the web technologies with whatweb, and produce a prioritized target list. Flag any staging, development, or admin subdomains as high-priority. Include the source for each subdomain so we know which passive sources are most valuable for this target.

Find forgotten or shadow IT subdomains

Our company has 5 registered domains. Enumerate all subdomains across all of them, cross-reference with our known asset inventory (list provided), and identify any subdomains we don't recognize — potential shadow IT or forgotten services. For each unknown subdomain, check if it's live, what it's running, and whether it has a valid TLS certificate.

Set up continuous subdomain monitoring

Build a subdomain monitoring pipeline that runs weekly on our 3 primary domains. It should compare results against the previous week's baseline, alert on new subdomains (potential new attack surface or subdomain takeover), and generate a diff report. Store historical data for trend analysis. Use subfinder for enumeration and httpx for liveness checks.

Guidelines

  • Only run against domains you have explicit written authorization to test
  • Passive enumeration (subfinder default) does not touch the target, but active tools like httpx and naabu do — ensure they are in scope
  • Configure API keys for better coverage — free sources alone miss many subdomains
  • Use rate limiting (-rate-limit) to avoid overwhelming third-party data sources
  • Validate findings before reporting — some passive sources return stale or incorrect data
  • Combine with active DNS brute-forcing (puredns, shuffledns) for comprehensive coverage on authorized engagements

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 提供子域名发现功能,直接解决安全侦察中的高频刚需任务
  • 支持被动枚举,不直接触碰目标,适用于隐蔽侦察场景
  • 集成多种 OSINT 数据源,显著提升攻击面映射效率
Trigger Precision95/100

Highlights

  • 触发描述清晰覆盖子域名枚举、攻击面映射、DNS 侦察等核心场景
  • 边界定义明确,避免与其他安全工具混淆
Structure and Standards90/100

Highlights

  • 文档结构完整,涵盖安装、配置、基础与高级用法、集成示例
  • 提供端到端实战示例和结果解读指南,便于用户快速上手
Execution Reliability88/100

Highlights

  • 工具来源明确,参数说明详尽,涵盖 API 配置与速率限制
  • 提供结果验证建议和与其他工具(httpx、naabu)的集成方案
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • account.shodan.io
  • app.binaryedge.io
  • chaos.projectdiscovery.io
  • github.com
  • search.censys.io
  • securitytrails.com
  • www.virustotal.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.