5. Blacklist filters

Following the same flow as the previous section just by modifying a request:

We'll intercept an image upload request with Burp, replace the file content and filename with our PHP script's, and forward the request:

app will return: Ext not allowed

Two common types of validating exts on backend:

Validation may also check filetype / file content for type matching. Weakest form of these is testing the file extension against a BLACKLIST of extensions to determine whether to block it

Fuzzing file upload extensions

PATT php and .net: https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Upload%20Insecure%20Files/Extension%20PHP/extensions.lst https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Upload%20Insecure%20Files/Extension%20ASP

Do a standard burp intruder attack to fuzz.

Then, upload a file using an allowed extension and see if any of them allow us to execute php code.

One such example is .phtml which php webservers often allow for code execution rights.