.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
  1. Create a new file named .htaccess in the uploads folder (or any vulnerable folder)
  2. Copy and paste the code at the bottom of the file content
  3. Save and close.
4.9/5 - (24 votes)

Leave a Reply