.htaccess file to prevent files from executing in the upload/vulnerable folder
<IfModule mod_php5.c>
php_flag engine 0
</IfModule>
<IfModule mod_php7.c>
php_flag engine 0
</IfModule>
<IfModule mod_php.c>
php_flag engine 0
</IfModule>
AddHandler cgi-script .php .phtml .php3 .pl .py .jsp .asp .htm .shtml .sh .cgi
Options -ExecCGI
- Create a new file named .htaccess in the uploads folder (or any vulnerable folder)
- Copy and paste the code at the bottom of the file content
- Save and close.