-----BEGIN PGP SIGNED MESSAGE-----

===========================================================================
             AUSCERT External Security Bulletin Redistribution

     ESB-2004.0090 -- Sun(sm) Alert Notification - Sun Alert ID: 50603
      Sun ONE/iPlanet Web Server Enable HTTP TRACE Method by Default
                             04 February 2004

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:                Sun ONE/iPlanet Web Server 6.0 Service Pack 1-5
                        Sun ONE/iPlanet Web Server 4.1 Service Pack 1-12
Publisher:              Sun Microsystems
Operating System:       Solaris
                        Red Hat Linux
                        HP-UX
                        Windows
                        AIX
Impact:                 Access Confidential Data
Access Required:        Remote

- --------------------------BEGIN INCLUDED TEXT--------------------

   DOCUMENT ID: 50603
   SYNOPSIS: Sun ONE/iPlanet Web Server Enable HTTP TRACE Method by
   Default
   DETAIL DESCRIPTION:
   
Sun(sm) Alert Notification

     * Sun Alert ID: 50603
     * Synopsis: Sun ONE/iPlanet Web Server Enable HTTP TRACE Method by
       Default
     * Category: Security
     * Product: iPlanet Web Server, Sun ONE Web Server
     * BugIDs: 4808654
     * Avoidance: Workaround
     * State: Resolved
     * Date Released: 11-Feb-2003
     * Date Closed: 11-Feb-2003
     * Date Modified: 02-May-2003, 19-May-2003
       
1. Impact

   CERT Vulnerability VU867593 describes a techique to abuse the HTTP
   TRACE functionality to gain access to information in HTTP headers.
   This technique may be used to access sensitive information in HTTP
   headers using the HTTP TRACE method when making HTTP requests to Sun
   ONE/iPlanet Web Servers.
   
   This issue is described in the CERT Vulnerability VU#867593 (see
   [1]http://www.kb.cert.org/vuls/id/867593).
   
   Note 1: HTTP TRACE, which is part of the HTTP 1.1 standard and
   described in RFC 2616, is enabled by default on Sun ONE/iPlanet Web
   Servers.
   
   Note 2: Sun ONE/iPlanet Web Servers could be used as an agent to
   exploit this issue.
   
2. Contributing Factors

   This issue can occur in the following releases:
     * Sun ONE/iPlanet Web Server 4.1 Service Pack 1 through 12
     * Sun ONE/iPlanet Web Server 6.0 Service Pack 1 through 5
       
   For supported architectures and OS versions see:
   [2]http://wwws.sun.com/software/download/download/5292.html.
   
3. Symptoms

   There are no predictable symptoms that would show the described issue
   has been exploited.
   
   SOLUTION SUMMARY:
   
4. Relief/Workaround

   The described issue is not a defect of the Sun ONE/iPlanet Web Server.
   However, the following recommendation is provided to avoid this issue.
   
   Disable HTTP TRACE support for SunONE/iPlanet Web Server 4.1 and 6.0
   as follows:
     * Sun ONE Web Server releases 6.0 SP2 and later:
       
        Add the following to the top of the default object in obj.conf:

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

        Restart web server
     * Sun ONE Web Server releases prior to 6.0 SP2:
       
        Create a file called reject_trace.c and paste the code below into it
        ----------------------------- start --------------------------------

        #include "nsapi.h"

        NSAPI_PUBLIC int reject_trace(pblock *pb, Session *sn, Request *rq)
        {
                const char *method;

                method = pblock_findval("method", rq->reqpb);
                if (method && !strcmp(method, "TRACE")) {
                /* * Set a bogus content length so the TRACE handler will refuse t
o
                * handle the request
                */
             param_free(pblock_remove("transfer-encoding",rq->headers));
             param_free(pblock_remove("content-length", rq->headers));
             pblock_nvinsert("content-length", "-1", rq->headers);

             log_error(LOG_WARN, "reject-trace", sn, rq, "rejecting TRACE reque
st");

             protocol_status(sn, rq, PROTOCOL_NOT_IMPLEMENTED, NULL);

             return REQ_ABORTED;
         }

        return REQ_NOACTION;
        }
        ----------------------- end --------------------------------

        Compile the NSAPI:

          http://docs.sun.com/source/816-5686-10/04_mysaf.htm#15053(6.x)
          http://docs.sun.com/source/816-5673-10/04_mysaf.htm#15053(4.x)


Sun ONE/iPlanet Web Server 6.0 RTM and 6.0 SP1 and add to the end of the magnus
.conf file:

        Init fn="load-modules" shlib="<path to library>/reject_trace.so"funcs="
reject_trace"

Then edit the obj.conf file and add the following line after the <Object name="
default"> :

        AuthTrans fn="reject_trace"

Sun ONE/iPlanet Web Server 4.1 Service Pack 1 through 12  edit the obj.conf
and add to the end of the Init section:

        Init fn="load-modules" shlib="<path to library>/reject_trace.so"funcs="
reject_trace"

Then  after the line <Object name="default"> add the following

        AuthTrans fn="reject_trace"

   Note: The above script is provided "AS IS" and it is the users
   responsibility to verify it has been implemented correctly.
   
5. Resolution

   This issue may be addressed by disabling HTTP TRACE as shown above in
   the Relief/Workaround section.
   
Change History

   02-May-2003:
     * Updated Relief/Workaround section
       
   19-May-2003:
     * typos in Relief/Workaround section
       
   This Sun Alert notification is being provided to you on an "AS IS"
   basis. This Sun Alert notification may contain information provided by
   third parties. The issues described in this Sun Alert notification may
   or may not impact your system(s). Sun makes no representations,
   warranties, or guarantees as to the information contained herein. ANY
   AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
   WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
   NON-INFRINGEMENT, ARE HEREBY DISCLAIMED. BY ACCESSING THIS DOCUMENT
   YOU ACKNOWLEDGE THAT SUN SHALL IN NO EVENT BE LIABLE FOR ANY DIRECT,
   INDIRECT, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES THAT ARISE
   OUT OF YOUR USE OR FAILURE TO USE THE INFORMATION CONTAINED HEREIN.
   This Sun Alert notification contains Sun proprietary and confidential
   information. It is being provided to you pursuant to the provisions of
   your agreement to purchase services from Sun, or, if you do not have
   such an agreement, th! e Sun.com Terms of Use. This Sun Alert
   notification may only be used for the purposes contemplated by these
   agreements.
   
   Copyright 2000-2003 Sun Microsystems, Inc., 4150 Network Circle, Santa
   Clara, CA 95054 U.S.A. All rights reserved.
   

References

   1. http://www.kb.cert.org/vuls/id/867593
   2. http://wwws.sun.com/software/download/download/5292.html



- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/render.html?cid=1980

If you believe that your computer system has been compromised or attacked in 
any way, we encourage you to let us know by completing the secure National IT 
Incident Reporting Form at:

        http://www.auscert.org.au/render.html?it=3192

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business 
                hours which are GMT+10:00 (AEST).  On call after hours 
                for member emergencies only.
-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQCVAwUBQCBbWSh9+71yA2DNAQFB/AP/eBcSSXnd1pKNPAwPJ8B09pQq0WOcdsDG
iRNy0s/QFUOdl6H0VkNP2Y5gAJtp5PGG56N4m5RGElE/pHRzSmHR98hPH/DwTIkU
Bq+EKIqR3BQRrn8JPUn3VG+eJoFKxZ1wwie2jIZUZfF+KfysTzZEJMU/U6SmatZM
B5XsO5JeYRA=
=+EHi
-----END PGP SIGNATURE-----