recon-dir-scan
Skill301 starsChanged 8 months agoApache-2.0View on GitHub
Directory and file enumeration using ffuf, gobuster, dirsearch, and feroxbuster. Use this skill when user needs to discover hidden directories, enumerate files, find backup files, or map application structure through path fuzzing.
- Reads credentials
- Installs packages
In this repository9 other files it gives its agents.
- exploit-file-downloadSkill
- exploit-lfiSkill
- exploit-sqliSkill
- exploit-xssSkill
- pentest-reportSkill
- recon-fingerprintSkill
- recon-port-scanSkill
- recon-subdomainSkill
- results-storageSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 14 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 49
When you need to discover directories and files:
- Distinctive: line 69
When you only want specific HTTP status codes:
- Distinctive: line 92
When you need to scan discovered directories recursively:
- Distinctive: line 111
When searching for specific file types:
- Distinctive: line 132
When looking for backup, config, or hidden files:
- Distinctive: line 161
When testing for virtual host routing:
- Distinctive: line 180
When enumerating API endpoints:
- Distinctive: line 204
When discovering hidden parameters:
- Distinctive: line 300
Avoid detection by slowing requests:
- Distinctive: line 371
Start small: - Use smaller wordlists first for quick wins
- Very specific: line 372
Filter aggressively: - Use -mc to reduce noise
- Distinctive: line 374
Verify manually: - Always check interesting results manually
- Distinctive: line 375
Rate limiting: - Avoid blocking with appropriate delays
- Distinctive: line 377
Check parameters: - Don't forget to fuzz query parameters
- Distinctive: line 401
When you need to persist directory scan findings to the database:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Directory and File Enumeration
Authorization Warning
IMPORTANT: Directory scanning without proper authorization may be detected as intrusion attempts. Always ensure you have:
- Written permission from the target application owner
- Defined scope of authorized testing
- Legal compliance with local regulations
Prerequisites
Required tools that must be installed on your system:
- ffuf -
go install github.com/ffuf/ffuf@latest - gobuster -
go install github.com/OJ/gobuster/v3/cmd/gobusterdir@main
Optional tools:
- feroxbuster -
cargo install feroxbuster - dirsearch -
pip install dirsearch - dirb - Package manager installation
Quick Start
Most commonly used commands for directory enumeration:
Fast Directory Scan (ffuf)
ffuf -w wordlist.txt -u https://target.com/FUZZRecursive Scan with Status Codes
ffuf -w wordlist.txt -u https://target.com/FUZZ -mc 200,301,302 -recursionGobuster Quick Scan
gobuster dir -u https://target.com -w wordlist.txt -t 50Common Scenarios
Scenario 1: Basic Directory Fuzzing
When you need to discover directories and files:
ffuf -w wordlist.txt -u https://target.com/FUZZParameters:
-w wordlist.txt- Wordlist path-u- Target URL with FUZZ keyword-t- Threads (default: 40)
Example:
ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u https://target.com/FUZZScenario 2: Filter by Status Code
When you only want specific HTTP status codes:
ffuf -w wordlist.txt -u https://target.com/FUZZ -mc 200,301,302,403Status Code Filters:
| Code | Meaning |
| 200 | OK (valid page) |
| 301,302 | Redirects |
| 403 | Forbidden (directory exists, no access) |
| 401 | Authentication required |
Negation filter (exclude codes):
ffuf -w wordlist.txt -u https://target.com/FUZZ -mc 200,204,301,302,307,401,403 -mc 404Scenario 3: Recursive Scanning
When you need to scan discovered directories recursively:
ffuf -w wordlist.txt -u https://target.com/FUZZ -recursion -recursion-depth 2Parameters:
-recursion- Enable recursive scanning-recursion-depth- Maximum depth (default: 0)
Example:
ffuf -w wordlist.txt -u https://target.com/FUZZ -recursion -recursion-depth 3Scenario 4: File Extension Fuzzing
When searching for specific file types:
ffuf -w wordlist.txt -u https://target.com/FUZZ -X .txtMultiple extensions:
ffuf -w wordlist.txt -u https://target.com/FUZZ -X .txt,.php,.bak,.oldExtension from wordlist:
# Format: extension:wordlist
ffuf -w extensions.txt:EXT -w words.txt:FUZZ -u https://target.com/FUZZ.EXTScenario 5: Hidden File Discovery
When looking for backup, config, or hidden files:
# Hidden dotfiles
ffuf -w hidden_files.txt -u https://target.com/FUZZ
# Backup files
ffuf -w wordlist.txt -u https://target.com/FUZZ -X .bak,.backup,.old,.tmp,.swp
# Config files
ffuf -w config_files.txt -u https://target.com/FUZZCommon hidden files to check:
.git
.env
.env.local
.env.backup
config.php.bak
wp-config.php.bak
.gitignore
.htaccessScenario 6: Virtual Host Discovery
When testing for virtual host routing:
ffuf -w vhosts.txt -u https://target.com -H "Host: FUZZ.target.com"Parameters:
-H- Add custom headerFUZZin header value - Replaced by wordlist entries
Example:
ffuf -w subdomains.txt -u http://192.168.1.100 -H "Host: FUZZ.example.com"Scenario 7: API Endpoint Discovery
When enumerating API endpoints:
ffuf -w api_endpoints.txt -u https://target.com/api/FUZZCommon API patterns:
/api/v1/FUZZ
/api/v2/FUZZ
/graphql
/api/graphql
/rest/FUZZWith HTTP methods:
ffuf -w endpoints.txt -u https://target.com/api/FUZZ -X GET,POST,PUT,DELETEScenario 8: Parameter Fuzzing
When discovering hidden parameters:
ffuf -w params.txt -u https://target.com/page?FUZZ=testValue fuzzing:
ffuf -w values.txt -u https://target.com/page?param=FUZZScenario 9: Gobuster Scanning
Alternative to ffuf using gobuster:
# Basic scan
gobuster dir -u https://target.com -w wordlist.txt -t 50
# With status filtering
gobuster dir -u https://target.com -w wordlist.txt -t 50 -k --status-codes 200,301,302,403
# Recursive
gobuster dir -u https://target.com -w wordlist.txt -t 50 -r
# With extensions
gobuster dir -u https://target.com -w wordlist.txt -t 50 -x php,txt,htmlScenario 10: Feroxbuster Scanning
Modern Rust-based directory scanner:
# Basic scan
feroxbuster -u https://target.com -w wordlist.txt
# With recursion and status codes
feroxbuster -u https://target.com -w wordlist.txt -C 404 --depth 3
# Scan multiple URLs
feroxbuster -u https://target.com -u https://target2.com -w wordlist.txtTool Selection Guide
| Scenario | Recommended Tool | Command |
| Quick scan | ffuf | ffuf -w wordlist.txt -u https://target.com/FUZZ |
| Recursive scan | ffuf | ffuf -w wordlist.txt -u https://target.com/FUZZ -recursion |
| Large wordlist | gobuster | gobuster dir -u https://target.com -w wordlist.txt -t 100 |
| Multi-target | feroxbuster | feroxbuster -u https://target.com -w wordlist.txt |
| Hidden files | ffuf | ffuf -w files.txt -u https://target.com/FUZZ |
| API discovery | ffuf | ffuf -w api.txt -u https://target.com/api/FUZZ |
Tool Comparison:
| Tool | Language | Speed | Features | Best For |
| ffuf | Go | Very Fast | Highly flexible, filtering | Most scenarios |
| gobuster | Go | Fast | Simple, reliable | Quick scans |
| feroxbuster | Rust | Fast | Multi-target, recursion | Large assessments |
| dirsearch | Python | Medium | Built-in wordlists | Beginners |
Common Wordlists
| Wordlist | Size | Description | Location |
| common.txt | ~4,600 | Common dirs/files | SecLists |
| raft-medium-directories | ~30,000 | Medium coverage | SecLists |
| raft-large-directories | ~60,000 | Large coverage | SecLists |
| directory-list-2.3-medium | ~220,000 | Comprehensive | DirBuster |
| apache.txt | ~5,000 | Apache defaults | SecLists |
| api-endpoints.txt | ~500 | API discovery | Custom |
SecLists paths:
/usr/share/seclists/Discovery/Web-Content/
/usr/share/seclists/Discovery/Web-Content/api/
/usr/share/seclists/Discovery/Web-Content/raft/Advanced Techniques
Rate Limiting
Avoid detection by slowing requests:
ffuf -w wordlist.txt -u https://target.com/FUZZ -rate 100User-Agent Rotation
ffuf -w wordlist.txt -u https://target.com/FUZZ \
-H "User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1)"Authentication
# Basic auth
ffuf -w wordlist.txt -u https://user:pass@target.com/FUZZ
# Header-based auth
ffuf -w wordlist.txt -u https://target.com/FUZZ \
-H "Authorization: Bearer TOKEN"Cookie/Session Based
ffuf -w wordlist.txt -u https://target.com/FUZZ \
-H "Cookie: session=YOUR_SESSION_TOKEN"Output Matching
Filter by response content:
ffuf -w wordlist.txt -u https://target.com/FUZZ \
-mr "admin" # Match response containing "admin"
ffuf -w wordlist.txt -u https://target.com/FUZZ \
-ms 1520 # Match specific response sizeOutput Formats
Save Results
# ffuf JSON output
ffuf -w wordlist.txt -u https://target.com/FUZZ -o results.json
# ffuf plain output
ffuf -w wordlist.txt -u https://target.com/FUZZ -o results.txt
# Gobuster output
gobuster dir -u https://target.com -w wordlist.txt -o results.txtResume Scanning
# ffuf resume
ffuf -w wordlist.txt -u https://target.com/FUZZ -resume-ffufTips and Best Practices
- Start small - Use smaller wordlists first for quick wins
- Filter aggressively - Use
-mcto reduce noise - Check response sizes - Same size pages often indicate false positives
- Verify manually - Always check interesting results manually
- Rate limiting - Avoid blocking with appropriate delays
- Combine wordlists - Multiple wordlists for better coverage
- Check parameters - Don't forget to fuzz query parameters
- Look for 403s - Forbidden responses reveal valid paths
Resources
Scripts
scripts/ffuf_results_parser.py- Parse and filter ffuf JSON resultsscripts/merge_wordlists.py- Merge and deduplicate multiple wordlistsscripts/status_code_analyzer.py- Analyze response patterns
References
references/ffuf_guide.md- Comprehensive ffuf referencereferences/gobuster_guide.md- Gobuster usage documentationreferences/wordlist_guide.md- Wordlist selection and creation
Scenario: Persistent Storage of Directory Scan Findings
When you need to persist directory scan findings to the database:
# Manual entry after discovering directories
python .claude/skills/recon-dir-scan/scripts/dir_scan_storage.py \
--host-ip 192.168.1.100 \
--url "https://example.com" \
--path "/admin" \
--status 200 \
--size 1234 \
--subsystem "Web Application"Parameters:
--host-ip- Target host IP (required)--url- Base URL (required)--path- Discovered path (required)--status- HTTP status code (optional)--size- Response size (optional)--tool- Tool used (default: ffuf)--subsystem- Subsystem name (optional)
Database location: ./data/results.db
Related skills: results-storage - Query data, generate reports
Assets
assets/common-dirs.txt- Common directory namesassets/common-files.txt- Common file namesassets/hidden-files.txt- Hidden and backup filesassets/api-endpoints.txt- Common API endpoints
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

