Vulnerabilities > CVE-2009-2445 - Information Exposure vulnerability in SUN Java System web Server 6.1/7.0

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
NONE
Availability impact
NONE
network
low complexity
sun
CWE-200
nessus

Summary

Oracle iPlanet Web Server (formerly Sun Java System Web Server or Sun ONE Web Server) 6.1 before SP12, and 7.0 through Update 6, when running on Windows, allows remote attackers to read arbitrary JSP files via an alternate data stream syntax, as demonstrated by a .jsp::$DATA URI.

Vulnerable Configurations

Part Description Count
Application
Sun
11

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Subverting Environment Variable Values
    The attacker directly or indirectly modifies environment variables used by or controlling the target software. The attacker's goal is to cause the target software to deviate from its expected operation in a manner that benefits the attacker.
  • Footprinting
    An attacker engages in probing and exploration activity to identify constituents and properties of the target. Footprinting is a general term to describe a variety of information gathering techniques, often used by attackers in preparation for some attack. It consists of using tools to learn as much as possible about the composition, configuration, and security mechanisms of the targeted application, system or network. Information that might be collected during a footprinting effort could include open ports, applications and their versions, network topology, and similar information. While footprinting is not intended to be damaging (although certain activities, such as network scans, can sometimes cause disruptions to vulnerable applications inadvertently) it may often pave the way for more damaging attacks.
  • Exploiting Trust in Client (aka Make the Client Invisible)
    An attack of this type exploits a programs' vulnerabilities in client/server communication channel authentication and data integrity. It leverages the implicit trust a server places in the client, or more importantly, that which the server believes is the client. An attacker executes this type of attack by placing themselves in the communication channel between client and server such that communication directly to the server is possible where the server believes it is communicating only with a valid client. There are numerous variations of this type of attack.
  • Browser Fingerprinting
    An attacker carefully crafts small snippets of Java Script to efficiently detect the type of browser the potential victim is using. Many web-based attacks need prior knowledge of the web browser including the version of browser to ensure successful exploitation of a vulnerability. Having this knowledge allows an attacker to target the victim with attacks that specifically exploit known or zero day weaknesses in the type and version of the browser used by the victim. Automating this process via Java Script as a part of the same delivery system used to exploit the browser is considered more efficient as the attacker can supply a browser fingerprinting method and integrate it with exploit code, all contained in Java Script and in response to the same web page request by the browser.
  • Session Credential Falsification through Prediction
    This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking.

Nessus

NASL familyWeb Servers
NASL idSUN_WEB_SVR_JSP_SRC_DISCLOSURE.NASL
descriptionThe remote Sun Java System Web Server (or an older version, such as Sun ONE Web Server or iPlanet) reveals the source code of
last seen2020-06-01
modified2020-06-02
plugin id39618
published2009-07-07
reporterThis script is Copyright (C) 2009-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/39618
titleSun Java System Web Server ::$DATA Extension Request JSP Resource Disclosure
code
#
# (C) Tenable Network Security, Inc.
#


include("compat.inc");

if (description)
{
  script_id(39618);
  script_version("1.10");

  script_cve_id("CVE-2009-2445");
  script_bugtraq_id(35577);
  script_xref(name:"Secunia", value:"35701");

  script_name(english:"Sun Java System Web Server ::$DATA Extension Request JSP Resource Disclosure");
  script_summary(english:"Tries to exploit a source code disclosure vulnerability.");
 
  script_set_attribute(attribute:"synopsis", value:
"The remote web server is affected by a source code disclosure
vulnerability.");
  script_set_attribute(attribute:"description", value:
"The remote Sun Java System Web Server (or an older version, such as
Sun ONE Web Server or iPlanet) reveals the source code of '.jsp' files
when an attacker appends '::$DATA' to the request.");
  script_set_attribute(attribute:"see_also", value:"http://isowarez.de/SunOne_Webserver.txt" );
  script_set_attribute(attribute:"see_also", value:"https://download.oracle.com/sunalerts/1020872.1.html" );
  script_set_attribute(attribute:"solution", value:
"Apply the appropriate patch or workaround referenced in Sun's
advisory." );
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
 script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
 script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
 script_set_attribute(attribute:"exploit_available", value:"false");
 script_cwe_id(200);
  script_set_attribute(
    attribute:"vuln_publication_date", 
    value:"2009/07/06"
  );
  script_set_attribute(
    attribute:"patch_publication_date", 
    value:"2009/08/27"
  );
  script_set_attribute(
    attribute:"plugin_publication_date", 
    value:"2009/07/07"
  );
 script_cvs_date("Date: 2018/11/15 20:50:25");
  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"Web Servers");
 
  script_copyright(english:"This script is Copyright (C) 2009-2018 Tenable Network Security, Inc.");

  script_dependencies("http_version.nasl", "os_fingerprint.nasl");
  script_require_ports("Services/www", 80);

  exit(0);
}

include("global_settings.inc");
include("misc_func.inc");
include("http.inc");

os = get_kb_item("Host/OS");
if (os && "Microsoft Windows" >!< os) exit(0);

port = get_http_port(default:80);

if (report_paranoia < 2)
{
  banner = get_http_banner(port:port);
  if (
    !banner || 
    (
      "Sun-Java-System-Web-Server" >!< banner && 
      "Sun-ONE-Web-Server" >!< banner && 
      "iPlanet-WebServer" >!< banner
    )
  ) exit(0);
}

files = get_kb_list(string("www/", port, "/content/extensions/jsp"));
if (isnull(files)) exit(0);
files = make_list(files); 

foreach file (files)
{
  # Find a JSP page that doesn't have '<%=' in it.
  res = http_send_recv3(method:"GET", item:file, port:port);
  if (isnull(res)) exit(0);

  if ("200" >< res[0] && "<%=" >!< res[2])
  {
    file = string(file,"::$DATA");
    res = http_send_recv3(method:"GET", item:file, port:port);
    if (isnull(res)) exit(0);

    if ("<%=" >< res[2] && "%>" >< res[2]) 
    {
      if(report_verbosity > 0)
      {
        report = string(
          "\n",
          "Nessus was able to exploit the issue using the following URL :\n",
          "\n",
          "  ", build_url(port:port, qs:file), "\n"
        );
        if (report_verbosity > 1)
        {
          report = string(
            report,
            "\n",
            "Here is the JSP source :\n",
            "\n",
            res[2]);
        }
       security_warning(port:port, extra:report);
      }
      else security_warning(port);
    }

    # nb: we found one such page -- no need to test any further.
    exit(0);
  } 
}