Loading...
Loading...
Compare original and translation side by side
AI LOAD INSTRUCTION: Expert file upload attack playbook. Use when the target accepts files, imports, avatars, media, documents, or archives and you need the full workflow: validation bypass, storage path abuse, post-upload access, parser exploitation, multi-tenant overwrite, and chaining into XSS, XXE, CMDi, traversal, or business logic impact. For web server parsing vulnerabilities, PUT method exploitation, and specific CVEs (WebLogic, Flink, Tomcat), load the companion SCENARIOS.md.
AI 加载指引:专家级文件上传攻击操作手册。当目标支持接收文件、导入内容、头像、媒体、文档或压缩包,且你需要完整的攻击工作流时使用:校验绕过、存储路径滥用、上传后访问、解析器利用、多租户覆盖,以及链式利用实现XSS、XXE、CMDi、路径遍历或业务逻辑影响。如需了解Web服务器解析漏洞、PUT方法利用以及特定CVE(WebLogic、Flink、Tomcat),请加载配套文档 SCENARIOS.md。
x.asp/;shell.asp;.jpgavatar.jpg/.phpcgi.fix_pathinfo=1AddHandler\nreadonly.jsp//.phpx.asp/;shell.asp;.jpgcgi.fix_pathinfo=1avatar.jpg/.phpAddHandler\nreadonly.jsp//.php| Validation Style | What to Test |
|---|---|
| extension blacklist | double extension, case toggles, trailing dot, alternate separators |
| content-type only | mismatched multipart |
| magic-byte only | polyglot files or valid header plus dangerous tail content |
| server-side rename | whether dangerous content survives rename and later rendering |
| image-only policy | SVG, malformed image plus metadata, parser differential |
| archive or import only | zip contents, nested path names, XML members, decompression behavior |
shell.php.jpg
avatar.jpg.php
file.asp;.jpg
file.php%00.jpg
file.svg
archive.zip| 校验类型 | 测试内容 |
|---|---|
| 扩展名黑名单 | 双扩展名、大小写切换、尾部点号、替代分隔符 |
| 仅校验Content-Type | 不匹配的multipart |
| 仅校验Magic Bytes | Polyglot混合格式文件、合法头部加危险尾部内容 |
| 服务端重命名 | 危险内容是否会在重命名后留存并在后续渲染时触发风险 |
| 仅允许图片策略 | SVG、带元数据的畸形图片、解析器差异利用 |
| 仅允许压缩包或导入文件 | 压缩包内容、嵌套路径名、XML成员、解压行为 |
shell.php.jpg
avatar.jpg.php
file.asp;.jpg
file.php%00.jpg
file.svg
archive.zip/uploads/USER_ID/avatar.png
/files/org-slug/report.pdf
/cdn/tmp/<uuid>/<filename>/uploads/USER_ID/avatar.png
/files/org-slug/report.pdf
/cdn/tmp/<uuid>/<filename>| Processor | Risk |
|---|---|
| image resizing or thumbnailing | parser differential, ImageMagick or library bugs, metadata reflection |
| video or audio transcoding | FFmpeg-style parsing and protocol abuse |
| archive extraction | zip slip, overwrite, decompression bombs |
| document import | CSV formula injection, office XML parsing, macro-adjacent workflows |
| XML or SVG parsing | XXE, SSRF, local file disclosure |
| HTML to PDF or preview rendering | SSRF, script execution, local file references |
| AV or DLP scanning | unzip depth, hidden nested content, race conditions |
| 处理器 | 风险 |
|---|---|
| 图片缩放或缩略图生成 | 解析器差异、ImageMagick或依赖库漏洞、元数据回显 |
| 音视频转码 | FFmpeg类解析与协议滥用 |
| 压缩包解压 | Zip Slip、文件覆盖、解压炸弹 |
| 文档导入 | CSV公式注入、Office XML解析、类宏工作流风险 |
| XML或SVG解析 | XXE、SSRF、本地文件泄露 |
| HTML转PDF或预览渲染 | SSRF、脚本执行、本地文件引用 |
| 杀毒或DLP扫描 | 解压深度限制、隐藏嵌套内容、竞争条件 |
| Observation | Pivot |
|---|---|
| SVG or XML accepted | xxe xml external entity |
| filename or metadata reflected | xss cross site scripting |
| converter or processor shells out | cmdi command injection |
| extraction path looks controllable | path traversal lfi |
| overwrite, quota, approval, or tenant bug | business logic vulnerabilities |
| 观察到的现象 | 切换到对应测试方向 |
|---|---|
| 支持接收SVG或XML | XXE XML外部实体注入 |
| 文件名或元数据会被回显 | XSS跨站脚本 |
| 转换器或处理器会调用Shell | CMDi命令注入 |
| 解压路径看起来可控 | 路径遍历与本地文件包含 |
| 存在覆盖、配额、审批或租户漏洞 | 业务逻辑漏洞 |
[] Confirm accept/store/process/serve stages separately
[] Test one extension bypass and one content-based payload
[] Check inline render vs forced download
[] Inspect filenames, metadata, and preview surfaces for reflection
[] Probe processing chain: image, archive, XML, document, PDF
[] Run A/B authorization on read, replace, delete, and share actions
[] Map predictable paths and public/private URL boundaries[] 分别验证接收/存储/处理/分发四个阶段
[] 测试一个扩展名绕过Payload和一个基于内容的Payload
[] 检查内联渲染与强制下载的差异
[] 排查文件名、元数据和预览面的回显风险
[] 探测处理链:图片、压缩包、XML、文档、PDF
[] 对读取、替换、删除和共享操作执行A/B权限测试
[] 梳理可预测路径与公开/私有URL边界P(RCE via Upload) = P(bypass_detection) × P(obtain_path) × P(execute_via_webserver).phpP(通过上传实现RCE) = P(绕过检测) × P(获取存储路径) × P(通过Web服务器执行).php| Editor | Common Upload Path | Version Indicator |
|---|---|---|
| FCKeditor | | |
| CKEditor | | |
| eWebEditor | | Admin: |
| KindEditor | | |
| UEditor | | |
| 编辑器 | 常见上传路径 | 版本标识路径 |
|---|---|---|
| FCKeditor | | |
| CKEditor | | |
| eWebEditor | | 后台: |
| KindEditor | | |
| UEditor | | |
| Dimension | Flaw Examples |
|---|---|
| Location | Client-side only, inconsistent front/back |
| Method | Extension blacklist (incomplete), MIME check only, magic bytes only |
| Logic order | Renames AFTER execution check, validates BEFORE full upload |
| Scope | Checks filename but not file content, checks first bytes only |
| Execution context | Upload succeeds but different vhost/handler processes the file |
| 维度 | 缺陷示例 |
|---|---|
| 位置 | 仅客户端校验、前后端校验逻辑不一致 |
| 方法 | 扩展名黑名单不完整、仅校验MIME类型、仅校验Magic Bytes |
| 逻辑顺序 | 执行检查之后再重命名、全量上传完成前就完成校验 |
| 范围 | 仅校验文件名不校验文件内容、仅校验文件前几个字节 |
| 执行上下文 | 上传成功但文件由不同的虚拟主机/处理器处理 |
undefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefined