How to protect website from hackers or block Web Security Scanners from Scanning your website for vulnerabilities | UbuntuCafe

How to protect website from hackers or block Web Security Scanners from Scanning your website for vulnerabilities

A web application security scanner is a program which communicates with a web application through the web front-end in order to identify potential security vulnerabilities in the web application and architectural weaknesses. It performs a black-box test. Unlike source code scanners, web application scanners don't have access to the source code and therefore detect vulnerabilities by actually performing attacks. Pentesters or Hackers use web security scanner to scan the website for security bugs in web applications and services.
disable hacking protect website from haching

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.

Now I am going to show how to block Web Security Scanners from Scanning your website for vulnerabilities from hackers.

Just add the below script in to the .htaccess file of your website and it will block the security scanners like w3af, Acunetix, nessus, SQLmap etc.

RewriteEngine On
<IfModule mod_rewrite.c>
RewriteCond %{HTTP_USER_AGENT} ^w3af.org [NC,OR]
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>

Post a Comment