Microsoft IIS ASP Error Page May Disclose System Information in Certain Cases
SecurityTracker Alert ID: 1014777|
SecurityTracker URL: http://securitytracker.com/id/1014777
(Links to External Site)
Date: Aug 23 2005
Disclosure of system information, Disclosure of user information|
Exploit Included: Yes |
Version(s): 5.0, 5.1, 6.0|
A vulnerability was reported in Microsoft Internet Information Server (IIS) in the standard ASP error pages. A remote user may be able to obtain system information.|
The standard ASP error page code ('[webroot]/IISHelp/common/500-100.asp') does not properly validate HTTP requests. The code trusts the value of the user-supplied SERVER_NAME parameter to determine whether to display additional error information when an error is encountered in executing an ASP page.
If the SERVER_NAME parameter is set to 'localhost', the code will display the ASP code where the error occurred.
A remote user can supply a specially crafted HTTP header to cause the error page to incorrectly determine the request to have originated from the localhost interface. In this case, if there is an error in the requested ASP page, some potentially sensitive ASP code may be displayed.
The vendor was notified on January 28, 2005.
Inge Henriksen reported this vulnerability.
Additional demonstration exploit examples are available at:
A remote user may be able to obtain limited portions of ASP code in certain cases.|
No solution was available at the time of this entry.|
Vendor URL: www.microsoft.com/ (Links to External Site)
|Underlying OS: Windows (Any)|
Source Message Contents
Subject: Remote IIS 5.x and IIS 6.0 Server Name Spoof|
** Inge Henriksen Security Advisory - Full Disclosure Proof of Concept at http://ingehenriksen.blogspot.com/ **
HTTP request. Thus potentially revealing sensitive ASP code through the IIS 500-100.asp error page, the spoof also opens up a potential
range of exploits in third party web applications and web services.
a ASP page has an error, the code on the fault line in the ASP page is shown in the browser, but only if"SERVER_NAME" IIS server
variable is "localhost". One can spoof the "SERVER_NAME" IIS server variable so that it shows whatever one want. Other third party
web applications or web services may also be vulnerable if authentication depends on the validity this server variable.
The IIS server variable that can be spoofed is the "SERVER_NAME", it can be accessed through request.servervariables("SERVER_NAME")
with ASP, and HttpContext.Current.Request.ServerVariables("SERVER_NAME") with .NET, other programming languages have other methods
to access this server variable, but are equally vulnerable.
If the HTTP request comes from a remote client, then the server variable "SERVER_NAME" returns the IP address of the web server itself.
If the HTTP request came from the same IP as the web server (thus the request came from the an authenticated user browsing from the
web server itself), then request.servervariables("SERVER_NAME") returns "localhost". This fact is used as "proof" in web applications
or web services that the person browsing the web server is in fact browsing from the web server itself. The web applications or web
services may use this proof to display an administrative interface to the web browser user if such is the case. One exploitable example
is the IIS 5.x 500-100.asp page; the page uses the server variable to determine if to display the code where the error occurred.
The technical description of the server variable is "The server's host name, DNS alias, or IP address as it would appear in self-referencing
URLs", it is therefore often used to determine the IP address of the web server itself in once code, this opens up for a range of
exploits including cookie-stealing, data redirection, and other URL manipulation issues.
There are many other applications that utilize validity of this server variable, and MSDN holds many examples for developers that
web service based on these examples are probably vulnerable due to the bug.
Vendor Status: Notified 28. January 2005
Full Disclosure Proof of Consept at http://ingehenriksen.blogspot.com/