Analysis on the principle and method of website Bauku

Source: Internet
Author: User

One, the way

There are a variety of ways to Bauku, I know there are more than 3, common methods of violence are:%5c-like violence ,conn.asp ,DDoS , etc.

Second, the principle

The "%5c" Bauku method, which is not a vulnerability of the Web page itself, takes advantage of an attribute in the IIS decoding mode, if IIS security settings are not comprehensive,

The web Designer does not consider IIS errors and is exploited by people.

Why use "%5c"? It is actually the hexadecimal code of "\", which is another notation for "\". In the computer, they are a kind of stuff.

However, the submission of "\" and "%5c" will produce different results, in IE, we have the first address in the following "/" to "\" commit:

_blank>http://www.qxzxp.com/soft\view.asp?id=58

_blank>http://www.qxzxp.com/soft%5cview.asp?id=58
The results of the two visits are the same. IE will automatically turn "\" into "/" to access the same address.

However, IE does not convert this when we change the "/" to "%5c" in hexadecimal notation. The "%5c" in the address was submitted as is.
When IIS receives a post-resolution, it reverts the%5c to "\". In this way, the relative path of the URLs in IIS becomes/soft/html\13/. This is important. This is where the problem begins.

In ASP Web pages, whenever a database is called, a Web page conn.asp is used to connect to the database, which creates a database connection object that defines the database path to invoke
A typical conn.asp is as follows:

<% Dim conn Dim DBPath Set Conn=server.createobject ("Adodb.connection") DBPath = Server.MapPath ("Admin/qxzxp.mdb") Conn. Open "Driver={microsoft Access driver (*.mdb)};d bq=" & DBPath%>

Attention to the 4th sentence:DBPath = Server.MapPath ("Admin/qxzxp.mdb"), the role of the Server.MapPath method is to transform the relative path in the Web site into a physical absolute path.

Why would you do that? Because the database is connected, it must indicate its absolute path.

(Some people here may not understand, what is the relative path, the absolute path?) IIS uses a relative path to represent the relationship between the directory and the file in order not to let the visitor know the actual path, and to ensure that the site is not affected by the transformation of the address. That is, the URL directory only represents the relative location from the root directory. )

For example: The above site, the site: http://www.qxzxp.com root directory: "E:\web\",

The download directory is in the root directory (E:\web\) under the "soft", when our website visits the station, is to access the E:\web\soft\ directory

And http://www.qxzxp.com/soft/admin/, it only shows the relative relationship between the admin and the soft directory.

Put this site on the D: disk, also does not change the admin in the soft directory of the relationship.

Analysis on the principle and method of website Bauku

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.