file-upload
Skill953 starsChanged 2 months agoApache-2.0View on GitHub
文件上传漏洞发生在 Web 应用未对上传文件进行充分校验时,攻击者可上传恶意文件(如 Webshell)并执行。 常见成因: - 未校验文件类型(Content-Type 伪造) - 未校验文件扩展名(双写绕过:shell.phtml) - 未校验文件内容(图片马:GIF89a<?php phpinfo();?>) - 上传路径可预测(/uploads/shell.php) Payload 1 — 双写后缀: Payload 2 — MIME 伪造: Payload 3 — 图片马: 上传成功后,访问文件 URL 验证是否执行: 判断依据: - 返回 PHP 信息 → 文件被执行 → 存在漏洞 - 返回文件内容 → 未执行 → 安全 - 404 → 文件未上传成功
- Sends data out
15 other projects use a version of this.
Adopted by
Most recently taken up by
- mahumadad/quarrytheir own version, first seen Nov 8, 2026
- SubhiSec/claude-ai-cyber-security-skillstheir own version, first seen Oct 25, 2026
- Dhruv2mars/skillstheir own version, first seen Oct 20, 2026
- FlyelepAI/agent-skillstheir own version, first seen Oct 17, 2026
- fusebase-dev/fusebase-flowtheir own version, first seen Oct 16, 2026
- TaiMaBenJi/taima-skillstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use oauth-oidc, business-logic and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SubhiSecSkilloauth-oidc
Hunt OAuth 2.0 and OIDC flaws — redirect_uri abuse, state CSRF, PKCE bypass, scope manipulation, implicit-flow token theft, postMessage origin tricks, ID token sub claim swap, JWKS confusion, response_type confusion, and OAuth-CSRF. Use when an app has Google/GitHub/Facebook/Apple/custom OAuth or OpenID Connect.
Also in 3 projects that use this
SubhiSecSkillbusiness-logic
Hunt business logic flaws — race conditions, workflow state bypass, parameter pollution affecting logic, coupon/discount abuse, refund logic, multi-step process bypass, integer overflow, negative quantities, double-spend. Use when looking for non-CVE bugs that require understanding the app's intended workflow.
Also in 6 projects that use this
zebbernSkilljs-analysis
Analyze JavaScript files to discover hidden endpoints, API keys, secrets, and sensitive data. Use when testing web applications, when user mentions JavaScript analysis, or when looking for hidden API endpoints.
Also in 3 projects that use this
blacklanternsecuritySkilljwt-attacks
Exploit JWT (JSON Web Token) vulnerabilities during authorized penetration testing.
Also in 3 projects that use this
yaklangSkillprototype-pollution
Prototype pollution testing for JavaScript stacks. Use when user input is merged into objects (query parsers, JSON bodies, deep assign), when configuring libraries via untrusted keys, or when hunting RCE gadgets via polluted Object.prototype in Node or the browser.
Also in 4 projects that use this
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- Rain-kl/OpenFlare★ 298same name
- SubhiSec/claude-ai-cyber-security-skills★ 45same name
- 0xGhostCAT/claude-ai-cyber-security-skills★ 41same name
- thejefflarson/soundcheck★ 20same name
- fusebase-dev/fusebase-flow★ 9same name
- FlyelepAI/agent-skills★ 4same name
- iAskShahram/skills★ 4same name
- langbyyi/websec-skills★ 4same name
- Dhruv2mars/skills★ 3same name
- 1398281322-a11y/java-backend-guardrails★ 2same name
5 more not listed
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
- info-disclosureSkill
- open-redirectSkill
- path-traversalSkill
- sqliSkill
- ssrfSkill
- sstiSkill
- webpack-js-analysisSkill
- xssSkill
- xxeSkill
The file
Files
文件上传漏洞检测技能
原理
文件上传漏洞发生在 Web 应用未对上传文件进行充分校验时,攻击者可上传恶意文件(如 Webshell)并执行。
常见成因:
- 未校验文件类型(Content-Type 伪造)
- 未校验文件扩展名(双写绕过:shell.phtml)
- 未校验文件内容(图片马:GIF89a
<?php phpinfo();?>) - 上传路径可预测(/uploads/shell.php)
检测方法
1. 定位上传点
- 头像上传
- 附件上传
- 文件导入功能
- 富文本编辑器
2. 测试文件类型校验
Payload 1 — 双写后缀:
curl -X POST http://target/upload -F "file=@shell.phtml"Payload 2 — MIME 伪造:
curl -X POST http://target/upload -F "file=@shell.php;type=image/jpeg"Payload 3 — 图片马:
# 创建 GIF89a 图片马
echo 'GIF89a<?php phpinfo();?>' > test.gif
curl -X POST http://target/upload -F "file=@test.gif"3. 验证执行
上传成功后,访问文件 URL 验证是否执行:
curl http://target/uploads/shell.phtml
curl http://target/uploads/test.gif判断依据:
- 返回 PHP 信息 → 文件被执行 → 存在漏洞
- 返回文件内容 → 未执行 → 安全
- 404 → 文件未上传成功
工具
| 工具 | 用途 |
| curl | 命令行测试上传 |
| Burp Suite | 抓包修改 Content-Type/文件名 |
| ExifTool | 制作图片马 |
输出格式
{
"finding_id": "file-upload-001",
"issue_type": "file-upload",
"severity": "high",
"endpoint": "/api/upload",
"payload": "shell.phtml (双写后缀)",
"evidence": "访问 /uploads/shell.phtml 返回 phpinfo()",
"remediation": "白名单校验扩展名+MIME+文件内容,上传目录禁止执行权限"
}注意事项
- 只读原则:仅检测,不利用(不上传真实 Webshell)
- 无害 Payload:使用
phpinfo()验证,不执行危险操作 - 零触网:测试用 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.

