Tuesday, 28 October 2014

How to block Web Security Scanners from Scanning your website...




Pentesters or Hackers use web security scanner to scan the website for security bugs in web applications and services. The objective of web scanning can differ from hacking to securing the website. Web security scanner creates a mess on the targeted server and use heavy bandwidth of the server during scanning process.

So to block the scanners or exploiters to scan your website, a trick is shared. Just add that script in to the .htaccess of your website and it will block the security scanners like Acunetix, nessus, SQLmap etc.

RewriteEngine On

<IfModule mod_rewrite.c>

RewriteCond %{HTTP_USER_AGENT} ^w3af.sourceforge.net [NC,OR]

RewriteCond %{HTTP_USER_AGENT} dirbuster [NC,OR]

RewriteCond %{HTTP_USER_AGENT} nikto [NC,OR]

RewriteCond %{HTTP_USER_AGENT} SF [OR]

RewriteCond %{HTTP_USER_AGENT} sqlmap [NC,OR]

RewriteCond %{HTTP_USER_AGENT} fimap [NC,OR]

RewriteCond %{HTTP_USER_AGENT} nessus [NC,OR]

RewriteCond %{HTTP_USER_AGENT} whatweb [NC,OR]

RewriteCond %{HTTP_USER_AGENT} Openvas [NC,OR]

RewriteCond %{HTTP_USER_AGENT} jbrofuzz [NC,OR]

RewriteCond %{HTTP_USER_AGENT} libwhisker [NC,OR]

RewriteCond %{HTTP_USER_AGENT} webshag [NC,OR]

RewriteCond %{HTTP:Acunetix-Product} ^WVS

RewriteRule ^.* http://127.0.0.1/ [R=301,L]

</IfModule> 


Just add above line of code in to the .htaccess of your website and it will block the written security scanner. 



 


 



RewriteEngine On
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_USER_AGENT} ^w3af.sourceforge.net [NC,OR]
RewriteCond %{HTTP_USER_AGENT} dirbuster [NC,OR]
RewriteCond %{HTTP_USER_AGENT} nikto [NC,OR]
RewriteCond %{HTTP_USER_AGENT} SF [OR]
RewriteCond %{HTTP_USER_AGENT} sqlmap [NC,OR]
RewriteCond %{HTTP_USER_AGENT} fimap [NC,OR]
RewriteCond %{HTTP_USER_AGENT} nessus [NC,OR]
RewriteCond %{HTTP_USER_AGENT} whatweb [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Openvas [NC,OR]
RewriteCond %{HTTP_USER_AGENT} jbrofuzz [NC,OR]
RewriteCond %{HTTP_USER_AGENT} libwhisker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} webshag [NC,OR]
RewriteCond %{HTTP:Acunetix-Product} ^WVS
RewriteRule ^.* http://127.0.0.1/ [R=301,L]
</IfModule> - See more at: http://thehackerspost.com/2013/09/block-website-web-security-scanners.html#sthash.AdEzY2nl.dpuf
RewriteEngine On
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_USER_AGENT} ^w3af.sourceforge.net [NC,OR]
RewriteCond %{HTTP_USER_AGENT} dirbuster [NC,OR]
RewriteCond %{HTTP_USER_AGENT} nikto [NC,OR]
RewriteCond %{HTTP_USER_AGENT} SF [OR]
RewriteCond %{HTTP_USER_AGENT} sqlmap [NC,OR]
RewriteCond %{HTTP_USER_AGENT} fimap [NC,OR]
RewriteCond %{HTTP_USER_AGENT} nessus [NC,OR]
RewriteCond %{HTTP_USER_AGENT} whatweb [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Openvas [NC,OR]
RewriteCond %{HTTP_USER_AGENT} jbrofuzz [NC,OR]
RewriteCond %{HTTP_USER_AGENT} libwhisker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} webshag [NC,OR]
RewriteCond %{HTTP:Acunetix-Product} ^WVS
RewriteRule ^.* http://127.0.0.1/ [R=301,L]
</IfModule> - See more at: http://thehackerspost.com/2013/09/block-website-web-security-scanners.html#sthash.AdEzY2nl.dpuf




RewriteEngine On
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_USER_AGENT} ^w3af.sourceforge.net [NC,OR]
RewriteCond %{HTTP_USER_AGENT} dirbuster [NC,OR]
RewriteCond %{HTTP_USER_AGENT} nikto [NC,OR]
RewriteCond %{HTTP_USER_AGENT} SF [OR]
RewriteCond %{HTTP_USER_AGENT} sqlmap [NC,OR]
RewriteCond %{HTTP_USER_AGENT} fimap [NC,OR]
RewriteCond %{HTTP_USER_AGENT} nessus [NC,OR]
RewriteCond %{HTTP_USER_AGENT} whatweb [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Openvas [NC,OR]
RewriteCond %{HTTP_USER_AGENT} jbrofuzz [NC,OR]
RewriteCond %{HTTP_USER_AGENT} libwhisker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} webshag [NC,OR]
RewriteCond %{HTTP:Acunetix-Product} ^WVS
RewriteRule ^.* http://127.0.0.1/ [R=301,L]
</IfModule> - See more at: http://thehackerspost.com/2013/09/block-website-web-security-scanners.html#sthash.AdEzY2nl.dpuf

0 comments:

Post a Comment