lfi

Exploits LFI and RFI vulnerabilities using PHP wrappers and path traversal.

253|37|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/blacklanternsecurity/red-run --skill lfi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lfi
Source: https://github.com/blacklanternsecurity/red-run/tree/main/skills/web/lfi
Command: npx skills add https://github.com/blacklanternsecurity/red-run --skill lfi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps penetration testers identify and exploit Local File Inclusion (LFI) and Remote File Inclusion (RFI) vulnerabilities to access sensitive files and potentially achieve code execution.

Core Features & Use Cases

  • LFI/RFI Identification: Detects and attempts to exploit file inclusion flaws.
  • Traversal & Bypass: Handles various path traversal techniques and bypasses for common filters.
  • PHP Wrapper Exploitation: Leverages php://filter, data://, and php://input for code execution and source code extraction.
  • Log Poisoning & Session Exploitation: Utilizes log files and session data for LFI to RCE.
  • Use Case: When a web application parameter is found to be vulnerable to LFI, this Skill can be used to read sensitive configuration files like /etc/passwd or even achieve remote code execution by poisoning log files.

Quick Start

Use the lfi skill to attempt to read the file /etc/passwd from the target URL.

Frequently Asked Questions about lfi

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

FAQPage Schema
How do I exploit Local File Inclusion to read sensitive files?

PHP wrappers like php://filter, data://, and php://input are used in file inclusion exploitation to extract source code and achieve remote code execution. This Skill leverages these wrappers to convert otherwise limited LFI vulnerabilities into direct code execution on the target server.

What is the best way to achieve remote code execution from an LFI vulnerability?

The best way to achieve remote code execution from an LFI vulnerability is through log poisoning or session file exploitation. This Skill automates injecting malicious code into accessible log files or session data and then including those files to trigger execution.

How do I bypass path traversal filters when attempting file inclusion?

You bypass path traversal filters during file inclusion by applying various encoding and manipulation techniques to the targeted file path. This Skill handles multiple filter bypass strategies automatically, allowing you to reach restricted system files despite input sanitization.

Can I use Remote File Inclusion techniques to execute code on misconfigured PHP servers?

Yes, you can use Remote File Inclusion (RFI) to execute code on misconfigured PHP servers by supplying a remote URL to a vulnerable parameter. This Skill identifies RFI flaws and leverages specific PHP configurations to run external code directly.

When should I use PHP wrappers instead of standard path traversal for file disclosure?

You should use PHP wrappers instead of standard path traversal when you need to extract raw source code or stream input directly, rather than just reading file contents. This Skill applies wrappers like php://filter to bypass execution and retrieve underlying application code.