Oracle WebLogic Java Object Deserialization RCE - Nessus

Critical   Plugin ID: 87011

This page contains detailed information about the Oracle WebLogic Java Object Deserialization RCE Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 87011
Name: Oracle WebLogic Java Object Deserialization RCE
Filename: weblogic_2015_4852.nasl
Vulnerability Published: 2015-01-28
This Plugin Published: 2015-11-23
Last Modification Time: 2022-04-11
Plugin Version: 1.25
Plugin Type: remote
Plugin Family: Web Servers
Dependencies: t3_detect.nasl, weblogic_detect.nasl

Vulnerability Information


Severity: Critical
Vulnerability Published: 2015-01-28
Patch Published: 2015-11-26
CVE [?]: CVE-2015-4852
CPE [?]: cpe:/a:oracle:weblogic_server
Exploited by Malware: True
In the News: True

Synopsis

The remote Oracle WebLogic server is affected by a remote code execution vulnerability.

Description

The remote Oracle WebLogic server is affected by a remote code execution vulnerability in the WLS Security component due to unsafe deserialize calls of unauthenticated Java objects to the Apache Commons Collections (ACC) library. An unauthenticated, remote attacker can exploit this to execute arbitrary Java code in the context of the WebLogic server.

Solution

Upgrade to the relevant fixed version referenced in the vendor advisory.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the Oracle WebLogic Java Object Deserialization RCE vulnerability:

  1. Metasploit: exploit/multi/misc/weblogic_deserialize_rawobject
    [Oracle Weblogic Server Deserialization RCE - Raw Object]
  2. Exploit-DB: exploits/java/remote/42806.py
    [EDB-42806: Oracle WebLogic Server 10.3.6.0 - Java Deserialization Remote Code Execution]
  3. Exploit-DB: exploits/multiple/remote/46628.rb
    [EDB-46628: Oracle Weblogic Server Deserialization RCE - Raw Object (Metasploit)]
  4. GitHub: https://github.com/AndersonSingh/serialization-vulnerability-scanner
    [CVE-2015-4852: CVE-2015-4852 Oracle WebLogic Scanner]
  5. GitHub: https://github.com/GrrrDog/Java-Deserialization-Cheat-Sheet
    [CVE-2015-4852]
  6. GitHub: https://github.com/MrTcsy/Exploit
    [CVE-2015-4852]
  7. GitHub: https://github.com/Y4tacker/JavaSec
    [CVE-2015-4852]
  8. GitHub: https://github.com/asa1997/topgear_test
    [CVE-2015-4852]
  9. GitHub: https://github.com/awsassets/weblogic_exploit
    [CVE-2015-4852]
  10. GitHub: https://github.com/cross2to/betaseclab_tools
    [CVE-2015-4852]
  11. GitHub: https://github.com/fengjixuchui/RedTeamer
    [CVE-2015-4852]
  12. GitHub: https://github.com/followboy1999/weblogic-deserialization
    [CVE-2015-4852]
  13. GitHub: https://github.com/hanc00l/weblogic_unserialize_exploit
    [CVE-2015-4852]
  14. GitHub: https://github.com/hashtagcyber/Exp
    [CVE-2015-4852]
  15. GitHub: https://github.com/koutto/jok3r-pocs
    [CVE-2015-4852]
  16. GitHub: https://github.com/lovechinacoco/https-github.com-mai-lang-chai-Middleware-Vulnerability-detection
    [CVE-2015-4852]
  17. GitHub: https://github.com/nex1less/CVE-2015-4852
    [CVE-2015-4852]
  18. GitHub: https://github.com/nihaohello/N-MiddlewareScan
    [CVE-2015-4852]
  19. GitHub: https://github.com/roo7break/serialator
    [CVE-2015-4852: Python script to exploit CVE-2015-4852.]
  20. GitHub: https://github.com/sourcery-ai-bot/Deep-Security-Reports
    [CVE-2015-4852]
  21. GitHub: https://github.com/tdtc7/qps
    [CVE-2015-4852]
  22. GitHub: https://github.com/zema1/oracle-vuln-crawler
    [CVE-2015-4852]
  23. GitHub: https://github.com/zhzhdoai/Weblogic_Vuln
    [CVE-2015-4852: CVE-2015-4852、CVE-2016-0638、CVE-2016-3510、CVE-2019-2890漏洞POC]
  24. Immunity Canvas: CANVAS

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 Score Source [?]: CVE-2015-4852
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:H/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.5 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.5 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the weblogic_2015_4852.nasl nessus plugin source code. This script is Copyright (C) 2015-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(87011);
  script_version("1.25");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2015-4852");
  script_bugtraq_id(77539);
  script_xref(name:"CERT", value:"576313");
  script_xref(name:"IAVA", value:"2015-A-0287");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/05/03");

  script_name(english:"Oracle WebLogic Java Object Deserialization RCE");

  script_set_attribute(attribute:"synopsis", value:
"The remote Oracle WebLogic server is affected by a remote code
execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"The remote Oracle WebLogic server is affected by a remote code
execution vulnerability in the WLS Security component due to unsafe
deserialize calls of unauthenticated Java objects to the Apache
Commons Collections (ACC) library. An unauthenticated, remote attacker
can exploit this to execute arbitrary Java code in the context of the
WebLogic server.");
  # https://www.oracle.com/technetwork/topics/security/alert-cve-2015-4852-2763333.html
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?e0203be3");
  # https://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?9c6d83db");
  script_set_attribute(attribute:"solution", value:
"Upgrade to the relevant fixed version referenced in the vendor
advisory.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2015-4852");

  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:"exploited_by_malware", value:"true");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Oracle Weblogic Server Deserialization RCE - Raw Object');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:"CANVAS");
  script_set_attribute(attribute:"in_the_news", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2015/01/28");
  script_set_attribute(attribute:"patch_publication_date", value:"2015/11/26");
  script_set_attribute(attribute:"plugin_publication_date", value:"2015/11/23");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:oracle:weblogic_server");
  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:"Web Servers");

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

  script_dependencies("weblogic_detect.nasl", "t3_detect.nasl");
  script_require_ports("Services/t3", 7001);

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("t3.inc");

appname = "Oracle WebLogic Server";

port = get_service(svc:'t3', default:7001, exit_on_fail:TRUE);

# Try to talk T3 to the server
sock = open_sock_tcp(port);
if (!sock) audit(AUDIT_SOCK_FAIL, port);
version = t3_connect(sock:sock, port:port);

# send ident so we can move on to login
t3_send_ident_request(sock:sock, port:port);

# send our "login request"
auth_request = '\x05\x65\x08\x00\x00\x00\x01\x00\x00\x00\x1b\x00\x00\x00\x5d\x01\x01\x00\x73\x72\x01\x78\x70\x73\x72\x02\x78\x70\x00\x00\x00\x00\x00\x00\x00\x00\x75\x72\x03\x78\x70\x00\x00\x00\x00\x78\x74\x00\x08\x77\x65\x62\x6c\x6f\x67\x69\x63\x75\x72\x04\x78\x70\x00\x00\x00\x0c\x9c\x97\x9a\x9a\x8c\x9a\x9b\xcf\xcf\x9b\x93\x9a\x74\x00\x08\x77\x65\x62\x6c\x6f\x67\x69\x63\x06\xfe\x01\x00\x00\xac\xed\x00\x05\x73\x72\x00\x1d\x77\x65\x62\x6c\x6f\x67\x69\x63\x2e\x72\x6a\x76\x6d\x2e\x43\x6c\x61\x73\x73\x54\x61\x62\x6c\x65\x45\x6e\x74\x72\x79\x2f\x52\x65\x81\x57\xf4\xf9\xed\x0c\x00\x00\x78\x70\x72\x00\x02\x5b\x42\xac\xf3\x17\xf8\x06\x08\x54\xe0\x02\x00\x00\x78\x70\x77\x02\x00\x00\x78\xfe\x01\x00\x00\xac\xed\x00\x05\x73\x72\x00\x1d\x77\x65\x62\x6c\x6f\x67\x69\x63\x2e\x72\x6a\x76\x6d\x2e\x43\x6c\x61\x73\x73\x54\x61\x62\x6c\x65\x45\x6e\x74\x72\x79\x2f\x52\x65\x81\x57\xf4\xf9\xed\x0c\x00\x00\x78\x70\x72\x00\x13\x5b\x4c\x6a\x61\x76\x61\x2e\x6c\x61\x6e\x67\x2e\x4f\x62\x6a\x65\x63\x74\x3b\x90\xce\x58\x9f\x10\x73\x29\x6c\x02\x00\x00\x78\x70\x77\x02\x00\x00\x78\xfe\x01\x00\x00\xac\xed\x00\x05\x73\x72\x00\x1d\x77\x65\x62\x6c\x6f\x67\x69\x63\x2e\x72\x6a\x76\x6d\x2e\x43\x6c\x61\x73\x73\x54\x61\x62\x6c\x65\x45\x6e\x74\x72\x79\x2f\x52\x65\x81\x57\xf4\xf9\xed\x0c\x00\x00\x78\x70\x72\x00\x10\x6a\x61\x76\x61\x2e\x75\x74\x69\x6c\x2e\x56\x65\x63\x74\x6f\x72\xd9\x97\x7d\x5b\x80\x3b\xaf\x01\x03\x00\x03\x49\x00\x11\x63\x61\x70\x61\x63\x69\x74\x79\x49\x6e\x63\x72\x65\x6d\x65\x6e\x74\x49\x00\x0c\x65\x6c\x65\x6d\x65\x6e\x74\x43\x6f\x75\x6e\x74\x5b\x00\x0b\x65\x6c\x65\x6d\x65\x6e\x74\x44\x61\x74\x61\x74\x00\x13\x5b\x4c\x6a\x61\x76\x61\x2f\x6c\x61\x6e\x67\x2f\x4f\x62\x6a\x65\x63\x74\x3b\x78\x70\x77\x02\x00\x00\x78\xfe\x01\x00\x00';
# this is an org.apache.commons.collections.functors.ConstantTransforms object
# that is part of the deserialization blacklist.
auth_request += '\xac\xed\x00\x05\x73\x72\x00\x3b\x6f\x72\x67\x2e\x61\x70\x61\x63\x68\x65\x2e\x63\x6f\x6d\x6d\x6f\x6e\x73\x2e\x63\x6f\x6c\x6c\x65\x63\x74\x69\x6f\x6e\x73\x2e\x66\x75\x6e\x63\x74\x6f\x72\x73\x2e\x43\x6f\x6e\x73\x74\x61\x6e\x74\x54\x72\x61\x6e\x73\x66\x6f\x72\x6d\x65\x72\x58\x76\x90\x11\x41\x02\xb1\x94\x02\x00\x01\x4c\x00\x09\x69\x43\x6f\x6e\x73\x74\x61\x6e\x74\x74\x00\x12\x4c\x6a\x61\x76\x61\x2f\x6c\x61\x6e\x67\x2f\x4f\x62\x6a\x65\x63\x74\x3b\x78\x70\x73\x72\x00\x11\x6a\x61\x76\x61\x2e\x6c\x61\x6e\x67\x2e\x49\x6e\x74\x65\x67\x65\x72\x12\xe2\xa0\xa4\xf7\x81\x87\x38\x02\x00\x01\x49\x00\x05\x76\x61\x6c\x75\x65\x78\x72\x00\x10\x6a\x61\x76\x61\x2e\x6c\x61\x6e\x67\x2e\x4e\x75\x6d\x62\x65\x72\x86\xac\x95\x1d\x0b\x94\xe0\x8b\x02\x00\x00\x78\x70\x00\x00\x00\x01';
auth_request += '\xfe\x01\x00\x00\xac\xed\x00\x05\x73\x72\x00\x25\x77\x65\x62\x6c\x6f\x67\x69\x63\x2e\x72\x6a\x76\x6d\x2e\x49\x6d\x6d\x75\x74\x61\x62\x6c\x65\x53\x65\x72\x76\x69\x63\x65\x43\x6f\x6e\x74\x65\x78\x74\xdd\xcb\xa8\x70\x63\x86\xf0\xba\x0c\x00\x00\x78\x72\x00\x29\x77\x65\x62\x6c\x6f\x67\x69\x63\x2e\x72\x6d\x69\x2e\x70\x72\x6f\x76\x69\x64\x65\x72\x2e\x42\x61\x73\x69\x63\x53\x65\x72\x76\x69\x63\x65\x43\x6f\x6e\x74\x65\x78\x74\xe4\x63\x22\x36\xc5\xd4\xa7\x1e\x0c\x00\x00\x78\x70\x77\x02\x06\x00\x73\x72\x00\x26\x77\x65\x62\x6c\x6f\x67\x69\x63\x2e\x72\x6d\x69\x2e\x69\x6e\x74\x65\x72\x6e\x61\x6c\x2e\x4d\x65\x74\x68\x6f\x64\x44\x65\x73\x63\x72\x69\x70\x74\x6f\x72\x12\x48\x5a\x82\x8a\xf7\xf6\x7b\x0c\x00\x00\x78\x70\x77\x34\x00\x2eauthenticate\x28\x4c\x77\x65\x62\x6c\x6f\x67\x69\x63\x2e\x73\x65\x63\x75\x72\x69\x74\x79\x2e\x61\x63\x6c\x2eUserInfo\x3b\x29\x00\x00\x00\x1b\x78\x78\xfe\x00\xff';
send_t3(sock:sock, data:auth_request);

# read in the response to our bad login request
return_val = recv_t3(sock:sock);
close(sock);

if (isnull(return_val) ||
  "org.apache.commons.collections.functors.ConstantTransformer cannot be cast to" >!< return_val)
  audit(AUDIT_INST_VER_NOT_VULN, appname, version);

report =
  '\nNessus was able to exploit a Java deserialization vulnerability by' +
  '\nsending a crafted Java object.' +
  '\n';
security_report_v4(port:port, severity:SECURITY_HOLE, extra:report);

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

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

Go back to menu.

How to Run


Here is how to run the Oracle WebLogic Java Object Deserialization RCE 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 Java Object Deserialization RCE plugin ID 87011.
  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_2015_4852.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: IAVA | Information Assurance Vulnerability Alert:
  • 2015-A-0287
CERT | Computer Emergency Response Team: See also: Similar and related Nessus plugins:
  • 87432 - F5 Networks BIG-IP : Java commons-collections library vulnerability (K30518307)
  • 88053 - Oracle WebLogic Server Multiple Vulnerabilities (January 2016 CPU)
  • 87209 - Oracle WebLogic Server Java Object Deserialization RCE (Local Check)
  • 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)
  • 33932 - Oracle WebLogic Server mod_wl POST Request Remote Overflow
  • 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_2015_4852.nasl version 1.25. For more plugins, visit the Nessus Plugin Library.

Go back to menu.