Direct Upload → RCE
Upload a server-side script directly (webshell), then request it to execute. The straightforward case once the filter is bypassed.
Upload → Other Vulnerability
The uploaded file itself isn’t code, but gets parsed somewhere (SVG renders in a browser, metadata gets displayed, an image gets processed by a vulnerable library) and that parsing step is what you’re actually exploiting.
Webshells
A webshell is the payload itself, a single file that takes a command via a parameter and executes it server-side. Match the language to the target stack, confirmed via your earlier recon. In the Shells page, you can find more about webshells and payload generation.Extension Filter Bypasses
Alternative extensions the filter didn't block
Alternative extensions the filter didn't block
Most filters block SecLists’ PHP extension list covers this exhaustively, worth fuzzing the full set against the target rather than guessing one at a time.
.php but miss the full set of extensions a given web server will still happily execute as PHP.Case manipulation
Case manipulation
On case-insensitive filesystems (Windows) or a filter doing an exact-match blacklist, changing the case still resolves to the same handler.
Double extensions
Double extensions
Relies on the filter checking one extension (often matching the first dot it finds) while the web server’s handler matches on a different one (often the last).
Which one works depends entirely on how the target parses the filename, try both directions since server configs vary.
Trailing/special characters (legacy and Windows-specific)
Trailing/special characters (legacy and Windows-specific)
Null byte (legacy PHP versions before 5.3.4 only): truncates the string at the null byte, dropping anything appended after it, including a forced extension.Trailing dot (Windows): Windows silently strips a trailing NTFS Alternate Data Streams: colon notation creates a file under an alternate stream,
. when saving a file, so shell.aspx. gets written to disk as shell.aspx, bypassing a blacklist that only matches .aspx exactly.::$DATA references the file’s actual content stream and writes a non-empty file while the extension check sees something else entirely.Custom fuzzing wordlist for extension-position tricks
Custom fuzzing wordlist for extension-position tricks
Generates every combination of special character and extension position, covers the directory-path confusion trick below as well as straightforward extension-check bypasses in one wordlist.
Path confusion: treat the filename as a directory
Path confusion: treat the filename as a directory
If the extension itself can’t be bypassed, check whether the upload directory structure can be abused instead, some configs will execute a file inside a path segment that merely contains the forbidden extension.
Content-Type and MIME Bypasses
TheContent-Type sent in the multipart upload request is simply a header provided by the client, which can be easily modified regardless of what the file actually contains..
Magic Byte Bypasses
Some filters go a step further and check the file’s actual leading bytes rather than trusting the extension or Content-Type. Prepending a valid image signature while keeping the malicious payload after it defeats this, most libraries checking the signature don’t bother validating the rest of the file matches that format.Image Metadata Attacks
If the application displays an image’s metadata back to a user (a photo gallery, an EXIF viewer), injecting a payload into a metadata field turns to an stored XSS.SVG Attacks
SVG is XML, and browsers execute<script> tags inside an SVG rendered directly, making it a reliable XSS vector when upload validation only checks “is this a valid image format.”
Quick Reference Tools
Hackviser: File Upload
Reference used for this page.
HackTricks: File Upload
Deeper dive into additional bypasses and edge cases.
List of File Signatures
Full magic byte reference for any format.
SecLists: Web Extensions
General web extension wordlist.
PayloadsAllTheThings: PHP Extensions
Exhaustive PHP-executable extension list.
fuxploider
Automated file upload vulnerability scanning and exploitation.

