Sun Java System ASP < 4.0.3 Multiple Vulnerabilities - Nessus

Critical   Plugin ID: 33439

This page contains detailed information about the Sun Java System ASP < 4.0.3 Multiple Vulnerabilities Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 33439
Name: Sun Java System ASP < 4.0.3 Multiple Vulnerabilities
Filename: sun_asp_403.nasl
Vulnerability Published: N/A
This Plugin Published: 2008-07-08
Last Modification Time: 2022-04-11
Plugin Version: 1.23
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: http_version.nasl, os_fingerprint.nasl

Vulnerability Information


Severity: Critical
Vulnerability Published: N/A
Patch Published: 2008-06-03
CVE [?]: CVE-2008-2401, CVE-2008-2402, CVE-2008-2403, CVE-2008-2404, CVE-2008-2405
CPE [?]: N/A

Synopsis

The remote web server is affected by several vulnerabilities.

Description

The remote host is running Sun Java System Active Server Pages (ASP), or an older variant such as Sun ONE ASP or Chili!Soft ASP.

The web server component of the installed version of Active Server Pages on the remote host is affected by several vulnerabilities :

- A flaw in an include file used by several of the administration server's ASP applications allows an attacker to write arbitrary data to a file specified by an attacker on the affected host. This issue does not affect ASP Server on a Windows platform (CVE-2008-2401).

- Password and configuration data are stored in the administration server's web root and can be retrieved without credentials. This issue does not affect ASP Server on a Windows platform (CVE-2008-2402).

- Multiple directory traversal vulnerabilities exist in several of the administration server's ASP applications and can be abused to read or even delete arbitrary files on the affected host. This issue does not affect ASP Server on a Windows platform (CVE-2008-2403).

- A stack-based buffer overflow allows code execution in the context of the ASP server (by default root) and can be exploited without authentication (CVE-2008-2404).

- Several of the administration server's ASP applications fail to filter or escape user input before using it to generate commands before executing them in a shell. While access to these applications nominally requires authentication, there are reportedly several methods of bypassing authentication (CVE-2008-2405).

Solution

Upgrade to Sun Java System ASP version 4.0.3 or later.

Public Exploits


Target Network Port(s): 5100
Target Asset(s): Services/www
Exploit Available: True (Immunity Canvas)
Exploit Ease: No exploit is required

Here's the list of publicly known exploits and PoCs for verifying the Sun Java System ASP < 4.0.3 Multiple Vulnerabilities vulnerability:

  1. Immunity Canvas: D2ExploitPack

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.3 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.3 (High)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the sun_asp_403.nasl nessus plugin source code. This script is Copyright (C) 2008-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(33439);
  script_version("1.23");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id(
    "CVE-2008-2401",
    "CVE-2008-2402",
    "CVE-2008-2403",
    "CVE-2008-2404",
    "CVE-2008-2405"
  );
  script_bugtraq_id(
    29537,
    29538,
    29540,
    29542,
    29550
  );
  script_xref(name:"IAVA", value:"2008-A-0038-S");
  script_xref(name:"SECUNIA", value:"30523");

  script_name(english:"Sun Java System ASP < 4.0.3 Multiple Vulnerabilities");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server is affected by several vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The remote host is running Sun Java System Active Server Pages (ASP),
or an older variant such as Sun ONE ASP or Chili!Soft ASP. 

The web server component of the installed version of Active Server
Pages on the remote host is affected by several vulnerabilities :

  - A flaw in an include file used by several of the
    administration server's ASP applications allows an
    attacker to write arbitrary data to a file specified
    by an attacker on the affected host. This issue does
    not affect ASP Server on a Windows platform 
    (CVE-2008-2401).

  - Password and configuration data are stored in the 
    administration server's web root and can be retrieved
    without credentials. This issue does not affect ASP 
    Server on a Windows platform (CVE-2008-2402).

  - Multiple directory traversal vulnerabilities exist in
    several of the administration server's ASP 
    applications and can be abused to read or even delete
    arbitrary files on the affected host. This issue does
    not affect ASP Server on a Windows platform 
    (CVE-2008-2403).

  - A stack-based buffer overflow allows code execution in 
    the context of the ASP server (by default root) and can 
    be exploited without authentication (CVE-2008-2404).

  - Several of the administration server's ASP applications
    fail to filter or escape user input before using it to
    generate commands before executing them in a shell.
    While access to these applications nominally requires
    authentication, there are reportedly several methods
    of bypassing authentication (CVE-2008-2405).");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2008/Jun/32");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2008/Jun/34");
  script_set_attribute(attribute:"see_also", value:"https://download.oracle.com/sunalerts/1019285.1.html");
  # https://labs.idefense.com/verisign/intelligence/2009/vulnerabilities/display.php?id=705
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?b0af4b83");
  # https://labs.idefense.com/verisign/intelligence/2009/vulnerabilities/display.php?id=706
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?e8788b4c");
  # https://labs.idefense.com/verisign/intelligence/2009/vulnerabilities/display.php?id=707
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a1d5bc95");
  # https://labs.idefense.com/verisign/intelligence/2009/vulnerabilities/display.php?id=708
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?cee12fc8");
  # https://labs.idefense.com/verisign/intelligence/2009/vulnerabilities/display.php?id=709
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?d90b8781");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2008/Jun/27");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2008/Jun/28");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2008/Jun/30");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2008/Jun/32");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2008/Jun/34");
  script_set_attribute(attribute:"see_also", value:"https://download.oracle.com/sunalerts/1019285.1.html");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Sun Java System ASP version 4.0.3 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");

  script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"false");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:"D2ExploitPack");
  script_cwe_id(20, 22, 119, 264);

  script_set_attribute(attribute:"patch_publication_date", value:"2008/06/03");
  script_set_attribute(attribute:"plugin_publication_date", value:"2008/07/08");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"stig_severity", value:"I");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2008-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

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

  exit(0);
}


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

port = get_http_port(default:5100);

# Get the Server response header.
server = "";
banner = get_http_banner(port:port);
if (banner)
{
  server = strstr(banner, "Server:");
  if (server) server = server - strstr(server, string("\n"));
}


# Unless we're paranoid, make sure the banner looks like Sun/Chili!Soft ASP.
if (report_paranoia < 2)
{
  if (
    !server ||
    (
      "Sun-ONE-ASP/" >!< server &&
      "Chili!Soft-ASP/" >!< server
    )
  ) exit(0);
}


# If we're looking at the admin server...
os = get_kb_item("Host/OS/smb");

res = http_get_cache(item:"/", port:port, exit_on_fail: 1);

if (';URL=/caspadmin/index.asp"' >< res && (!os || "Windows" >!< os))
{
  vulns = 0;

  # Try to exploit the directory traversal issue to read a file.
  file = "/etc/passwd";
  url = "/caspsamp/shared/viewsource.asp?source=/caspsamp/../../../../../../../../../../../.."+file;

  w = http_send_recv3(method:"GET", item:url, port:port, exit_on_fail: 1);
  res = w[2];

  if (egrep(pattern:"root:.*:0:[01]:", string:res))
  {
    vulns++;

    if (report_verbosity)
    {
      report = string(
        "\n",
        "Nessus was able to retrieve the contents of '", file, "'\n",
        "using the URL :\n",
        "\n",
        "  ", build_url(port:port, qs:url), "\n"
      );
      if (report_verbosity > 1)
      {
        if ("start source code -->" >< res)
        {
          contents = strstr(res, "start source code -->") - "start source code -->";
          if ("<!-- end source" >< contents) contents = contents - strstr(contents, "<!-- end source");
          contents = str_replace(find:"&nbsp;", replace:" ", string:contents);
          contents = str_replace(find:"<br>", replace:"", string:contents);
        }
        if (
          !contents || 
          !egrep(pattern:"root:.*:0:[01]:", string:contents)
        ) contents = res;

        contents = data_protection::redact_etc_passwd(output:contents);
        report = string(
          report,
          "\n",
          "The response was :\n",
          "\n",
          contents
        );
      }
      security_hole(port:port, extra:report);
    }
    else security_hole(port);

    if (!thorough_tests) exit(0);
  }

  # Try to exploit the info disclosure issue to read a file.
  file = "conf/service.pwd";
  url = "/"+file;

  w = http_send_recv3(method:"GET", item:url, port:port, exit_on_fail: 1);
  res = w[2];

  if (egrep(pattern:"^admin:[^.]{13}$", string:res))
  {
    vulns++;

    if (report_verbosity)
    {
      report = string(
        "\n",
        "Nessus was able to retrieve the contents of '", file, "'\n",
        "using the URL :\n",
        "\n",
        "  ", build_url(port:port, qs:url), "\n"
      );
      if (report_verbosity > 1)
      {
        report = string(
          report,
          "\n",
          "The response was :\n",
          "\n",
          res
        );
      }
      security_hole(port:port, extra:report);
    }
    else security_hole(port);

    if (vulns) exit(0);
  }
}


# Check the version in the Server response header.
#
# nb: Sun's advisory doesn't mention anything about Chili!Soft.
if (server && server =~ "Sun-ONE-ASP/4\.0\.[0-2]($|[^0-9])")
{
  if (report_verbosity)
  {
    ver = strstr(server, "Sun-ONE-ASP/") - "Sun-ONE-ASP/";
    if (" " >< ver) ver = ver - strstr(ver, " ");

    report = string(
      "\n",
      "Sun Java ASP Server version ", ver, " appears to be running on the remote\n",
      "host based on the following Server response header :\n",
      "\n",
      "  ", server, "\n"
    );
    security_hole(port:port, extra:report);
  }
  else security_hole(port);
}

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/sun_asp_403.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\sun_asp_403.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/sun_asp_403.nasl

Go back to menu.

How to Run


Here is how to run the Sun Java System ASP < 4.0.3 Multiple Vulnerabilities as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select Sun Java System ASP < 4.0.3 Multiple Vulnerabilities plugin ID 33439.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl sun_asp_403.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a sun_asp_403.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - sun_asp_403.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state sun_asp_403.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: IAVA | Information Assurance Vulnerability Alert:
  • 2008-A-0038-S
Secunia Advisory: CWE | Common Weakness Enumeration:
  • CWE-20 (Weakness) Improper Input Validation
  • CWE-22 (Weakness) Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-119 (Weakness) Improper Restriction of Operations within the Bounds of a Memory Buffer
  • CWE-264 (Category) Permissions, Privileges, and Access Controls
See also: Similar and related Nessus plugins:
  • 33486 - Sun Java J2SE 1.4.2 < Update 18 Multiple Vulnerabilities
  • 64817 - Sun Java J2SE 1.4.2 < Update 18 Multiple Vulnerabilities (Unix)
  • 35030 - Sun Java JRE Multiple Vulnerabilities (244986 et al)
  • 64828 - Sun Java JRE Multiple Vulnerabilities (244986 et al) (Unix)
  • 42373 - Sun Java JRE Multiple Vulnerabilities (269868 / 269869 / 270476 ..)
  • 64831 - Sun Java JRE Multiple Vulnerabilities (269868 / 269869 / 270476 ...) (Unix)
  • 33487 - Sun Java JDK/JRE 5 < Update 16 Multiple Vulnerabilities
  • 64832 - Sun Java JDK/JRE 5 < Update 16 Multiple Vulnerabilities (Unix)
  • 33488 - Sun Java JDK/JRE 6 < Update 7 Multiple Vulnerabilities
  • 64833 - Sun Java JDK/JRE 6 < Update 7 Multiple Vulnerabilities (Unix)
  • 82995 - Oracle iPlanet Web Server 7.0.x < 7.0.21 NSS Signature Verification Vulnerability
  • 84963 - Oracle iPlanet Web Server 6.1.x < 6.1.21 / 7.0.x < 7.0.22 NSS Signature Handling Remote Code Injection
  • 106349 - Oracle iPlanet Web Server 7.0.x < 7.0.27 NSS Unspecified Vulnerability (January 2018 CPU)
  • 51138 - Oracle iPlanet Web Server 7.0.x < 7.0.9 Multiple Vulnerabilities
  • 25693 - Sun Java Web Start JNLP File Handling Overflow (102996)
  • 64834 - Sun Java Web Start JNLP File Handling Overflow (102996) (Unix)
  • 10995 - Sun JavaServer Default Admin Password
  • 29218 - Sun OpenOffice.org < 2.3.1 Database HSQLDB Database Document Handling Arbitrary Java Code Execution
  • 31968 - Sun OpenOffice.org < 2.4 Multiple Vulnerabilities
  • 44597 - Sun OpenOffice.org < 3.2 Multiple Vulnerabilities
  • 11418 - Sun rpc.cmsd Remote Overflow
  • 11420 - Sun RPC XDR xdrmem_getbytes Function Remote Overflow
  • 33819 - Sun xVM VirtualBox < 1.6.4 Local Privilege Escalation
  • 40549 - Sun xVM VirtualBox < 3.0.4 Multiple Local Denial of Service Vulnerabilities

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file sun_asp_403.nasl version 1.23. For more plugins, visit the Nessus Plugin Library.

Go back to menu.