Microsoft IIS WebDAV ntdll.dll Remote Overflow (MS03-007) - Nessus

High   Plugin ID: 11412

This page contains detailed information about the Microsoft IIS WebDAV ntdll.dll Remote Overflow (MS03-007) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 11412
Name: Microsoft IIS WebDAV ntdll.dll Remote Overflow (MS03-007)
Filename: iis_webdav_overflow.nasl
Vulnerability Published: 2003-05-30
This Plugin Published: 2003-03-18
Last Modification Time: 2022-04-11
Plugin Version: 1.46
Plugin Type: remote
Plugin Family: Web Servers
Dependencies: find_service1.nasl, http_version.nasl, smb_hotfixes.nasl, www_fingerprinting_hmap.nasl

Vulnerability Information


Severity: High
Vulnerability Published: 2003-05-30
Patch Published: N/A
CVE [?]: CVE-2003-0109
CPE [?]: cpe:/a:microsoft:iis

Synopsis

The remote web server is affected by a buffer overflow vulnerability.

Description

The remote WebDAV server is vulnerable to a buffer overflow when it receives a too long request.

An attacker may use this flaw to execute arbitrary code within the LocalSystem security context.

Solution

Apply the patches referenced above.

Public Exploits


Target Network Port(s): 80
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, Immunity Canvas)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Microsoft IIS WebDAV ntdll.dll Remote Overflow (MS03-007) vulnerability:

  1. Metasploit: exploit/windows/iis/ms03_007_ntdll_webdav
    [MS03-007 Microsoft IIS 5.0 WebDAV ntdll.dll Path Overflow]
  2. Exploit-DB: exploits/windows/remote/16470.rb
    [EDB-16470: Microsoft IIS 5.0 - WebDAV 'ntdll.dll' Path Overflow (MS03-007) (Metasploit)]
  3. Immunity Canvas: CANVAS

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.2 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.2 (Medium)

Go back to menu.

Plugin Source


This is the iis_webdav_overflow.nasl nessus plugin source code. This script is Copyright (C) 2003-2022 Tenable Network Security, Inc.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

# Tested on :
#	    W2K SP3 + the fix -> IIS issues an error
#	    W2K SP3 -> IIS temporarily crashes
#	    W2K SP2 -> IIS temporarily crashes
# 	    W2K SP1 -> IIS does not crash, but issues a message
#		       about an internal error
#	    
#	    W2K     -> IIS does not crash, but issues a message about
#		       an internal error
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(11412);
  script_version("1.46");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2003-0109");
  script_bugtraq_id(7116);
  script_xref(name:"MSFT", value:"MS03-007");
  script_xref(name:"MSKB", value:"815021");

  script_name(english:"Microsoft IIS WebDAV ntdll.dll Remote Overflow (MS03-007)");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server is affected by a buffer overflow vulnerability.");
  script_set_attribute(attribute:"description", value:
"The remote WebDAV server is vulnerable to a buffer overflow when
it receives a too long request.

An attacker may use this flaw to execute arbitrary code within the 
LocalSystem security context.");
  script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2003/ms03-007");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2003/Jun/26");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/vulnwatch/2003/q1/142");
  script_set_attribute(attribute:"solution", value:
"Apply the patches referenced above.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'MS03-007 Microsoft IIS 5.0 WebDAV ntdll.dll Path Overflow');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:"CANVAS");

  script_set_attribute(attribute:"vuln_publication_date", value:"2003/05/30");
  script_set_attribute(attribute:"plugin_publication_date", value:"2003/03/18");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:iis");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_DESTRUCTIVE_ATTACK);
  script_family(english:"Web Servers");

  script_copyright(english:"This script is Copyright (C) 2003-2022 Tenable Network Security, Inc.");

  script_dependencies("find_service1.nasl", "http_version.nasl", "smb_hotfixes.nasl", "www_fingerprinting_hmap.nasl");
  script_require_ports("Services/www", 80);

  exit(0);
}

include("smb_hotfixes.inc");
include("misc_func.inc");
include("http.inc");


if ( hotfix_check_sp(win2k:4, xp:1, nt:7) == 0 ) exit(0);
if ( hotfix_missing(name:"815021")  == 0 ) exit(0);

port = get_http_port(default:80);
banner = get_http_banner(port:port);
if ("IIS" >!< banner ) exit(0);

# We really check for the flaw (at the expense of crashing IIS
  
if (http_is_dead(port:port)) exit(0);

 	 body = 
	     '<?xml version="1.0"?>\r\n' +
	     '<g:searchrequest xmlns:g="DAV:">\r\n' +
	     '<g:sql>\r\n' +
	     'Select "DAV:displayname" from scope()\r\n' +
	     '</g:sql>\r\n' +
	     '</g:searchrequest>\r\n';
	     
	 # This is where the flaw lies. SEARCH /AAAA.....AAAA crashes
	 # the remote server. The buffer has to be 65535 or 65536 bytes
	 # long, nothing else
	 
w = http_send_recv3(method:"SEARCH", port: port, item: "/"+crap(65535),
  content_type: "text/xml", data: body);

if (http_is_dead(port:port))
{
   security_hole(port);
   exit(0);
}

if (isnull(w)) exit(0, "The web server did not answer or dropped the request");

r = strcat(w[0], w[1], '\r\n', w[2]);
if (w[0] =~ "^HTTP/1\.[0-1] 500 " && "(exception)" >< r)
  security_hole(port);

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/iis_webdav_overflow.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\iis_webdav_overflow.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/iis_webdav_overflow.nasl

Go back to menu.

How to Run


Here is how to run the Microsoft IIS WebDAV ntdll.dll Remote Overflow (MS03-007) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Web Servers plugin family.
  6. On the right side table select Microsoft IIS WebDAV ntdll.dll Remote Overflow (MS03-007) plugin ID 11412.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl iis_webdav_overflow.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a iis_webdav_overflow.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - iis_webdav_overflow.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state iis_webdav_overflow.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: MSKB | Microsoft Knowledge Base: MSFT | Microsoft Security Bulletin:
  • MS03-007
See also: Similar and related Nessus plugins:
  • 11413 - MS03-007: Unchecked Buffer in ntdll.dll (815021)
  • 108808 - Microsoft IIS 7.0 Vulnerabilities (uncredentialed) (PCI/DSS)
  • 10492 - MS00-006: Microsoft IIS IDA/IDQ Multiple Vulnerabilities (uncredentialed check)
  • 10116 - Microsoft IIS ISM.DLL HTR Request Remote Overflow
  • 10671 - MS01-026 / MS01-044: Microsoft IIS Remote Command Execution (uncredentialed check)
  • 10932 - Microsoft IIS .HTR ISAPI Filter Enabled
  • 11028 - Microsoft IIS .HTR Filter Multiple Overflows (MS02-028)
  • 31648 - Microsoft IIS webhits.dll Hit-Highlighting Authentication Bypass
  • 10685 - Microsoft IIS ISAPI Filter Multiple Vulnerabilities (MS01-044)
  • 10759 - Web Server HTTP Header Internal IP Disclosure
  • 51956 - MS11-004: Vulnerability in Internet Information Services (IIS) FTP Service Could Allow Remote Code Execution (2489256) (uncredentialed check)
  • 59817 - Microsoft IIS 6.0 PHP NTFS Stream Authentication Bypass
  • 64589 - Microsoft ASP.NET MS-DOS Device Name DoS (PCI-DSS check)
  • 64588 - Microsoft ASP.NET MS-DOS Device Name DoS
  • 153474 - Microsoft Open Management Infrastructure < 1.6.8.1 Multiple Vulnerabilities
  • 11923 - Microsoft FrontPage Server Extensions (fp30reg.dll) Debug Function Remote Overflow (MS03-051 / 813360)
  • 10497 - Microsoft FrontPage Extensions MS-DOS Device Request DoS
  • 10405 - Microsoft IIS FrontPage Server Extensions (FPSE) shtml.exe Path Disclosure
  • 99523 - Microsoft Windows Server 2003 IIS 6.0 WebDAV PROPFIND Request Handling RCE (EXPLODINGCAN)
  • 99281 - Microsoft Windows Server 2003 R2 IIS 6.0 WebDAV PROPFIND Request Handling RCE (EXPLODINGCAN)
  • 10357 - Microsoft IIS MDAC RDS (msadcs.dll) Arbitrary Remote Command Execution
  • 11161 - Microsoft Data Access Components RDS Data Stub Remote Overflow
  • 11664 - Microsoft Media Services ISAPI nsiislog.dll Multiple Overflows
  • 153486 - Microsoft Open Management Infrastructure RCE (CVE-2021-38647)
  • 38808 - Microsoft IIS WebDAV Unicode Request Directory Security Bypass
  • 11370 - Microsoft IIS fpcount.exe CGI Remote Overflow
  • 40825 - MS09-053: Microsoft IIS FTPd NLST Command Remote Buffer Overflow (975191) (uncredentialed check)
  • 10657 - MS01-023: Microsoft IIS 5.0 Malformed HTTP Printer Request Header Remote Buffer Overflow (953155) (uncredentialed check)
  • 10564 - Microsoft IIS Phone Book Service /pbserver/pbserver.dll Remote Overflow
  • 34407 - MS08-062: Microsoft IIS IPP Service Unspecified Remote Overflow (953155)
  • 39342 - MS09-020: Vulnerabilities in Internet Information Services (IIS) Could Allow Elevation of Privilege (970483)
  • 49223 - MS10-065: Vulnerabilities in Microsoft Internet Information Services (IIS) Could Allow Remote Code Execution (2267960)
  • 51904 - MS11-004: Vulnerability in Internet Information Services (IIS) FTP Service Could Allow Remote Code Execution (2489256)
  • 62905 - MS12-073: Vulnerabilities in Microsoft Internet Information Services (IIS) Could Allow Information Disclosure (2733829)
  • 79135 - MS14-076: Vulnerability in Internet Information Services (IIS) Could Allow Security Feature Bypass (2982998)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file iis_webdav_overflow.nasl version 1.46. For more plugins, visit the Nessus Plugin Library.

Go back to menu.