[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UNIRAS Brief - 44/04 - Sun Microsystems Security Bulletin - Sun ONE/iPlanet Web Server Enable HTTP TRACE Method by Default



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

- ----------------------------------------------------------------------------------
   UNIRAS (UK Govt CERT) Briefing Notice - 44/04 dated 04.02.04  Time: 14:00
 UNIRAS is part of NISCC(National Infrastructure Security Co-ordination Centre)
- ---------------------------------------------------------------------------------- 
  UNIRAS material is also available from its website at www.uniras.gov.uk and
         Information about NISCC is available from www.niscc.gov.uk
- ----------------------------------------------------------------------------------

Title
=====

Sun Security Bulletin:

Sun ONE/iPlanet Web Server Enable HTTP TRACE Method by Default

Detail
====== 

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.


- ----------------------------------------------------------------------------------
   
   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


- ----------------------------------------------------------------------------------

For additional information or assistance, please contact the HELP Desk by 
telephone or Not Protectively Marked information may be sent via EMail to:
uniras@xxxxxxxxxxxx

Office Hours:
Mon - Fri: 08:30 - 17:00 Hrs
Tel: +44 (0) 20 7821 1330 Ext 4511
Fax: +44 (0) 20 7821 1686

Outside of Office Hours:
On Call Duty Officer:
Tel: +44 (0) 20 7821 1330 and follow the prompts

- ----------------------------------------------------------------------------------
UNIRAS wishes to acknowledge the contributions of Sun Microsystems for the 
information contained in this Briefing. 
- ----------------------------------------------------------------------------------
This Briefing contains the information released by the original author. Some 
of the information may have changed since it was released. If the vulnerability 
affects you, it may be prudent to retrieve the advisory from the canonical site 
to ensure that you receive the most current information concerning that problem.

Reference to any specific commercial product, process, or service by trade 
name, trademark manufacturer, or otherwise, does not constitute or imply 
its endorsement, recommendation, or favouring by UNIRAS or NISCC.  The views 
and opinions of authors expressed within this notice shall not be used for 
advertising or product endorsement purposes.

Neither UNIRAS or NISCC shall also accept responsibility for any errors 
or omissions contained within this briefing notice. In particular, they shall 
not be liable for any loss or damage whatsoever, arising from or in connection 
with the usage of information contained within this notice.

UNIRAS is a member of the Forum of Incident Response and Security Teams (FIRST) 
and has contacts with other international Incident Response Teams (IRTs) in 
order to foster cooperation and coordination in incident prevention, to prompt 
rapid reaction to incidents, and to promote information sharing amongst its 
members and the community at large. 
- ----------------------------------------------------------------------------------
<End of UNIRAS Briefing>
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQCVAwUBQCEIWIpao72zK539AQFX/gP/cscsT1gJUDzm0GW3ekjve3j/rGeKkyKX
LsaGF+BnC31gg8x07Gb3fHvLSSLvFV6j/OjVMweZeYodNvtwV9F/M6NGafXZY6qj
+GcYNlc0Versost6HM6N9rCe4MiRd4I+9pdXbda5kD9FBPkVETibhq4r4fY4MKWY
+Z2K03Y8DnU=
=JCFT
-----END PGP SIGNATURE-----