Small scripts completely block WVS Scanners

Source: Internet
Author: User

From oldjun (http://www.oldjun.com /)
Recently, I found many colleagues favored my website. When my colleagues analyzed the website log, I was surprised to find that nearly 1 MB of logs were used to test the security of my website, at least MB of logs are from WVS.

Acunetix Web Vulnerability plugin is an excellent scanning tool developed in foreign countries. It can help you mine many vulnerabilities on your website, including common SQLinjection, XSS (many people think that they like to use WVS to scan the website to discover XSS, which is said to be his findings ...). Since WVS is so good, we will not give him the chance to access the website, just like blocking SQL injection.

After analyzing the header file during WVS scanning, it basically contains the English name of its website: acunetix, so we started with this name. The following code is available in three versions:

1. ASP (JScript) version. For LBS users, you can use this (add or include it in the _ common. asp file ):

<%
Var StopScan = "= wvs pls go away! BY oldjun! = ";
Var requestServer = String (Request. ServerVariables ("All_Raw"). toLowerCase ();
If (Session ("stopscan") = 1 ){
Response. Write (StopScan );
Response. End;
}
If (requestServer. indexOf ("acunetix")> 0 ){
Response. Write (StopScan );
Session ("stopscan") = 1;
Response. End;
}
%>
2. ASP (VBscript) version. This can be used by General asp users, including conn. asp:

<%
Dim StopScan, RequestServer
StopScan = "= wvs pls go away! BY oldjun! ="
RequestServer = Lcase (Request. ServerVariables ("All_Raw "))
If Session ("stopscan") = 1 Then
Response. Write (StopScan)
Response. End
End If
If instr (RequestServer, "acunetix") Then
Response. Write (StopScan)
Session ("stopscan") = 1
Response. End
End If
%>
3. PHP version:

<? Php
$ Http = $ _ SERVER ["ALL_HTTP"];
If (isset ($ _ COOKIE ["StopScan"]) & $ _ COOKIE ["StopScan"]) {
Die ("= wvs pls go away! BY oldjun! = ");
}
If (strpos (strtolower ($ http), "acunetix ")){
Setcookie ("StopScan", 1 );
Die ("= wvs pls go away! BY oldjun! = ");
}
?>
The code is very simple. This article only provides an idea to intercept common WVS scans. If you can customize the header information or encounter zwell's JSKY, you can find the most matched one ~~~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.