Prevent script execution in specific web directories
Posted by danielAug 2
Most web based attacks tend to occur by uploading malicious scripts into world writable directories such as cache, and then letting the web server execute those scripts. In apache, one of preventing such scripts from being executed is to add a “.htaccess” file in that directory and insert the following lines
cd /var/www/html/mydomain/uploads
vim .htaccess
Options -ExecCGI
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
2 comments
Pingback by Webmaster Crap » Blog Archive » Prevent script execution in specific web directories | Daniel T … on August 3, 2011 at 6:58 am
[…] The rest is here: Prevent script execution in specific web directories | Daniel T … […]
Trackback by E-bike on November 17, 2011 at 3:19 am
… [Trackback]…
[…] Find More Informations here: danasmera.com/prevent-script-execution-in-specific-web-directories […]…