agentflocks/flocks/performing-directory-traversal-testing
Claude Code and agent skill by agentflocks/flocks
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Testing web applications for path traversal vulnerabilities that allow reading or writing arbitrary files on
Install
npx vskill@latest install agentflocks/flocks/performing-directory-traversal-testingSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as agentflocks/flocks/performing-directory-traversal-testing.
Performing Directory Traversal Testing
When to Use
- During authorized penetration tests when the application handles file paths in URL parameters or request bodies
- When testing file download, file view, or file include functionality
- For assessing Local File Inclusion (LFI) and Remote File Inclusion (RFI) vulnerabilities
- When evaluating template engines, logging systems, or report generators that reference files
- During security assessments of APIs that accept file names or paths as parameters
Prerequisites
- Authorization: Written penetration testing agreement for the target
- Burp Suite Professional: For intercepting and modifying file path parameters
- ffuf: For fuzzing file path parameters with traversal payloads
- dotdotpwn: Automated directory traversal fuzzer (
apt install dotdotpwn) - SecLists: Traversal payload wordlists from Daniel Miessler's collection
- curl: For manual testing of traversal payloads
Workflow
Step 1: Identify File Path Parameters
Find application endpoints that reference files through parameters.
Step 2: Test Basic Directory Traversal Payloads
Attempt to escape the intended directory and read sensitive files.
Step 3: Apply Encoding and Filter Bypass Techniques
Use various encoding schemes to bypass input validation filters.
Step 4: Automate with ffuf and dotdotpwn
Use automated tools for comprehensive traversal testing.
Step 5: Test Local File Inclusion (LFI) for Code Execution
If LFI is confirmed, attempt to escalate to remote code execution.
Step 6: Read High-Value Files
Target sensitive configuration and credential files.
Key Concepts
| Concept | Description | |
|---|---|---|
| Directory Traversal | Using ../ sequences to navigate to parent directories and access files outside the intended path | |
| Local File Inclusion (LFI) | Server-side inclusion of local files, potentially leading to code execution | |
| Remote File Inclusion (RFI) | Including files from external URLs (requires allow_url_include=On in PHP) | |
| Null Byte Injection | Using %00 to truncate file paths, bypassing extension checks in older PHP versions | |
| PHP Wrappers | Protocols like php://filter, php://input, data:// for reading and executing files | |
| Log Poisoning | Injecting code into log files and then including them via LFI for code execution | |
| Path Canonicalization | The process of resolving relative paths to absolute paths, which can be exploited |
Tools & Systems
| Tool | Purpose | |
|---|---|---|
| Burp Suite Professional | Request interception and Intruder for automated payload testing | |
| ffuf | Fast fuzzing with LFI/traversal wordlists | |
| dotdotpwn | Dedicated directory traversal fuzzer with multiple traversal patterns | |
| LFISuite | Automated LFI exploitation tool with multiple techniques | |
| SecLists | Comprehensive wordlists including LFI payloads and traversal patterns | |
| Kadimus | LFI scanning and exploitation tool |
Common Scenarios
Scenario 1: File Download Traversal
A document download endpoint at /download?file=report.pdf does not validate the file parameter. Replacing the value with ../../../etc/passwd returns the server's password file.
Scenario 2: Template LFI to RCE
A PHP application includes templates via ?page=home. By poisoning the Apache access log with PHP code in the User-Agent header, then including the log file, the attacker achieves remote code execution.
Scenario 3: Image Path Traversal
An image resizing service accepts ?src=images/photo.jpg. The application strips ../ once but does not recurse, so ....//....//etc/passwd bypasses the filter.
Scenario 4: Windows IIS Configuration Leak
A .NET application serves files via ?path=docs\manual.pdf. Traversing to ..\..\web.config exposes the IIS configuration file containing database connection strings.
Output Format
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.flocks/flockshub/plugins/skills/Anthropic-Cybersecurity-Skills/performing-directory-traversal-testing/SKILL.md
Popularity
- Repository stars
- 480
- Repository forks
- 90
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
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/agentflocks/flocks/performing-directory-traversal-testing)