exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

tomcat-null-byte.txt

tomcat-null-byte.txt
Posted Jan 31, 2003
Authored by Jouko Pynnonen | Site klikki.fi

Apache Tomcat can be tricked to disclose files, directory listings and unprocessed JSP files. This issue affects Apache Tomcat version 3.3.1 and earlier. Tomcat users should upgrade to version 3.3.1a.

tags | advisory
SHA-256 | d53725d1e508b8d13aaa142c7e45373e1c4216348fe76af9dc8196021b9abf4b

tomcat-null-byte.txt

Change Mirror Download
OVERVIEW
========

Tomcat is a JSP/Servlet implementation developed at the Apache Software
Foundation. Tomcat versions 3.3.1 and earlier contain some security
vulnerabilities which allow a remote user to retrieve listings of
directories despite index.html or index.jsp files. It is also possible
to retrieve contents of files and directories that shouldn't be visible to
outside. The vulnerability also allows retrieving the source of JSP files.

DETAILS
=======

Certain kinds of HTTP requests containing binary null or backslash
characters are parsed incorrectly by Tomcat's built-in web server. The
following GET request causes Tomcat to output the directory listing of
the web root under default installation:

GET /<null byte>.jsp HTTP/1.0

The following UNIX command can be issued to test the vulnerability:

$ perl -e 'print "GET /\x00.jsp HTTP/1.0\r\n\r\n";' | nc my.server 8080

If your server is vulnerable, the command will output a HTTP header and
the directory listing even if there's an index file present. Furthermore,
a backslash can be used in the following way to get information from
otherwise inaccessible directories:

$ perl -e 'print "GET /admin/WEB-INF\\classes/ContextAdmin.java\x00.jsp HTTP/1.0\r\n\r\n";'|nc my.server 8080

This will output the contents of ContextAdmin.java.

The servlet engine interprets the directory listing and any file
retrieved in this way as a JSP page, which might be exploited to run
arbitrary Java code under some imaginable scenarios. If the attacker can
create a file whose name contains JSP tags somewhere under the web root,
the code would be run when the directory listing is fetched in the way
described above. Similarly Java code embedded in *.html or any other file
can be compiled and run by an attacker.

In the same way a remote user may force a *.jsp file to be interpreted as
plain HTML, ie. retrieve the source of JSP files:

$ perl -e 'print "GET /examples/jsp/cal/cal1.jsp\x00.html HTTP/1.0\r\n\r\n";'|nc my.server 8080

This would output the source of the example JSP file.

SOLUTION
========

The vendor was informed on January 10, 2003. A new version of Tomcat
addressing this problem has been released. The fixed version 3.3.1a and
additional information is available at

http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3.1a/

According to the vendor, the problem only affects Tomcat used with JDK
1.3.1 or earlier.

CREDITS
=======

The vulnerability was discovered by Jouko Pynno"nen of Online Solutions
Ltd, Finland.

--
Jouko Pynnonen Online Solutions Ltd Secure your Linux -
jouko@solutions.fi http://www.solutions.fi http://www.secmod.com

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close