path-traversal
Skill953 starsChanged 2 months agoApache-2.0View on GitHub
路径遍历(Path Traversal)发生在 Web 应用未对文件路径进行充分校验时,攻击者可通过 ../ 跳出预期目录,读取任意文件。 常见成因: - 用户输入直接拼接文件路径(readfile("/uploads/" + user_input)) - 未过滤 ../ 序列 - 未限制访问范围(chroot jail 缺失) Payload 1 — 基本遍历: Payload 2 — 编码绕过: Payload 3 — Windows 路径: 判断依据: - 响应包含 root:x:0:0 → /etc/passwd 被读取 - 响应包含 [fonts] → win.ini 被读取 - 404 → 文件不存在或被拦截
6 other projects use a version of this.
Adopted by
Most recently taken up by
- awarexone/AXguardtheir own version, first seen Sep 15, 2026
- ajtazer/heckittheir own version, first seen Sep 11, 2026
- emre-guler/websectheir own version, first seen Aug 27, 2026
- thejefflarson/soundchecktheir own version, first seen Jul 31, 2026
- hackingyseguridad/IAtheir own version, first seen Jun 19, 2026
- langbyyi/websec-skillstheir own version, first seen Jun 12, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- thejefflarson/soundcheck★ 20same name
- awarexone/AXguard★ 17same name
- langbyyi/websec-skills★ 4same name
- hackingyseguridad/IA★ 3same name
- ajtazer/heckit★ 2same name
- emre-guler/websec★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- command-injectionSkill
- csrfSkill
- deserializationSkill
- file-inclusionSkill
- file-uploadSkill
- info-disclosureSkill
- open-redirectSkill
- sqliSkill
- ssrfSkill
- sstiSkill
- webpack-js-analysisSkill
- xssSkill
- xxeSkill
The file
Files
路径遍历漏洞检测技能
原理
路径遍历(Path Traversal)发生在 Web 应用未对文件路径进行充分校验时,攻击者可通过 ../ 跳出预期目录,读取任意文件。
常见成因:
- 用户输入直接拼接文件路径(
readfile("/uploads/" + user_input)) - 未过滤
../序列 - 未限制访问范围(chroot jail 缺失)
检测方法
1. 定位文件读取点
- 文件下载:
/api/download?file=report.pdf - 图片加载:
/api/image?name=avatar.jpg - 日志查看:
/api/logs?file=access.log
2. 构造路径遍历 Payload
Payload 1 — 基本遍历:
curl "http://target/api/download?file=../../../etc/passwd"Payload 2 — 编码绕过:
curl "http://target/api/download?file=%2e%2e%2f%2e%2e%2fetc%2fpasswd"Payload 3 — Windows 路径:
curl "http://target/api/download?file=..\..\..\windows\win.ini"3. 验证文件读取
判断依据:
- 响应包含
root:x:0:0→/etc/passwd被读取 - 响应包含
[fonts]→win.ini被读取 - 404 → 文件不存在或被拦截
工具
| 工具 | 用途 |
| curl | 命令行测试 |
| Burp Suite | 抓包修改参数 |
| dotdotpwn | 自动化路径遍历工具 |
输出格式
{
"finding_id": "path-traversal-001",
"issue_type": "path-traversal",
"severity": "high",
"endpoint": "/api/download",
"parameter": "file",
"payload": "../../../etc/passwd",
"evidence": "响应包含 root:x:0:0",
"remediation": "白名单校验文件名,禁止 ../,使用 chroot jail"
}注意事项
- 只读原则:仅检测,不读取敏感文件(如私钥/密码)
- 无害 Payload:使用
/etc/passwd/win.ini验证 - 零触网:测试用 mock 或本地环境
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

