Oracle WebLogic Server mod_wl POST Request Remote Overflow - Nessus

Critical   Plugin ID: 33932

This page contains detailed information about the Oracle WebLogic Server mod_wl POST Request Remote Overflow Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 33932
Name: Oracle WebLogic Server mod_wl POST Request Remote Overflow
Filename: weblogic_mod_wl_overflow.nasl
Vulnerability Published: N/A
This Plugin Published: 2008-08-18
Last Modification Time: 2018-08-06
Plugin Version: 1.22
Plugin Type: remote
Plugin Family: Web Servers
Dependencies: http_version.nasl
Excluded KB Items [?]: Settings/disable_cgi_scanning

Vulnerability Information


Severity: Critical
Vulnerability Published: N/A
Patch Published: N/A
CVE [?]: CVE-2008-3257
CPE [?]: cpe:/a:oracle:weblogic_server

Synopsis

The remote web server uses a module that is affected by a buffer overflow vulnerability.

Description

The Apache web server running on the remote host includes a version of the WebLogic plug-in for Apache (mod_wl) that is affected by a buffer overflow. This is an Apache module included with Oracle (formerly BEA) WebLogic Server and used to proxy requests from an Apache HTTP server to WebLogic. A remote attacker can leverage this issue to execute arbitrary code on the remote host.

Note that Nessus has not tried to exploit this issue but rather has only checked the affected module's build timestamp. As a result, it will not detect if the remote implements one of the workarounds published by Oracle in its advisory. Still, it should be noted that the vendor strongly recommends updating the plug-in.

Solution

Install the latest web server plug-in as described in the vendor advisory above.

Public Exploits


Target Network Port(s): 80
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Oracle WebLogic Server mod_wl POST Request Remote Overflow vulnerability:

  1. Metasploit: exploit/windows/http/bea_weblogic_post_bof
    [Oracle Weblogic Apache Connector POST Request Buffer Overflow]
  2. Exploit-DB: exploits/windows/remote/6089.pl
    [EDB-6089: Bea Weblogic Apache Connector - Code Execution / Denial of Service]
  3. Exploit-DB: exploits/windows/remote/18897.rb
    [EDB-18897: Oracle Weblogic Apache Connector - POST Buffer Overflow (Metasploit)]
  4. GitHub: https://github.com/SunatP/FortiSIEM-Incapsula-Parser
    [CVE-2008-3257]

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.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

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)

Go back to menu.

Plugin Source


This is the weblogic_mod_wl_overflow.nasl nessus plugin source code. This script is Copyright (C) 2008-2018 Tenable Network Security, Inc.

#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(33932);
  script_version("1.22");

  script_cve_id("CVE-2008-3257");
  script_bugtraq_id(30273);
  script_xref(name:"CERT", value:"716387");
  script_xref(name:"EDB-ID", value:"6089");
  script_xref(name:"Secunia", value:"31146");

  script_name(english:"Oracle WebLogic Server mod_wl POST Request Remote Overflow");
  script_summary(english:"Sends a POST request to get the plug-in's build timestamp");

 script_set_attribute(attribute:"synopsis", value:
"The remote web server uses a module that is affected by a buffer
overflow vulnerability." );
 script_set_attribute(attribute:"description", value:
"The Apache web server running on the remote host includes a version of
the WebLogic plug-in for Apache (mod_wl) that is affected by a buffer
overflow.  This is an Apache module included with Oracle (formerly BEA)
WebLogic Server and used to proxy requests from an Apache HTTP server
to WebLogic.  A remote attacker can leverage this issue to execute
arbitrary code on the remote host. 

Note that Nessus has not tried to exploit this issue but rather has
only checked the affected module's build timestamp.  As a result, it
will not detect if the remote implements one of the workarounds
published by Oracle in its advisory.  Still, it should be noted that
the vendor strongly recommends updating the plug-in." );
 script_set_attribute(attribute:"solution", value:
"Install the latest web server plug-in as described in the vendor
advisory above." );
 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:"Exploits are available");
 script_set_attribute(attribute:"exploit_available", value:"true");
 script_set_attribute(attribute:"exploit_framework_core", value:"true");
 script_set_attribute(attribute:"metasploit_name", value:'Oracle Weblogic Apache Connector POST Request Buffer Overflow');
 script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
 script_cwe_id(119);
 script_set_attribute(attribute:"plugin_publication_date", value: "2008/08/18");
 script_cvs_date("Date: 2018/08/06 14:03:16");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_set_attribute(attribute:"cpe",value:"cpe:/a:oracle:weblogic_server");
script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_end_attributes();


  script_category(ACT_GATHER_INFO);
  script_family(english:"Web Servers");

  script_copyright(english:"This script is Copyright (C) 2008-2018 Tenable Network Security, Inc.");

  script_dependencies("http_version.nasl");
  script_exclude_keys("Settings/disable_cgi_scanning");
  script_require_ports("Services/www", 80);

  exit(0);
}


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


port = get_http_port(default:80);
if (!get_port_state(port)) exit(0);


# Make sure the banner looks like Apache.
banner = get_http_banner(port:port);
if (
  !banner || 
  !egrep(pattern:"^Server:.*(Apache|Oracle HTTP Server|IBM_HTTP_SERVER|IBM_HTTP_Server)", string:banner)
) exit(0);


# Iterate over known directories.
dirs = get_kb_list(string("www/", port, "/content/directories"));
if (isnull(dirs)) dirs = make_list("", "/weblogic");

foreach dir (dirs)
{
  # Look for the plug-in and a bridge message.
  url = string(dir, "/index.jsp");

  res = http_send_recv3(method:"GET", item:url, port:port);
  if (res == NULL) exit(0);

  # nb: if there's a problem with configured WebLogic server, the initial
  #     request results in a bridge message we can use to fingerprint the
  #     plug-in. Otherwise, we pass in a special request to "tickle" one.
  if ("X-Powered-By: Servlet" >< res[1])
  {
    res = http_send_recv3(
      method:"POST", 
      item:url, 
      port:port,
      add_headers:make_array("Content-Length", "-1")
    );
    if (res == NULL) exit(0);
  }

  # If it's a bridge message from Apache...
  if (
    "TITLE>Weblogic Bridge Message" >< res[2] ||
    "Failure of server APACHE bridge:</H2>" >< res[2]
  )
  {
    build = "";
    change = "";

    foreach line (split(res[2], keep:FALSE))
    {
      if ("Build date/time:" >< line)
      {
        build = strstr(line, "Build date/time:") - "Build date/time:";
        build = ereg_replace(pattern:"<[^>]+>", replace:"", string:build);
        build = ereg_replace(pattern:"^ +", replace:"", string:build);
      }
      if ("Change Number:" >< line)
      {
        change = strstr(line, "Change Number:") - "Change Number:";
        change = ereg_replace(pattern:"<[^>]+>", replace:"", string:change);
        change = ereg_replace(pattern:"^ +", replace:"", string:change);
      }
      if (build && change) break;
    }

    if (
      build && 
      (
        build =~ "^[A-Za-z]{3} ( |[0-3])[0-9] (1[0-9]{3}|200[0-7]) " ||
        build =~ "^(Jan|Feb|Mar|Apr|May|Jun) ( |[0-3])[0-9] 2008 " ||
        build =~ "^Jul ( |[01])[0-9] 2008 "
      )
    )
    {
      if (report_verbosity > 0)
      {
        report = string(
          "\n",
          "Nessus was able to retrieve the following information about the remote\n",
          "WebLogic plug-in :\n",
          "\n",
          "  Plug-in type    : Apache\n"
        );
        if (build)
        {
          report = string(
            report,
            "  Build date/time : ", build, "\n"
          );
        }
        if (change)
        {
          report = string(
            report,
            "  Change number   : ", change, "\n"
          );
        }
        if (report_verbosity > 1)
        {
          report = string(
            report,
            "\n",
            "It is configured to proxy requests such as :\n",
            "\n",
            "  ", build_url(port:port, qs:url), "\n"
          );
        }
        security_hole(port:port, extra:report);
      }
      else security_hole(port);
    }

    # We've found the plug-in so we're done.
    exit(0);
  }
}

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

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

Go back to menu.

How to Run


Here is how to run the Oracle WebLogic Server mod_wl POST Request Remote Overflow 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 Web Servers plugin family.
  6. On the right side table select Oracle WebLogic Server mod_wl POST Request Remote Overflow plugin ID 33932.
  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 weblogic_mod_wl_overflow.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - weblogic_mod_wl_overflow.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 weblogic_mod_wl_overflow.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: CERT | Computer Emergency Response Team: Secunia Advisory: CWE | Common Weakness Enumeration:
  • CWE-119 (Weakness) Improper Restriction of Operations within the Bounds of a Memory Buffer
See also: Similar and related Nessus plugins:
  • 87011 - Oracle WebLogic Java Object Deserialization RCE
  • 90709 - Oracle WebLogic Server Java Object Deserialization RCE (April 2016 CPU)
  • 92606 - Oracle WebLogic Server Java Object Deserialization RCE (July 2016 CPU)
  • 105484 - Oracle WebLogic WSAT Remote Code Execution
  • 96803 - Oracle WebLogic Java Object RMI Connect-Back Deserialization RCE (January 2017 CPU)
  • 124338 - Oracle WebLogic WLS9-async Remote Code Execution (remote check)
  • 57040 - Oracle WebLogic Server Web Services Security Policy not Enforced (CVE-2008-5459)
  • 17742 - Oracle WebLogic JSP Pages and Servlets Unspecified Information Disclosure (CVE-2008-5460)
  • 17743 - Oracle WebLogic WLS Unspecified Vulnerability (CVE-2008-5461)
  • 109429 - Oracle WebLogic Server Deserialization RCE (CVE-2018-2628)
  • 111665 - Oracle WebLogic Server Deserialization RCE (CVE-2018-2893)
  • 126262 - Oracle WebLogic Server Deserialization RCE (CVE-2019-2729)
  • 34781 - Oracle WebLogic Server mod_wl Invalid Parameter Remote Overflow (1150354)
  • 35374 - Oracle WebLogic Server Plug-in Remote Overflow (1166189)
  • 17771 - Oracle WebLogic Portal Elevation of Privilege (CVE-2008-5462)
  • 52756 - Oracle WebLogic Server Servlet Container Session Fixation

Version


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

Go back to menu.