Original issue date: March 17, 2003<br>
Last revised: Fri Apr 25 14:10:29 EDT 2003<br>
Source: CERT/CC<br>

<p>
A complete revision history is at the end of this file.
</p>

<br>
<h3>Systems Affected</h3>
<ul>
<li>Systems running Windows 2000</li>
<li>Systems running Windows NT 4.0</li>
</ul>

<h2>Overview</h2>
<p>

A buffer overflow vulnerability exists in the Win32 API libraries
shipped with all versions of Microsoft Windows 2000 and Microsoft
Windows NT 4.0. This vulnerability, which is being actively exploited
on WebDAV-enabled IIS 5.0 servers, will allow a remote attacker to
execute arbitrary code on unpatched systems. Sites running Microsoft
Windows 2000 and Microsoft Windows NT 4.0 should apply a patch or
disable WebDAV services as soon as possible.

</p>
<br>

<h2>I. Description</h2>

<p>
Microsoft Windows 2000 (and possibly prior versions of Windows)
contains a dynamic link library (DLL) named ntdll.dll. This DLL is a
core operating system component used to interact with the Windows
kernel. A buffer overflow vulnerability exists in ntdll.dll, which is
utilized by many different components in the Windows operating system.
</p>

<p>
The WebDAV (<a href="http://www.ietf.org/rfc/rfc2518.txt">RFC2518</a>)
 component of <a
 href="http://www.microsoft.com/windows2000/technologies/web/default.asp">Microsoft
 IIS</a> 5.0 is an example of one Windows component that uses
 ntdll.dll. The IIS WebDAV component utilizes ntdll.dll when
 processing incoming WebDAV requests. By sending a specially crafted
 WebDAV request to an IIS 5.0 server, an attacker may be able to
 execute arbitrary code in the Local System security context,
 essentially giving the attacker complete control of the system.<br>
 <br>

<p>
Because the vulnerable Win32 API component is utilized by many other
applications, it is possible other exploit vectors exist. However, we
have only been told of systems compromised running IIS 5.0 with WebDAV
enabled. Sites using Windows 2000 but not running IIS 5.0 with WebDAV
need to carefully weigh the trade-offs before applying patches to
systems where the core vulnerability exists but may not be
exploitable.
</p>


Microsoft has issued the following bulletin regarding this
vulnerability:
<dl><dd>
<a
 href="http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/bulletin/ms03-007.asp">http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/bulletin/ms03-007.asp</a>
</dd></dl>

This vulnerability has been assigned the identifier
 CAN-2003-0109 by the Common Vulnerabilities and Exposures (CVE)
 group:
<dl><dd>
<a
 href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0109">http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0109</a>
</dd></dl>


<h2>II. Impact</h2>

<p>
Any attacker who can reach a vulnerable web server can gain complete
control of the system and execute arbitrary code in the Local System
security context. Note that this may be significantly more serious
than a simple "web defacement."
</p>



<h2>III. Solution</h2>

<h4>Apply a patch from your vendor</H4>


<p>A patch is available from Microsoft at<br>

<dl><dd>
<A
HREF="http://microsoft.com/downloads/details.aspx?FamilyId=C9A38D45-5145-4844-B62E-C69D32AC929B&displaylang=en">http://microsoft.com/downloads/details.aspx?FamilyId=C9A38D45-5145-4844-B62E-C69D32AC929B&displaylang=en</a>
</dd></dl>

Note that, according to <a
href="http://www.microsoft.com/technet/treeview/?url=/technet/security/bulletin/MS03-007.asp">MS03-007</a>,
"Microsoft was made aware that some customers who had received a
hotfix from Product Support Services experienced stop errors on boot
after applying the patch released for this bulletin." For more
information, see the "Frequently asked questions" section of MS03-007.

<p>


<h4>Disable vulnerable service</H4>

Until a patch can be applied, you may wish to disable IIS:
<dl><dd>
<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;321141">http://support.microsoft.com/default.aspx?scid=kb;en-us;321141</a>
</dd></dl>

If you cannot disable IIS, consider using the IIS lockdown tool to
disable WebDAV (removing WebDAV can be specified when running the IIS
lockdown tool). Alternatively, you can disable WebDAV by following the
instructions located in Microsoft's Knowledgebase Article 241520,
"How to Disable WebDAV for IIS 5.0":
<dl><dd>
<a
href="http://support.microsoft.com/default.aspx?scid=kb;en-us;241520">http://support.microsoft.com/default.aspx?scid=kb;en-us;241520</a>
</dd></dl>

<h4>Restrict buffer size</H4>

If you cannot use the IIS lockdown tool, consider restricting
the size of the buffer IIS utilizes to process requests by using Microsoft's URL Buffer Size Registry Tool. This tool can be run against a
local or remote Windows 2000 system running Windows 2000 Service Pack
2 or Service Pack 3. The tool, instructions on how to use it, and instructions on how to manually make changes to the registry are
available here:
<dl><dd>
URL Buffer Size Registry Tool - <a
href="http://go.microsoft.com/fwlink/?LinkId=14875">http://go.microsoft.com/fwlink/?LinkId=14875</a><br>
Microsoft Knowledge Base Article 816930 - <a
href="http://support.microsoft.com/default.aspx?scid=kb;en-us;816930">http://support.microsoft.com/default.aspx?scid=kb;en-us;816930</a><br>
Microsoft Knowledge Base Article 260694 - <a
href="http://support.microsoft.com/default.aspx?scid=kb;en-us;260694">http://support.microsoft.com/default.aspx?scid=kb;en-us;260694</a>
</dd></dl>

You may also wish to use URLScan, which will block web requests
that attempt to exploit this vulnerability. Information about URLScan
is available at
<dl><dd>
<a
href="http://support.microsoft.com/default.aspx?scid=kb;%5BLN%5D;326444">http://support.microsoft.com/default.aspx?scid=kb;[LN];326444</a>
</dd></dl>




<a name="vendors"></a>
<h2>Appendix A.  Vendor Information</h2>

<p>
This appendix contains information provided by vendors.  When vendors
report new information, this section is updated and the changes are
noted in the revision history.  If a vendor is not listed below, we
have not received their comments.</p>


<a name="microsoft">
<h4><a href="http://www.microsoft.com/">Microsoft Corporation</a></h4>
<blockquote>
<p>

Please see <a
href="http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/bulletin/ms03-007.asp">Microsoft
Security Bulletin MS03-007</a>.

</p>
</blockquote>
<!-- end vendor -->

<hr noshade>

The CERT/CC thanks Microsoft for their feedback during the preparation
of this document. We also thank the Department of Education Network
Engineering group for their contributions.

<hr noshade>
Authors: <a href="mailto:cert@cert.org?subject=CA-2003-09%20VU%23117394%20Feedback">Ian A. Finlay & Jeffrey S. Havrilla</a>


<!--#include virtual="/include/footer_nocopyright.html" -->

<p>Copyright 2003 Carnegie Mellon University.</p>

<p>Revision History
<p>
<small>
March 17, 2003: Initial release<br>
March 17, 2003: Changed overview section to reflect IIS 5.0 enabled by default on Windows 2000 server products<br>
March 19, 2003: Changed title from "Buffer Overflow in Microsoft IIS 5.0" to "Buffer Overflow in Core Microsoft Windows DLL"<br>
March 19, 2003: Changed overview and description to reflect fact that vulnerability is in core system DLL<br>
March 19, 2003: Revised section on disabling IIS<br>
April 25, 2003: Revised Systems affected to include Microsoft Windows NT 4.0
</small>
</p>