crazymarky/pentest-skills/recon-subdomain
Claude Code and agent skill by crazymarky/pentest-skills
- community
Checking that the SKILL.md file is still in the repository.
Subdomain enumeration and DNS reconnaissance using subfinder, amass, dnsx, and other tools. Use this skill when user needs to discover subdomains, perform DNS enumeration, gather DNS records, or find hidden subdomains of a target domain.
Install
npx vskill@latest install crazymarky/pentest-skills/recon-subdomainSKILL.md
Subdomain Enumeration / DNS Reconnaissance
Authorization Warning
IMPORTANT: Subdomain enumeration without proper authorization may violate terms of service. Always ensure you have:
- Written permission from the target domain owner
- Defined scope of authorized testing
- Legal compliance with local regulations
Prerequisites
Required tools that must be installed on your system:
- subfinder -
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest - dnsx -
go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest
Optional tools:
- amass -
go install -v github.com/owasp-amass/amass/v4/cmd/amass@latest - assetfinder -
go install github.com/tomnomnom/assetfinder@latest - puredns -
go install github.com/d3mondev/puredns/v2@latest
Quick Start
Most commonly used commands for subdomain enumeration:
Fast Subdomain Discovery (Subfinder)
Subdomain Discovery + DNS Resolution
Comprehensive Subdomain Enumeration (Amass)
Multiple Tools Combined
Common Scenarios
Scenario 1: Quick Passive Subdomain Discovery
When you need fast subdomain discovery without direct interaction:
Parameters:
-d example.com- Target domain-o subs.txt- Output file-silent- Suppress stderr output (optional)
Example:
Scenario 2: Active Subdomain Enumeration
When you need comprehensive active enumeration:
Parameters:
-active- Active enumeration (direct DNS queries)-d example.com- Target domain-o amass_active.txt- Output file
Example:
Passive mode (no direct queries):
Scenario 3: DNS Resolution of Discovered Subdomains
When you have a list of subdomains and need to verify which resolve:
Parameters:
-l subs.txt- Input file with subdomains-o resolved.txt- Output file-resp- Include DNS responses in output-json- Output in JSON format
Example:
With response details:
Scenario 4: DNS Record Enumeration
When you need to gather specific DNS records:
Scenario 5: Wildcard Detection
When the target has wildcard DNS records:
Alternative with dnsx:
Scenario 6: Subdomain Brute Forcing
When you need to discover subdomains via wordlist:
Common wordlists:
Scenario 7: Multi-Tool Enumeration
Combine multiple tools for maximum coverage:
Scenario 8: Certificate Transparency Log Search
Find subdomains from SSL/TLS certificates:
Scenario 9: DNS Zone Transfer
Attempt zone transfer (rarely successful but worth trying):
Scenario 10: Subdomain Takeover Detection
Check for dangling DNS records:
Tool Selection Guide
| Scenario | Recommended Tool | Command | |
|---|---|---|---|
| Quick passive discovery | subfinder | subfinder -d <domain> -o subs.txt | |
| Comprehensive enumeration | amass | amass enum -d <domain> -o subs.txt | |
| DNS resolution verification | dnsx | dnsx -l subs.txt -o resolved.txt | |
| Certificate search | subfinder (crtsh) | subfinder -d <domain> -sources crtsh | |
| Brute force | puredns | puredns bruteforce wordlist.txt <domain> | |
| Wildcard handling | puredns | puredns discard wildcards.txt < subs.txt | |
| Simple alternative | assetfinder | assetfinder --subs-only <domain> |
Tool Comparison:
| Tool | Speed | Coverage | Passive | Active | Use Case | |
|---|---|---|---|---|---|---|
| subfinder | Fast | Good | Yes | Limited | Quick discovery | |
| amass | Slow | Excellent | Yes | Yes | Comprehensive | |
| assetfinder | Very Fast | Basic | Yes | No | Quick checks | |
| puredns | Fast | N/A | No | Yes | Brute force |
Common Wordlists
Subdomain brute forcing wordlists:
| Wordlist | Size | Source | |
|---|---|---|---|
| subdomains-top1million-5k | 5,000 | SecLists | |
| subdomains-top1million-20k | 20,000 | SecLists | |
| subdomains-top1million-500k | 500,000 | SecLists | |
| DNS-Jaded-Top.txt | ~10,000 | Assetnote wordlists |
Example usage:
Workflow Example
Complete subdomain enumeration workflow:
Output Formats
Subfinder JSON Output
JSON structure:
Dnsx JSON Output
JSON structure:
Tips and Best Practices
- Start passive - Use passive methods first to avoid detection
- Combine tools - No single tool finds everything
- Check wildcards - Wildcard DNS can skew results
- Verify resolution - Not all discovered subdomains resolve
- Rate limiting - Be careful with active queries to avoid blocking
- Save results - Keep intermediate results for analysis
Scenario: Persistent Storage of Subdomain Enumeration
When you need to persist subdomain discovery results to the database:
Parameters:
--subsystem- Subsystem name (optional, omit for flat hierarchy)--input-file- File containing subdomains (one per line, optional, reads from stdin if not provided)
Database location: ./data/results.db
Related skills: results-storage - Query data, generate reports
Resources
Scripts
scripts/merge_subdomains.py- Merge and deduplicate multiple subdomain listsscripts/filter_resolved.py- Filter resolved subdomains with custom resolution logicscripts/subdomain_stats.py- Generate statistics on discovered subdomains
References
references/subfinder_guide.md- Comprehensive subfinder referencereferences/amass_guide.md- Detailed amass usage documentationreferences/dnsx_guide.md- DNS resolution tool referencereferences/dns_techniques.md- Advanced DNS enumeration techniques
Assets
assets/subdomains-top1m-5k.txt- Top 5,000 common subdomain wordsassets/resolvers.txt- Trusted DNS resolver listassets/wildcard-test.txt- Subdomain wildcard testing patterns
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingrecon-subdomain/SKILL.md
Popularity
- Repository stars
- 216
- Repository forks
- 26
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/crazymarky/pentest-skills/recon-subdomain)