Original issue date: February 6, 1998<BR>
Last revised: December 9, 1998<BR>
	Added vendor information for Netscape and O'Reilly & Associates, Inc.

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

<P>An exploitation involving long file names on Microsoft Windows-based web
servers has recently been described on public mailing lists. When files on the
web server have names longer than 8.3 (8 characters plus a 3-character
extension), users can gain unauthorized access to files protected solely
by the web server.

<P>The CERT/CC team recommends installing patches from your vendor (see <A HREF="#sec3a">Section
III.A</A> and the appendix). Until you are able to do so, we urge you to use the
workaround described in <A HREF="#sec3b">Section III.B</A>.

<P>We will update this advisory as we receive additional information.
Please check our advisory files regularly for updates that relate to your site.

<P><HR>

<P>
<H2>I. Description</H2>

<P>All 32-bit Microsoft Windows operating systems (commonly known as Win32)
     can associate two different file names with a stored file, a short name
     and a long name. The short version, known as 8.3-compliant, is restricted
     to a length of 8 characters and an extension of 3 characters. This
     version is required for backward compatibility with DOS. The long version
     of the file name is not restricted to the 8.3-compliant format but is
     restricted to a total length of 255 characters.

<P>When Win32 stores a file with a short name (i.e., 8.3-compliant), it
     associates only that short file name with the file. However, when Win32
     stores a file with a long name (i.e., greater than 8 characters), it
     associates two versions of the file name with the file--the original, long
     file name and an 8.3-compliant short file name that is derived from
     the long name in a predictable manner.

<P>Example:

<P>The 8.3-compliant short file name "Abcdefgh.xyz" is represented
<OL><LI> as is: "Abcdefgh.xyz".</OL>

<P>However, the long file name "Abcdefghijk.xyz" is represented:<BR>
<OL><LI>as is: "Abcdefghijk.xyz" and
<LI>as 8.3-compliant: "Abcdef~1.xyz".</OL>

<P>Some Win32-based web servers have not compensated for the two file name
       versions when restricting access to files that have long names. The web
       servers attempt to restrict access by building an internal list of
       restricted file names. However, for files with long names, only the
       long, and not the short, file name is added to this internal list. This
       leaves the file unprotected by the web server because the file is still
       accessible via the short file name.

<P>For example, "Abcdefgh.xyz" (short) would be protected by the web
       server, but "Abcdefghijk.xyz" (long) would not be completely protected
       by the web server.

<P>
<H2>II. Impact</H2>

<P>Users are able to gain unauthorized access to files protected solely by
     the web server.

<P>
<H2>III. Solution</H2>

<P>CERT/CC urges you to immediately apply vendor patches if they are
     available. Until you are able to do so, we urge you to use the
     workaround described in Section B.

<P>
<OL>
<A NAME="sec3a">
<H3><LI TYPE="A">Obtain and install a patch for this problem.</H3>

<P></A>
         Appendix A contains input from vendors who have provided information
         for this advisory. We will update the appendix as we receive more
         information. If you do not see your vendor's name, the CERT/CC
         did not hear from that vendor. Please contact your vendor directly.

<P>
<A NAME="sec3b">
<H3><LI>Until you are able to install the appropriate patch, we recommend the          following workaround.</A></H3>

<P>
<OL><LI>Use only 8.3-compliant short file names for the files that you want to
        have protected solely by the web server. On FAT file systems (16-bit)
        this can be enforced by enabling (setting to 1) the "Win31FileSystem"
        registry key (registry path:
        HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem\).

<LI><P>On NTFS (32-bit), you can disable the creation of the 8.3-compliant
        short file name for files with long file names by enabling (setting to
        1) the "NtfsDisable8dot3NameCreation" registry key (registry path:
        HKEY_LOCAL_MACHINE\System\
        CurrentControlSet\Control\FileSystem\). However, this step may cause
        compatibility problems with 16-bit applications.

<LI><P>Use NTFS-based ACLs (directory or file level access control lists) to
        augment or replace web server-based security.

<P>
</OL></OL>

<P>
<HR>

<P>
<H2>Appendix A - Vendor Information</H2>

<P>Below is a list of the vendors who have provided information for this
advisory. We will update this appendix as we receive additional information.
If you do not see your vendor's name, the CERT/CC did not hear from that
vendor. Please contact the vendor directly.

<P>
<H4>Apache</H4>

<P>None of the beta releases of Apache for Win32 are vulnerable to this
particular problem.

<P>
<H4>Microsoft</H4>

<P>Microsoft IIS 4.0 and PWS 4.0 with the appropriate patch are not
vulnerable.

<P>IIS 4.0 and PWS 4.0 maintain certain configuration information about
directories and files in a database called the metabase. The metabase does
not contain file permissions, but rather Web server-specific information
such as requiring SSL encryption, proxy cache setting, and PICS ratings.
Actual file and directory permissions are enforced by NTFS and are not
affected by this problem.

<P>Earlier version of IIS and PWS are not vulnerable to this issue.

<P>Microsoft has made available a market bulletin for this issue that is
available on "Advisories and Solutions" section of the Microsoft Security
Advisor web site, http://www.microsoft.com/security. Please consult this
bulletin for information on obtaining the patch.

<P>
<H4>National Center for Supercomputing Applications (NCSA)</H4>

<P>The NCSA HTTPd web server does not run on Windows NT.  Note that HTTPd
is now an unsupported software product of the National Center for
Supercomputing Applications.

<P>
<H4>Netscape</H4>

<P>Netscape has provided the following updated information addressing the
vulnerability described in this advisory.
<PRE>
   Enterprise Server 3.51 - This server is not vulnerable to this attack.
   Enterprise Server 3.0 - A patch has been created to fix the problem. It can be found off of help.netscape.com.
   FastTrack Server 2.01 - A patch has been created to fix the problem.
   FastTrack Server 3.01 - A patch has been created to fix the problem.
</PRE>
<H4>O'Reilly & Associates, Inc.</H4>

<P>O'Reilly WebSite Professional V1 and V2 and WebSite Standard V1.0e+ are not
vulnerable to this problem.

<P><HR>

<P>The CERT Coordination Center thanks David LeBlanc for his workaround
suggestion.

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

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

<HR>

Revision History
<PRE>
Dec.  9, 1998  Added vendor information for Netscape and O'Reilly & Associates, Inc.
Feb. 11, 1998  Advisory name change, updates to Solution Section III.B, added Acknowledgment.
</PRE>