File Upload Security Testing Checklists

 

Security Checklist

  1. Are filenames reflected back on the page? If so, are they HTML Entity encoded (XSS via file names)?

  2. Does it accept .zip files? Try a ZipSlip

  3. If it processes an image, check for Image Tragick (CVE-2016-3714)

  4. Can you bypass file type restrictions by changing the content-type value?

  5. Can you bypass file type restrictions by forging valid magic bytes?

  6. Can you upload a file with a less-common extension (such as .phtml)?

  7. Try playing with the filename in the request, a potential vector for traversal or SQL injection.

  8. Check for the acceptance of double extensions on uploaded files.

  9. Test for null-byte injection.

  10. Is the server windows? Try adding a trailing . to bypass extension blacklists, this dot will be removed automatically by the OS.

  11. Can you upload an SVG for XSS?

  12. If supported by the webserver, can you upload .htaccess files?

  13. Does the backend process the image with the PHP GD library?

  14. Is the app vulnerable to the infamous ffmpeg exploit?

  15. Can custom polyglots be developed to bypass specific filters?

  16. Does the app pass the file name to some sort of system function? If so, can you achieve RCE via code injection within the file name?

  17. Does the application run the uploaded file through exiftool? If so, can you get RCE via the djvu exploit?

  18. Can you bypass extension filters by using varied capitalization?

Comments

Popular posts from this blog

SAML Security Test Cases

Drozer - A Framework for Android Application Security Assessment.