Microsoft Active Server Pages Cookie Retrieval Issue
7 May 2004
Risk Level: Low
The Active Server Pages (ASP) engine does not properly handle special
cookie values when they are retrieved. Because of this, an unhandled
error is returned to the client. This behavior can be used maliciously
to gather sensitive information from web applications.
All Microsoft Internet Information Server (IIS) web applications using
Active Server Pages (ASP).
ASP is an extension to IIS which allows HTML pages to be dynamically
generated on the server side. When the server receives a request for an
ASP file, it processes server-side scripts contained in the file to
build the page that is sent back to the browser. ASP files can also
contain HTML, including related client-side scripts, as well as calls to
COM components that perform a variety of tasks such as connecting to a
database or processing business logic. ASP pages are supported on all
Microsoft Web Servers including Personal Web Server and Internet
ASP exposes many objects to enable easy development of web applications.
These objects are used to allow browsers and web applications to easily
exchange information over HTTP. When a special value, ("="), is sent in
a Cookie header value and an ASP page tries to access this value, an
unhandled error is returned by the ASP engine.
Example HTTP request:
GET /somepage.asp HTTP/1.0
Source code snippet for somepage.asp:
value=request.cookies("cookiename") 'here the error is triggered
Value returned by the IIS server:
/file.inc, line 2
In this example, the attacker was able to determine the name of the
include file by setting the cookie to "=". Revealing information such as
the include file name could be used to find other more sensitive
Other possible problems include being able to tell when a cookie is
being read. If a cookie is set to "=" and the following return value is
/somepage.asp, line 19
The attacker has verified that the cookie was accessed on this page.
This vulnerability can be executed remotely and allows an attacker to
map web application logic determining when cookies are read, etc... This
allows an attacker to generate errors messages possibly exposing
sensitive information that can be used in further attacks.
IIS Web Servers should be configured to return custom error pages which
do not reveal details about the script which caused the error.
Information about how to create custom error pages is available at
Microsoft was contacted on December 2003.
This vulnerability was researched and discovered by Cesar Cerrudo of
Application Security, Inc.
"E' bello anche morire per le proprie idee... chi ha il coraggio di sostenere i propri valori muore una volta sola, chi ha paura muore ogni giorno".
Ci sono attualmente 1 utenti che stanno visualizzando questa discussione. (0 utenti e 1 ospiti)