Skip to content
Skillpedia
Misc35k · #6154

performing-subdomain-enumeration-with-subfinder

Makes your agent find subdomains of a target domain. This helps map the attack surface during security assessments.

What it does

This tool finds all publicly visible addresses (subdomains) of a main website. It helps understand the entire structure of a website on the internet.

When to use it

  • ✓When investigating a website for security flaws.
  • ✓When you want to know all the 'addresses' of a website.
  • ✓To map a company's 'attack surface'.

Example of what to ask your AI

“Find all subdomains for example.com”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-subdomain-enumeration-with-subfinder/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-subdomain-enumeration-with-subfinder/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool uses other online information sources (like public certificate records and security databases) to discover subdomains. It doesn't attack the site directly, it just gathers information that's already available.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-subdomain-enumeration-with-subfinder

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/performing-subdomain-enumeration-with-subfinder/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Performing Subdomain Enumeration with Subfinder

When to Use

  • During the reconnaissance phase of penetration testing or bug bounty hunting
  • When mapping the external attack surface of a target organization
  • Before performing vulnerability scanning on discovered subdomains
  • When building an asset inventory for continuous security monitoring
  • During red team engagements requiring passive information gathering

Prerequisites

  • Go 1.21+ installed for building from source
  • Subfinder v2 installed (go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest)
  • API keys configured for passive sources (Shodan, Censys, VirusTotal, SecurityTrails, Chaos)
  • Provider configuration file at $HOME/.config/subfinder/provider-config.yaml
  • Network access to passive DNS and certificate transparency sources
  • httpx or httprobe for validating discovered subdomains

Workflow

Step 1 — Install and Configure Subfinder

# Install subfinder
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest

# Verify installation
subfinder -version

# Configure API keys for enhanced results
mkdir -p $HOME/.config/subfinder
cat > $HOME/.config/subfinder/provider-config.yaml << 'EOF'
shodan:
  - YOUR_SHODAN_API_KEY
censys:
  - YOUR_CENSYS_API_ID:YOUR_CENSYS_API_SECRET
virustotal:
  - YOUR_VT_API_KEY
securitytrails:
  - YOUR_ST_API_KEY
chaos:
  - YOUR_CHAOS_API_KEY
EOF

Step 2 — Run Basic Subdomain Enumeration

# Single domain enumeration
subfinder -d example.com -o subdomains.txt

# Multiple domains from a file
subfinder -dL domains.txt -o all_subdomains.txt

# Use all passive sources (slower but more thorough)
subfinder -d example.com -all -o subdomains_all.txt

# Silent mode for piping to other tools
subfinder -d example.com -silent | httpx -silent -status-code

Step 3 — Filter and Customize Source Selection

# Use specific sources only
subfinder -d example.com -s crtsh,virustotal,shodan -o filtered.txt

# Exclude specific sources
subfinder -d example.com -es github -o results.txt

# Enable recursive subdomain enumeration
subfinder -d example.com -recursive -o recursive_subs.txt

# Match specific patterns
subfinder -d example.com -m "api,dev,staging" -o matched.txt

Step 4 — Control Rate Limiting and Output Format

# Rate limit to avoid API throttling
subfinder -d example.com -rate-limit 10 -t 5 -o rate_limited.txt

# JSON output for programmatic processing
subfinder -d example.com -oJ -o subdomains.json

# Output with source information
subfinder -d example.com -cs -o subdomains_with_sources.txt

# Collect results in a directory per domain
subfinder -dL domains.txt -oD ./results/

Step 5 — Validate Discovered Subdomains with httpx

# Pipe subfinder output to httpx for live validation
subfinder -d example.com -silent | httpx -silent -status-code -title -tech-detect -o live_hosts.txt

# Check for specific ports
subfinder -d example.com -silent | httpx -ports 80,443,8080,8443 -o web_services.txt

# Resolve IP addresses
subfinder -d example.com -silent | dnsx -a -resp -o resolved.txt

Step 6 — Integrate with Broader Recon Pipeline

# Chain with nuclei for vulnerability scanning
subfinder -d example.com -silent | httpx -silent | nuclei -t cves/ -o vulns.txt

# Combine with amass for comprehensive enumeration
subfinder -d example.com -o subfinder_results.txt
amass enum -passive -d example.com -o amass_results.txt
cat subfinder_results.txt amass_results.txt | sort -u > combined_subdomains.txt

# Screenshot discovered hosts
subfinder -d example.com -silent | httpx -silent | gowitness file -f - -P screenshots/

Key Concepts

Concept Description
Passive Enumeration Discovering subdomains without directly querying target DNS servers
Certificate Transparency Public logs of SSL/TLS certificates revealing subdomain names
DNS Aggregation Collecting subdomain data from multiple passive DNS databases
Recursive Enumeration Discovering subdomains of subdomains for deeper coverage
Source Providers External APIs and databases queried for subdomain intelligence
CNAME Records Canonical name records that may reveal additional infrastructure
Wildcard DNS DNS configuration returning results for any subdomain query

Tools & Systems

Tool Purpose
Subfinder Primary passive subdomain enumeration engine

…

FAQ

Do I need to install anything?

Yes, you need to install the 'Subfinder' tool and configure API keys for some services to get the best results.

What are 'subdomains'?

They are like additional 'pages' or 'sections' of a main website, such as 'blog.example.com' or 'shop.example.com'.

Is this dangerous?

No, this tool is passive, meaning it only collects public information and does not interact directly with the website in a way that could cause harm or be detected as an attack.

Details

Original description by the author

Enumerate subdomains of target domains using ProjectDiscovery's Subfinder passive reconnaissance tool to map the attack surface during security assessments.

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#6154
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills