Lucene search

K
openvasCopyright (C) 2013 Greenbone AGOPENVAS:1361412562310103811
HistoryOct 15, 2013 - 12:00 a.m.

Apache Tomcat/JBoss EJBInvokerServlet / JMXInvokerServlet (RMI over HTTP) Marshalled Object Remote Code Execution

2013-10-1500:00:00
Copyright (C) 2013 Greenbone AG
plugins.openvas.org
1236

10 High

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

6.6 Medium

AI Score

Confidence

High

0.915 High

EPSS

Percentile

98.9%

Apache Tomcat/JBoss Application Server is prone to multiple
remote code execution (RCE) vulnerabilities.

# SPDX-FileCopyrightText: 2013 Greenbone AG
# Some text descriptions might be excerpted from (a) referenced
# source(s), and are Copyright (C) by the respective right holder(s).
#
# SPDX-License-Identifier: GPL-2.0-only

if(description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.103811");
  script_version("2024-06-28T15:38:46+0000");
  script_tag(name:"cvss_base", value:"10.0");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:C/I:C/A:C");
  script_xref(name:"CISA", value:"Known Exploited Vulnerability (KEV) catalog");
  script_xref(name:"URL", value:"https://www.cisa.gov/known-exploited-vulnerabilities-catalog");
  script_cve_id("CVE-2012-0874", "CVE-2013-4810");
  script_name("Apache Tomcat/JBoss EJBInvokerServlet / JMXInvokerServlet (RMI over HTTP) Marshalled Object Remote Code Execution");
  script_tag(name:"last_modification", value:"2024-06-28 15:38:46 +0000 (Fri, 28 Jun 2024)");
  script_tag(name:"creation_date", value:"2013-10-15 10:27:36 +0200 (Tue, 15 Oct 2013)");
  script_category(ACT_GATHER_INFO);
  script_family("Web application abuses");
  script_copyright("Copyright (C) 2013 Greenbone AG");
  script_dependencies("find_service.nasl", "httpver.nasl", "global_settings.nasl");
  script_require_ports("Services/www", 80);
  script_exclude_keys("Settings/disable_cgi_scanning");

  script_xref(name:"URL", value:"https://www.zerodayinitiative.com/advisories/ZDI-13-229/");
  script_xref(name:"URL", value:"http://www.securityfocus.com/bid/57552");
  script_xref(name:"URL", value:"http://www.securityfocus.com/bid/62854");
  script_xref(name:"URL", value:"https://www.exploit-db.com/exploits/28713/");
  script_xref(name:"URL", value:"https://www.exploit-db.com/exploits/30211");

  script_tag(name:"impact", value:"Successfully exploiting these issues may allow an attacker to execute
  arbitrary code within the context of the affected application. Failed
  exploit attempts may result in a denial-of-service condition.");

  script_tag(name:"vuldetect", value:"Determine if the EJBInvokerServlet and/or JMXInvokerServlet is accessible without authentication.");

  script_tag(name:"insight", value:"The specific flaw exists within the exposed EJBInvokerServlet and JMXInvokerServlet. An unauthenticated
  attacker can post a marshalled object allowing them to install an arbitrary application on the target server.");

  script_tag(name:"solution", value:"Ask the Vendor for an update and enable authentication for the mentioned servlets.");

  script_tag(name:"summary", value:"Apache Tomcat/JBoss Application Server is prone to multiple
  remote code execution (RCE) vulnerabilities.");

  script_tag(name:"affected", value:"Apache Tomcat/JBoss Application Server providing access to the EJBInvokerServlet and/or JMXInvokerServlet
  without prior authentication.");

  script_tag(name:"solution_type", value:"VendorFix");
  script_tag(name:"qod_type", value:"remote_analysis");

  exit(0);
}

include("http_func.inc");
include("port_service_func.inc");

port = http_get_port(default:9200);

report = 'The following Servlets are accessible without authentication which indicates that a RCE attack can be executed:\n';

foreach file(make_list("/EJBInvokerServlet", "/JMXInvokerServlet")) {

  url = "/invoker" + file;
  req = http_get(item:url, port:port);
  buf = http_send_recv(port:port, data:req);

  if(buf =~ "^HTTP/1\.[01] 200" &&
     "404" >!< buf &&
     "org.jboss.invocation.MarshalledValue" >< buf &&
     "x-java-serialized-object" >< buf &&
     "WWW-Authenticate" >!< buf) {

    report += '\n' + http_report_vuln_url(port:port, url:url, url_only:TRUE);
    VULN = TRUE;
  }
}

if(VULN) {
  security_message(port:port, data:report);
  exit(0);
}

exit(99);

10 High

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

6.6 Medium

AI Score

Confidence

High

0.915 High

EPSS

Percentile

98.9%