Original release date: May 15, 2001<BR>
Last revised: -- <BR>
Source: CERT/CC<BR>

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

<A NAME="affected">
<H3>Systems Affected</H3>
<ul>
<li>Systems running Microsoft IIS</li>
</ul>

<A NAME="overview">
<H2>Overview</H2>
<P>

A serious vulnerability in Microsoft IIS may allow remote intruders to
execute commands on an IIS web server. This vulnerability closely
resembles a previous vulnerability in IIS that was widely
exploited. The CERT/CC urges IIS administrators to take action to
correct this vulnerability.

</P>
 
<P>
<A NAME="description">
<H2>I. Description</H2>

<P>

URIs may be encoded according to <A
HREF="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>. Among other
things, this RFC provides an encoding for arbitrary octets using the
percent sign (%) and hexadecimal characters.

<p> Quoting from RFC 2396: 

<p> <i> 
An escaped octet is encoded as a character triplet, consisting of the
percent character "%" followed by the two hexadecimal digits
representing the octet code. For example, "%20" is the escaped
encoding for the US-ASCII space character.

<p>escaped = "%" hex hex<br>
hex = digit | "A" | "B" | "C" | "D" | "E" | "F" <br>
</i>
</p> 


 
<p>Like all web servers, Microsoft IIS decodes input URIs to a
canonical format. Thus, the following encoded string: 

<dl><dd>
<i>A%20Filename%20With%20Spaces</i>
</dl> 

will get decoded to 

<dl><dd>
<i>A Filename With Spaces</i>
</dl>


<p> Unfortunately, IIS decodes some of the input <b>twice</b>. The
second decoding is superfluous. Security checks are applied to the
results of the first decoding, but IIS utilizes the results of the
second decoding. If the results of the first decoding pass the
security checks and the results of the second decoding refer to a
valid file, access will be granted to the file even if it should not
be.  More information is available at

<dl>
<dd> <A HREF="http://www.microsoft.com/technet/security/bulletin/MS01-026.asp">http://www.microsoft.com/technet/security/bulletin/MS01-026.asp</a></dd>
<dd> <A HREF="http://www.nsfocus.com/english/homepage/sa01-02.htm">http://www.nsfocus.com/english/homepage/sa01-02.htm</a></dd>
<dd> <A HREF="http://www.kb.cert.org/vuls/id/789543">http://www.kb.cert.org/vuls/id/789543</a>
</dl>

<p>Note that this does not permit intruders to bypass ACLs enforced by
the filesystem, only security checks performed by IIS. We encourage
you to configure your web server according to the guidelines provided
in 

<dl><dd>
<A HREF="http://www.microsoft.com/technet/security/iis5chk.asp">http://www.microsoft.com/technet/security/iis5chk.asp</a></dd>

<dd> <A HREF="http://www.microsoft.com/technet/security/iischk.asp">http://www.microsoft.com/technet/security/iischk.asp</a></dd>

<dd><A HREF="http://www.microsoft.com/technet/security/tools.asp">http://www.microsoft.com/technet/security/tools.asp</a></dd>
</dl>

<p>Theses guidelines can help you reduce your exposure to this
problem, and possibly to problems that have not yet been discovered.

<p>This issue was discovered by <A HREF="http://www.nsfocus.com">NSFocus</a>.



<p>The CVE Project has assigned the following identifier to this
vulnerability: 

<dl><dd>
<A HREF="http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2001-0333">http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2001-0333</a>
</dl>

<p>This vulnerability has many similarities to the <i>Web Server Folder
Directory Traversal Vulnerability,</i> which has been widely exploited. For more
information on that vulnerability, see

<DL><DD>
<A HREF="http://www.kb.cert.org/vuls/id/111677">http://www.kb.cert.org/vuls/id/111677</A>
</DL>

<A NAME="impact">
<H2>II. Impact</H2>

<P>

Intruders can run arbitrary commands with the privileges of the
IUSR_<i>machinename</i> account. 

<A NAME="solution">
<H2>III. Solutions</H2>

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

<P>Information on patches from Microsoft is available at
<DL>
<DD> <A HREF="http://www.microsoft.com/technet/security/bulletin/MS01-026.asp">http://www.microsoft.com/technet/security/bulletin/MS01-026.asp</A></dd>
</DL>

<P>Additional advice on securing IIS web servers is available from 

<dl><dd>
<A HREF="http://www.microsoft.com/technet/security/iis5chk.asp">http://www.microsoft.com/technet/security/iis5chk.asp</a><BR>

<A HREF="http://www.microsoft.com/technet/security/tools.asp">http://www.microsoft.com/technet/security/tools.asp</a>
</dl>

<A NAME="vendors">
<H2>Appendix A. Vendor Information</H2>

<A name="microsoft">
<H3>Microsoft Corporation</H3>
<P>
The following documents regarding this vulnerability are available
from Microsoft:<BR>

<DL><DD>
<A HREF="http://www.microsoft.com/technet/security/bulletin/MS01-026.asp">
http://www.microsoft.com/technet/security/bulletin/MS01-026.asp</A>
</DL>

<A HREF="mailto:cert@cert.org?subject=CA-2001-11%20Feedback%20VU%23789543">Authors</A>:&nbsp;
Shawn Hernan. 

<P>

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

<P>Copyright 2001 Carnegie Mellon University.</P>

<P>Revision History
<PRE>
May 15, 2001: Initial Release
</PRE>