performing-subdomain-enumeration-with-subfinder
Enumerate subdomains of target domains using ProjectDiscovery's Subfinder passive reconnaissance tool to map the attack surface during security assessments.
Best use case
performing-subdomain-enumeration-with-subfinder is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Enumerate subdomains of target domains using ProjectDiscovery's Subfinder passive reconnaissance tool to map the attack surface during security assessments.
Teams using performing-subdomain-enumeration-with-subfinder should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/performing-subdomain-enumeration-with-subfinder/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How performing-subdomain-enumeration-with-subfinder Compares
| Feature / Agent | performing-subdomain-enumeration-with-subfinder | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Enumerate subdomains of target domains using ProjectDiscovery's Subfinder passive reconnaissance tool to map the attack surface during security assessments.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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 ```bash # 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 ```bash # 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 ```bash # 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 ```bash # 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 ```bash # 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 ```bash # 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 | | httpx | HTTP probe tool for validating live subdomains | | dnsx | DNS resolution and validation toolkit | | Nuclei | Template-based vulnerability scanner for discovered hosts | | Amass | Complementary subdomain enumeration with active/passive modes | | gowitness | Web screenshot utility for visual reconnaissance | | Shodan | Internet-wide scanning database for subdomain intelligence | | crt.sh | Certificate transparency log search engine | ## Common Scenarios 1. **Bug Bounty Reconnaissance** — Enumerate all subdomains of a target program scope to identify forgotten or misconfigured assets that may contain vulnerabilities 2. **Attack Surface Mapping** — Build a comprehensive inventory of externally accessible subdomains for ongoing security monitoring and risk assessment 3. **Cloud Asset Discovery** — Identify subdomains pointing to cloud services (AWS, Azure, GCP) that may be vulnerable to subdomain takeover 4. **CI/CD Integration** — Automate subdomain monitoring in pipelines to detect new subdomains and alert on changes to the attack surface 5. **Merger & Acquisition Due Diligence** — Map the complete external footprint of an acquisition target during security assessment ## Output Format ``` ## Subdomain Enumeration Report - **Target Domain**: example.com - **Total Subdomains Found**: 247 - **Live Hosts**: 183 - **Unique IP Addresses**: 42 - **Sources Used**: crt.sh, VirusTotal, Shodan, SecurityTrails, Censys ### Discovered Subdomains | Subdomain | IP Address | Status Code | Technology | |-----------|-----------|-------------|------------| | api.example.com | 10.0.1.5 | 200 | Nginx, Node.js | | staging.example.com | 10.0.2.10 | 403 | Apache | | dev.example.com | 10.0.3.15 | 200 | Express | ### Recommendations - Remove DNS records for decommissioned subdomains - Investigate subdomains with CNAME pointing to unclaimed services - Restrict access to development and staging environments ```
Related Skills
performing-yara-rule-development-for-detection
Develop precise YARA rules for malware detection by identifying unique byte patterns, strings, and behavioral indicators in executable files while minimizing false positives.
performing-wireless-security-assessment-with-kismet
Conduct wireless network security assessments using Kismet to detect rogue access points, hidden SSIDs, weak encryption, and unauthorized clients through passive RF monitoring.
performing-wireless-network-penetration-test
Execute a wireless network penetration test to assess WiFi security by capturing handshakes, cracking WPA2/WPA3 keys, detecting rogue access points, and testing wireless segmentation using Aircrack-ng and related tools.
performing-windows-artifact-analysis-with-eric-zimmerman-tools
Perform comprehensive Windows forensic artifact analysis using Eric Zimmerman's open-source EZ Tools suite including KAPE, MFTECmd, PECmd, LECmd, JLECmd, and Timeline Explorer for parsing registry hives, prefetch files, event logs, and file system metadata.
performing-wifi-password-cracking-with-aircrack
Captures WPA/WPA2 handshakes and performs offline password cracking using aircrack-ng, hashcat, and dictionary attacks during authorized wireless security assessments to evaluate passphrase strength and wireless network security posture.
performing-web-cache-poisoning-attack
Exploiting web cache mechanisms to serve malicious content to other users by poisoning cached responses through unkeyed headers and parameters during authorized security tests.
performing-web-cache-deception-attack
Execute web cache deception attacks by exploiting path normalization discrepancies between CDN caching layers and origin servers to cache and retrieve sensitive authenticated content.
performing-web-application-vulnerability-triage
Triage web application vulnerability findings from DAST/SAST scanners using OWASP risk rating methodology to separate true positives from false positives and prioritize remediation.
performing-web-application-scanning-with-nikto
Nikto is an open-source web server and web application scanner that tests against over 7,000 potentially dangerous files/programs, checks for outdated versions of over 1,250 servers, and identifies ve
performing-web-application-penetration-test
Performs systematic security testing of web applications following the OWASP Web Security Testing Guide (WSTG) methodology to identify vulnerabilities in authentication, authorization, input validation, session management, and business logic. The tester uses Burp Suite as the primary interception proxy alongside manual testing techniques to find flaws that automated scanners miss. Activates for requests involving web app pentest, OWASP testing, application security assessment, or web vulnerability testing.
performing-web-application-firewall-bypass
Bypass Web Application Firewall protections using encoding techniques, HTTP method manipulation, parameter pollution, and payload obfuscation to deliver SQL injection, XSS, and other attack payloads past WAF detection rules.
performing-vulnerability-scanning-with-nessus
Performs authenticated and unauthenticated vulnerability scanning using Tenable Nessus to identify known vulnerabilities, misconfigurations, default credentials, and missing patches across network infrastructure, servers, and applications. The scanner correlates findings with CVE databases and CVSS scores to produce prioritized remediation guidance. Activates for requests involving vulnerability scanning, Nessus assessment, patch compliance checking, or automated vulnerability detection.