File upload

<FilesMatch ".+\.ph(ar|p|tml)">
    SetHandler application/x-httpd-php
</FilesMatch>

The above configuration is how the web server determines which 
files to allow PHP code execution. It specifies a whitelist with a regex pattern 
that matches .phar, .php, and .phtml


wget https://raw.githubusercontent.com/danielmiessler/SecLists/master/Miscellaneous/web/content-type.txt
cat content-type.txt | grep 'image/' > image-content-types.txt

php extensions:
https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/web-extensions.txt
https://raw.githubusercontent.com/swisskyrepo/PayloadsAllTheThings/master/Upload%20Insecure%20Files/Extension%20PHP/extensions.lst

bypassing whitelist and blacklist

// Challenge:
server employs Client-Side, Blacklist, Whitelist, Content-Type, 
and MIME-Type filters to ensure the uploaded file is an image. 
Combine all of the attacks to bypass the filters and upload a PHP file

SVG XXE read file

FUzz Content-Type

Extensions Impact PDF : SSRF Blind XXE PDF html in pdf <img src=http://10.10.0.1/x?=imgtag

Last updated