Monday, October 18, 2010

To prevent leakage of the internal IP address of the second law


When the IIS Web site to access the static HTML file, such as index.htm, IIS response will contain a Content-Location header. If the IIS configuration properly, Content-Location header will contain the content server's IP address, this has led to hidden behind the NAT firewall or proxy server IP address of the internal network of information leakage, to the attacker tainted multiplicative.
Now I will introduce two kinds of solutions to achieve the IP address information the purpose of replacing the domain of information to help system administrators to eliminate leakage of the internal network IP address hidden.
What is the IIS's response information on the page file
When we use the Web browser to access IIS web page content server, IIS will return a complete response to the user information. Simple cases, we can consider this response message contains two parts:
1, the system information:
Such as access to state, server information, file type, text length and so on.
2, text message:
Usually what we see in the browser page content, that is, a browser can view the source code to the page content.
When we use the high-level language-related Internet content control to access a page, such as the InternetControl control using VB to write your own browser or download the program, eventually will be part contains the two complete response information.
First we look at an example, it shows the default installation of IIS on the HTML file under the response message:
HTTP/1.1 200OK
Server: Microsoft-IIS/5.0
Content-Location: http://192.168.1.1/index.htm
Date: Wed, 31Oct200104: 19:40 GMT
Content-Type: text / html
Accept-Ranges: bytes
Last-Modified: Fri, 12Oct200107: 48:06 GMT
ETag: "03f7e3af252c11: 9a2"
Content-Length: 7141
Response to the information above line 3 includes an internal network IP address information, which we do not want. We hope that the IIS to respond to the following elements:
HTTP/1.1 200OK
Server: Microsoft-IIS/5.0
Content-Location: http://www.mywebsite.com/index.htm
Date: Wed, 31Oct200104: 19:40 GMT
Content-Type: text / html
Accept-Ranges: bytes
Last-Modified: Fri, 12Oct200107: 48:06 GMT
ETag: "03f7e3af252c11: 9a2"
Content-Length: 7141
That is, the line 3 content in the IP address information for the domain name replacement information. Here's look at solutions.
Solution 1: Perform script Adsutil.vbs
IIS database by modifying a value, you can reach the Content-Location header in the IP address information into the domain of information purposes.
The first method is a VBS script through the implementation of the completion of modification work related IIS database, this script is called Adsutil.vbs, it generated with IIS installed.
Note: Due to practical application in different environments, Microsoft does not guarantee the safety of the use of this software. Therefore, I propose the implementation of this script before, make a backup of important data on the server.
For IIS4.0 server, perform the following steps:
1, click the "Start / Run", type "cmd", click "OK", access the command prompt window.
2, switch to IIS4.0 system installation directory, typically c: winntsystem32inetsrvadminsamples.
Three, the following command, modify the IIS database-related values, set Content-Location header information using the domain name:
adsutilsetw3svc/UseHostNameTrue
4, the following command, shut down Internet service program: netstopiisadmin / y
5, the following command to restart the associated Internet Application: netstartw3svc
Note: After you perform step 4, to look at what Internet applications have been stopped, and then in step 5 in order to restart them.
For IIS5.0 server, perform the following steps:
1, click the "Start / Run", type "cmd", click "OK", access the command prompt window.
2, switch to IIS5.0 system installation directory, typically c: inetpubadminscripts.
3, execute the following command, modify the IIS database-related values, set the Content-Location header using the domain information: adsutilsetw3svc/UseHostNameTrue
4, the following command, shut down Internet service program: netstopiisadmin / y
5, the following command to restart the associated Internet Application: netstartw3svc
Similarly Please note: After you perform step 4, to look at what Internet applications have been stopped, and then in step 5 in order to restart them.
Solution 2: The. Htm file renamed. ASP files, and customize the header information
I would like to introduce the second method took an indirect way of dealing with:
1, first. HTM file renamed. ASP files.
2, because IIS ASP file on the response and does not include Content-Location'';> file header contents, so then to whom in the IIS Manager to create a custom header to return a special Content-Location File header content.
Let us look at specific steps:
1, the static page file (eg. Htm,. Html) renamed. Asp file. Note that the file was renamed after this, when access to the original. Htm file, the ASP engine will start, from a performance point of view, are some slightly lower.
2, start Internet Services Manager
3, double-click "Internet Information Services", expand the contents of subordinate
4, click the server name on the left to deal with the + to expand the contents of subordinate
5, right-click "Default Web Site", select "Properties"
6, click the "head" tab

7, in the "custom header" section, click the "Add"
8, in the "Custom header name", enter "Content-Location", the "custom header value", enter your desired domain name information, such as "ttp: / / www.mywebsite.com":

9, and then click click "OK" to complete the work of all changes





Recommended links:



Audio CD Players Guide



"SACRED 2 Fallen Angel," Raiders special mounts detailed process



TS to MKV



Are Megapixels All That Matter In Camera Phones



Worth a look: The small marriage without DB2's FAQ



3GP to WMV



Wave escort firm in Hefei



TD Union angrily Qualcomm to mislead the public in the Patent fees



Compilation of various source - CLEAN



evaluation System Utilities



DivX to iPod



hal.dll damaged the problems CAUSED by Ubuntu not boot



Photoshop Rendering Realistic Beautiful Necklace



Trace And Ping Tools comments



reviews Games Sports



Confessions of an Advertising teachers: "Most people I did not tell him"



UML In Practice, The Current Situation And Some Of The Recommendations [2]



No comments:

Post a Comment