path-traversal-lfi

Identify and exploit path traversal and LFI vulnerabilities to expose sensitive files.

5|1|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/Yliken/ai4 --skill path-traversal-lfi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: path-traversal-lfi
Source: https://github.com/Yliken/ai4/tree/main/skills/path-traversal-lfi
Command: npx skills add https://github.com/Yliken/ai4 --skill path-traversal-lfi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Path traversal and Local File Inclusion (LFI) exploitation playbook for expert security testing. It covers encoding bypass sequences, PHP wrappers, and RCE escalation paths to demonstrate and validate filesystem exposure in web applications.

Core Features & Use Cases

  • Enumerates traversal variants (URL encoding, double encoding, overlong UTF-8) to bypass filters and access sensitive files.
  • Demonstrates LFI-to-RCE techniques via log poisoning, PHP wrappers (php://input, data://, phar/zip), and php://filter chains.
  • Provides guidance for testing across Linux and Windows targets, with guardrails and safe-practice scenarios.

Quick Start

Test path traversal and LFI vectors in a target application by chaining common wrappers and encoding techniques to reveal sensitive files.

Frequently Asked Questions about path-traversal-lfi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I exploit LFI to achieve remote code execution using PHP wrappers?

You can escalate LFI to remote code execution by leveraging PHP wrappers like php://input, data://, and phar/zip, or by poisoning log files to execute injected payloads. PHP filter chains also enable payload execution through inclusion vectors.

What is the best way to bypass path traversal filters in web applications?

Bypass path traversal filters by enumerating encoding variants such as URL encoding, double encoding, and overlong UTF-8 sequences. These techniques circumvent inadequate input validation to access sensitive files.

Can I use path traversal techniques to test both Linux and Windows targets?

Yes, path traversal testing applies to both Linux and Windows targets. The approach requires adjusting traversal sequences and handling server-specific configurations to validate filesystem exposure across different operating systems.

How does log poisoning work for LFI to RCE escalation?

Log poisoning for LFI escalation works by injecting executable code into server log entries, then including that log file via a local file inclusion vulnerability to trigger remote code execution.

What precautions should I take during path traversal and LFI security assessments?

Path traversal and LFI testing requires strict guardrails to avoid unintended harm. Maintain safe-practice scenarios and carefully handle encoding techniques to prevent accidental data corruption during vulnerability validation.