Vulnerabilities > CVE-2003-1567 - Information Exposure vulnerability in Microsoft Internet Information Services 5.0

047910
CVSS 5.8 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
NONE
network
microsoft
CWE-200
nessus

Summary

The undocumented TRACK method in Microsoft Internet Information Services (IIS) 5.0 returns the content of the original request in the body of the response, which makes it easier for remote attackers to steal cookies and authentication credentials, or bypass the HttpOnly protection mechanism, by using TRACK to read the contents of the HTTP headers that are returned in the response, a technique that is similar to cross-site tracing (XST) using HTTP TRACE.

Vulnerable Configurations

Part Description Count
Application
Microsoft
1

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Subverting Environment Variable Values
    The attacker directly or indirectly modifies environment variables used by or controlling the target software. The attacker's goal is to cause the target software to deviate from its expected operation in a manner that benefits the attacker.
  • Footprinting
    An attacker engages in probing and exploration activity to identify constituents and properties of the target. Footprinting is a general term to describe a variety of information gathering techniques, often used by attackers in preparation for some attack. It consists of using tools to learn as much as possible about the composition, configuration, and security mechanisms of the targeted application, system or network. Information that might be collected during a footprinting effort could include open ports, applications and their versions, network topology, and similar information. While footprinting is not intended to be damaging (although certain activities, such as network scans, can sometimes cause disruptions to vulnerable applications inadvertently) it may often pave the way for more damaging attacks.
  • Exploiting Trust in Client (aka Make the Client Invisible)
    An attack of this type exploits a programs' vulnerabilities in client/server communication channel authentication and data integrity. It leverages the implicit trust a server places in the client, or more importantly, that which the server believes is the client. An attacker executes this type of attack by placing themselves in the communication channel between client and server such that communication directly to the server is possible where the server believes it is communicating only with a valid client. There are numerous variations of this type of attack.
  • Browser Fingerprinting
    An attacker carefully crafts small snippets of Java Script to efficiently detect the type of browser the potential victim is using. Many web-based attacks need prior knowledge of the web browser including the version of browser to ensure successful exploitation of a vulnerability. Having this knowledge allows an attacker to target the victim with attacks that specifically exploit known or zero day weaknesses in the type and version of the browser used by the victim. Automating this process via Java Script as a part of the same delivery system used to exploit the browser is considered more efficient as the attacker can supply a browser fingerprinting method and integrate it with exploit code, all contained in Java Script and in response to the same web page request by the browser.
  • Session Credential Falsification through Prediction
    This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking.

Nessus

NASL familyWeb Servers
NASL idXST_HTTP_TRACE.NASL
descriptionThe remote web server supports the TRACE and/or TRACK methods. TRACE and TRACK are HTTP methods that are used to debug web server connections.
last seen2020-04-30
modified2003-01-23
plugin id11213
published2003-01-23
reporterThis script is Copyright (C) 2003-2020 E-Soft Inc.
sourcehttps://www.tenable.com/plugins/nessus/11213
titleHTTP TRACE / TRACK Methods Allowed
code
#
# This script was written by Thomas Reinke <[email protected]>
# Improvements re TRACK and RFP reference courtesy of <[email protected]>
# Improvements by rd - http_get() to get full HTTP/1.1 support,
# security_warning() instead of security_hole(), slight re-phrasing
# of the description
#
# See the Nessus Scripts License for details
#

# Changes by Tenable:
#   - added solution in the plugin output for JSAS9 (3/29/13)
#   - added CVE xref.
#   - title update (9/18/09)
#   - updated CVSS score (12/14/2015)
#   - Added note when TRACE/TRACK is enabled but reply is empty, added CVSSv3 score. (26/11/2018)

include("compat.inc");

if (description)
{
 script_id(11213);
 script_version("1.73");
 script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/12");

 script_cve_id("CVE-2003-1567", "CVE-2004-2320", "CVE-2010-0386");
 script_bugtraq_id(9506, 9561, 11604, 33374, 37995);
 script_xref(name:"CERT", value:"288308");
 script_xref(name:"CERT", value:"867593");

 script_name(english:"HTTP TRACE / TRACK Methods Allowed");
 script_summary(english:"Test for TRACE / TRACK Methods.");

 script_set_attribute(attribute:"synopsis", value:
"Debugging functions are enabled on the remote web server.");
 script_set_attribute(attribute:"description", value:
"The remote web server supports the TRACE and/or TRACK methods. TRACE
and TRACK are HTTP methods that are used to debug web server
connections.");
 script_set_attribute(attribute:"see_also", value:"https://www.cgisecurity.com/whitehat-mirror/WH-WhitePaper_XST_ebook.pdf");
 script_set_attribute(attribute:"see_also", value:"http://www.apacheweek.com/issues/03-01-24");
 script_set_attribute(attribute:"see_also", value:"https://download.oracle.com/sunalerts/1000718.1.html");
 script_set_attribute(attribute:"solution", value:
"Disable these HTTP methods. Refer to the plugin output for more information.");
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
 script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
 script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N");
 script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
 script_set_attribute(attribute:"cvss_score_source", value:"CVE-2004-2320");
 script_set_attribute(attribute:"cvss_score_rationale", value:"Tenable believes the XST vulnerability only affects Confidentiality, not Integrity (reflected in NVD's score for CVE-2010-0386)");
 script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
 script_set_attribute(attribute:"exploit_available", value:"false");
 script_cwe_id(16, 200);

 script_set_attribute(attribute:"vuln_publication_date", value:"2003/01/20");
 script_set_attribute(attribute:"plugin_publication_date", value:"2003/01/23");

 script_set_attribute(attribute:"plugin_type", value:"remote");
 script_end_attributes();

 script_category(ACT_GATHER_INFO);
 script_copyright(english:"This script is Copyright (C) 2003-2020 E-Soft Inc.");
 script_family(english:"Web Servers");

 script_dependencies("http_version.nasl");
 script_require_ports("Services/www", 80);
 exit(0);
}

sol["apache"] = "
To disable these methods, add the following lines for each virtual
host in your configuration file :

    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]

Alternatively, note that Apache versions 1.3.34, 2.0.55, and 2.2
support disabling the TRACE method natively via the 'TraceEnable'
directive.
";

sol["iis"] = "
Use the URLScan tool to deny HTTP TRACE requests or to permit only the
methods needed to meet site requirements and policy.
";

sol["SunONE"] = '
To disable this method, add the following to the default object
section in obj.conf :

    <Client method="TRACE">
     AuthTrans fn="set-variable"
     remove-headers="transfer-encoding"
     set-headers="content-length: -1"
     error="501"
    </Client>

If you are using Sun ONE Web Server releases 6.0 SP2 or below, compile
the NSAPI plugin located at :

http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsalert%2F50603
';

sol["Sun_JSAS7"] = '
To disable this method, add the following to the top of the default
object in <server-instance>-obj.conf :

  <Client method="TRACE">
  AuthTrans fn="set-variable" remove-headers="transfer-encoding"
  set-headers="content-length: -1" error="501"
           </Client>

and restart the Application server.
';

# this fix also works for JSAS 8 (tested against 8.2) even though it's undocumented for that version.
# unfortunately version 8 doesn't explicitly report its version in the server header
sol["Sun_JSAS9"] = '
To disable this method, edit domain.xml, adding the "traceEnabled"
property (set to "false") to the end of the http-service element :

        <property name="traceEnabled" value="false"/>
      </http-service>

and restart the application server.  Refer to the JSAS 9 Administrator
Reference for more information :

http://docs.oracle.com/cd/E19501-01/819-3661/auto126/index.html
';

#
# The script code starts here
#

include("global_settings.inc");
include("http_func.inc");
include("http_keepalive.inc");

note = "";

port = get_http_port(default:80, embedded:TRUE);

if (! get_port_state(port)) exit(0, 'Port ' + port + ' is not open.');

banner = get_http_banner(port:port);
if ( ! banner ) exit(1, 'Unable to get the web server banner on port ' + port + '.');

if ( egrep(pattern:"^Server:.*IIS", string:banner) ) report = sol["iis"];
else if ( egrep(pattern:"^Server:.*Apache", string:banner) ) report = sol["apache"];
else if ( egrep(pattern:"^Server.*SunONE", string:banner) ) report = sol["SunONE"];
else if ( egrep(pattern:"^Server.*Sun-Java-System-Application-Server/7", string:banner) ) report = sol["Sun_JSAS7"];
else if ( egrep(pattern:"^Server.*Sun Java System Application Server (Platform Edition )?9", string:banner) ) report = sol["Sun_JSAS9"];

file = "/Nessus"+rand() + ".html";	# Does not exist

    cmd1 = http_get(item: file, port:port);
    cmd2 = cmd1;
    
    cmd1 = ereg_replace(pattern:"GET /", string:cmd1, replace:"TRACE /");
    cmd2 = ereg_replace(pattern:"GET /", string:cmd2, replace:"TRACK /");

    ua = egrep(pattern:"^User-Agent", string:cmd1, icase:TRUE);
 
    reply = http_keepalive_send_recv(port:port, data:cmd1, bodyonly:FALSE);
    if ( reply == NULL ) exit(0, 'The host is not affected on port ' + port + '.');
    if ( ereg(pattern:"^HTTP/.* 200 ", string:reply) )
    {
     r = strstr(reply, '\r\n\r\n');
     if (! r ) r = strstr(reply, '\n\n');
     full_reply = reply;
     reply = r;
     if(egrep(pattern:"^TRACE "+file+" HTTP/1\.", string:reply))
     {
	if ( ua && tolower(ua) >!< tolower(reply) ) exit(0, 'The host is not affected on port ' + port + '.');
        report += string(
          '\n',
          "Nessus sent the following TRACE request : \n",
          "\n",
          crap(data:"-", length:30), " snip ", crap(data:"-", length:30), "\n",
          str_replace(find:'\r\n', replace:'\n', string:cmd1),
          crap(data:"-", length:30), " snip ", crap(data:"-", length:30), "\n",
          "\n",
          "and received the following response from the remote server :\n",
          "\n",
          crap(data:"-", length:30), " snip ", crap(data:"-", length:30), "\n",
          str_replace(find:'\r\n', replace:'\n', string:full_reply),
          crap(data:"-", length:30), " snip ", crap(data:"-", length:30), "\n"
        );
	security_warning(port:port, extra:report);
	set_kb_item(name: 'www/'+port+'/XSS', value: TRUE);
	exit(0);
     }
     else
     {
       note += '\n\nAlthough TRACE is enabled on the remote web server, the server\n' +
               'replies with an empty response, which prevents XST (cross-site\n' +
               'tracing).';
     }
    }

    reply = http_keepalive_send_recv(port:port, data:cmd2, bodyonly:FALSE);
    if ( ereg(pattern:"^HTTP/.* 200 ", string:reply) )
    {
     r = strstr(reply, '\r\n\r\n');
     if (! r ) r = strstr(reply, '\n\n');
     full_reply = reply;
     reply = r;
     if(egrep(pattern:"^TRACK "+file+" HTTP/1\.", string:reply))
     {
       if ( ua && tolower(ua) >!< tolower(reply) ) exit(0, 'The host is not affected on port ' + port + '.');

       report += string(
         '\n',
         "Nessus sent the following TRACK request : \n",
         "\n",
         crap(data:"-", length:30), " snip ", crap(data:"-", length:30), "\n",
         str_replace(find:'\r\n', replace:'\n', string:cmd2),
         crap(data:"-", length:30), " snip ", crap(data:"-", length:30), "\n",
         "\n",
         "and received the following response from the remote server :\n",
         "\n",
         crap(data:"-", length:30), " snip ", crap(data:"-", length:30), "\n",
         str_replace(find:'\r\n', replace:'\n', string:full_reply),
         crap(data:"-", length:30), " snip ", crap(data:"-", length:30), "\n"
       );
       security_warning(port:port, extra:report);
       set_kb_item(name: 'www/'+port+'/XSS', value: TRUE);
     }
     else
     {
       note += '\n\nAlthough TRACK is enabled on the remote web server, the server\n' +
               'replies with an empty response, which prevents XST (cross-site\n' +
               'tracing).';
     }
   }
exit(0, 'The host is not affected on port ' + port + '.' + note);