JBoss Enterprise Application Platform '/jmx-console' Authentication Bypass - Nessus

High   Plugin ID: 53337

This page contains detailed information about the JBoss Enterprise Application Platform '/jmx-console' Authentication Bypass Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 53337
Name: JBoss Enterprise Application Platform '/jmx-console' Authentication Bypass
Filename: jboss_eap_jmx_console_auth_bypass2.nasl
Vulnerability Published: 2010-04-26
This Plugin Published: 2011-04-08
Last Modification Time: 2022-04-11
Plugin Version: 1.25
Plugin Type: remote
Plugin Family: Web Servers
Dependencies: jboss_jmx_console_accessible.nasl

Vulnerability Information


Severity: High
Vulnerability Published: 2010-04-26
Patch Published: 2010-04-26
CVE [?]: CVE-2010-0738
CPE [?]: cpe:/a:redhat:jboss_enterprise_application_platform
Exploited by Malware: True

Synopsis

The remote web server has an authentication bypass vulnerability.

Description

The version of JBoss Enterprise Application Platform (EAP) running on the remote host allows unauthenticated access to documents under the /jmx-console directory. This is due to a misconfiguration in web.xml which only requires authentication for GET and POST requests. Specifying a different verb such as HEAD, DELETE, or PUT causes the default GET handler to be used without authentication.

A remote, unauthenticated attacker could exploit this by deploying a malicious .war file, resulting in arbitrary code execution.

This version of JBoss EAP likely has other vulnerabilities (refer to Nessus plugins 33869 and 46181).

Solution

Upgrade to JBoss EAP version 4.2.0.CP09 / 4.3.0.CP08 or later.

If a non-vulnerable version of the software is being used, remove all <http-method> elements from the <security-constraint> section of the appropriate web.xml.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the JBoss Enterprise Application Platform '/jmx-console' Authentication Bypass vulnerability:

  1. Metasploit: exploit/multi/http/jboss_maindeployer
    [JBoss JMX Console Deployer Upload and Execute]
  2. Metasploit: auxiliary/admin/http/jboss_bshdeployer
    [JBoss JMX Console Beanshell Deployer WAR Upload and Deployment]
  3. Metasploit: exploit/multi/http/jboss_bshdeployer
    [JBoss JMX Console Beanshell Deployer WAR Upload and Deployment]
  4. Metasploit: auxiliary/admin/http/jboss_deploymentfilerepository
    [JBoss JMX Console DeploymentFileRepository WAR Upload and Deployment]
  5. Metasploit: exploit/multi/http/jboss_deploymentfilerepository
    [JBoss Java Class DeploymentFileRepository WAR Deployment]
  6. Metasploit: auxiliary/scanner/http/jboss_vulnscan
    [JBoss Vulnerability Scanner]
  7. Metasploit: auxiliary/scanner/sap/sap_icm_urlscan
    [SAP URL Scanner]
  8. Exploit-DB: exploits/multiple/remote/16316.rb
    [EDB-16316: JBoss - Java Class DeploymentFileRepository WAR Deployment (Metasploit)]
  9. Exploit-DB: exploits/multiple/remote/16318.rb
    [EDB-16318: JBoss JMX - Console Deployer Upload and Execute (Metasploit)]
  10. Exploit-DB: exploits/multiple/remote/16319.rb
    [EDB-16319: JBoss JMX - Console Beanshell Deployer WAR Upload and Deployment (Metasploit)]
  11. Exploit-DB: exploits/jsp/webapps/17924.pl
    [EDB-17924: JBoss & JMX Console - Misconfigured Deployment Scanner]
  12. Exploit-DB: exploits/windows/webapps/35982.txt
    [EDB-35982: Hewlett-Packard (HP) UCMDB - JMX-Console Authentication Bypass]
  13. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2010-0738]
  14. GitHub: https://github.com/fupinglee/JavaTools
    [CVE-2010-0738]
  15. GitHub: https://github.com/hatRiot/clusterd
    [CVE-2010-0738]
  16. GitHub: https://github.com/qashqao/clusterd
    [CVE-2010-0738]
  17. GitHub: https://github.com/ChristianPapathanasiou/jboss-autopwn
    [CVE-2010-0738: JBoss Autopwn as featured at BlackHat Europe 2010 - this version incorporates ...]
  18. GitHub: https://github.com/gitcollect/jboss-autopwn
    [CVE-2010-0738: JBoss Autopwn CVE-2010-0738 JBoss authentication bypass]
  19. ExploitHub: EH-12-132
  20. 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 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)

Go back to menu.

Plugin Source


This is the jboss_eap_jmx_console_auth_bypass2.nasl nessus plugin source code. This script is Copyright (C) 2011-2022 Tenable Network Security, Inc.

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

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

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

  script_cve_id("CVE-2010-0738");
  script_bugtraq_id(39710);
  script_xref(name:"EDB-ID", value:"16316");
  script_xref(name:"EDB-ID", value:"16318");
  script_xref(name:"EDB-ID", value:"16319");
  script_xref(name:"EDB-ID", value:"17924");
  script_xref(name:"SECUNIA", value:"39563");

  script_name(english:"JBoss Enterprise Application Platform '/jmx-console' Authentication Bypass");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server has an authentication bypass vulnerability.");
  script_set_attribute(attribute:"description", value:
"The version of JBoss Enterprise Application Platform (EAP) running on
the remote host allows unauthenticated access to documents under the
/jmx-console directory.  This is due to a misconfiguration in web.xml
which only requires authentication for GET and POST requests.
Specifying a different verb such as HEAD, DELETE, or PUT causes the
default GET handler to be used without authentication.

A remote, unauthenticated attacker could exploit this by deploying a
malicious .war file, resulting in arbitrary code execution.

This version of JBoss EAP likely has other vulnerabilities (refer to
Nessus plugins 33869 and 46181).");
  # https://blog.mindedsecurity.com/2010/04/good-bye-critical-jboss-0day.html
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a1451410");
  script_set_attribute(attribute:"see_also", value:"http://www.mindedsecurity.com/MSA030409.html");
  script_set_attribute(attribute:"see_also", value:"https://bugzilla.redhat.com/show_bug.cgi?id=574105");
  script_set_attribute(attribute:"see_also", value:"https://www.redhat.com/security/data/cve/CVE-2010-0738.html");
  # https://developer.jboss.org/blogs/mjc/2011/10/20/statement-regarding-security-threat-to-jboss-application-server?_sscc=t
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?190be824");
  script_set_attribute(attribute:"solution", value:
"Upgrade to JBoss EAP version 4.2.0.CP09 / 4.3.0.CP08 or later.

If a non-vulnerable version of the software is being used, remove
all <http-method> elements from the <security-constraint> section
of the appropriate web.xml.");
  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_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:"metasploit_name", value:'JBoss JMX Console Deployer Upload and Execute');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_exploithub", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:"CANVAS");
  script_set_attribute(attribute:"exploithub_sku", value:"EH-12-132");

  script_set_attribute(attribute:"vuln_publication_date", value:"2010/04/26");
  script_set_attribute(attribute:"patch_publication_date", value:"2010/04/26");
  script_set_attribute(attribute:"plugin_publication_date", value:"2011/04/08");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:redhat:jboss_enterprise_application_platform");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

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

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

  script_dependencies("jboss_jmx_console_accessible.nasl");
  script_require_ports("Services/www", 8080);

  exit(0);
}


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


port = get_http_port(default:8080);

# make sure this looks like jboss eap unless paranoid
if (report_paranoia < 2)
{
  banner = get_http_banner(port:port, exit_on_fail:TRUE);
  if (
    !egrep(pattern:'^X-Powered-By:.*JBoss', string:banner) &&
    !egrep(pattern:'^Server: Apache-Coyote', string:banner) # HP BSM
  )
  {
    exit(0, "The web server on port "+port+" doesn't appear to be JBoss EAP.");
  }
}

if (get_kb_item("JBoss/"+port+"/jmx-console"))
  exit(1, "The JBoss install on port "+port+" allows unauthenticated access to its /jmx-console directory.");

url = '/jmx-console/checkJNDI.jsp';
res = http_send_recv3(method:'PUT', item:url, data:'', port:port, exit_on_fail:TRUE);

if (
  (
    'JNDI Check</title>' >< res[2] &&
    '<h1>JNDI Checking for host' >< res[2]
  ) ||
  (
    '<td>InitialContext properites</td>' >< res[2] &&
    '<td>jndi.properties locations</td>' >< res[2] &&
    '</td></tr><tr><td>jmx: org.jnp.interfaces.NamingContext:org.jnp.interfaces.NamingContext' >< res[2]
  ) ||
  (
    '</td></tr><tr><td>QueueConnectionFactory: org.jboss.naming.LinkRefPair' >< res[2] &&
    '</td></tr><tr><td>UUIDKeyGeneratorFactory: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory' >< res[2]
  )
)
{
  # Show the request used to get the page
  if (report_verbosity > 0)
  {
    report =
      '\nNessus retrieved '+build_url(qs:url, port:port)+
      '\nwithout authentication by using the following request :\n'+
      '\n'+crap(data:"-", length:30)+' snip '+crap(data:"-", length:30)+
      '\n'+ http_last_sent_request() +
      crap(data:"-", length:30)+' snip '+crap(data:"-", length:30)+'\n\n'+
      'A portion of the HTML output is displayed below:\n'+
      '\n'+crap(data:"-", length:30)+' snip '+crap(data:"-", length:30)+
      '\n'+ beginning_of_response(resp:res[2], max_lines:20) + '\n' +
      crap(data:"-", length:30)+' snip '+crap(data:"-", length:30);

    security_hole(port:port, extra:report);
  }
  else security_hole(port);
}
else exit(0, 'The JBoss EAP server on port '+port+' is not affected.');

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

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

Go back to menu.

How to Run


Here is how to run the JBoss Enterprise Application Platform '/jmx-console' Authentication Bypass 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 JBoss Enterprise Application Platform '/jmx-console' Authentication Bypass plugin ID 53337.
  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 jboss_eap_jmx_console_auth_bypass2.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: Secunia Advisory: See also: Similar and related Nessus plugins:
  • 56849 - HP-UX PHSS_42328 : s700_800 11.X OV NNM9.00 NNM 9.0x Patch 5
  • 80195 - Juniper Junos Space < 13.3R1.8 Multiple Vulnerabilities (JSA10627)
  • 63928 - RHEL 4 : JBoss EAP (RHSA-2010:0376)
  • 63929 - RHEL 4 : JBoss EAP (RHSA-2010:0377)
  • 63930 - RHEL 5 : JBoss EAP (RHSA-2010:0378)
  • 63931 - RHEL 5 : JBoss EAP (RHSA-2010:0379)
  • 33869 - JBoss Enterprise Application Platform (EAP) Status Servlet Request Remote Information Disclosure
  • 109321 - JBoss Enterprise Application Platform doFilter() Method Insecure Deserialization RCE
  • 87312 - JBoss Java Object Deserialization RCE
  • 18526 - JBoss org.jboss.web.WebServer Class Multiple Vulnerabilities (Source Disc, ID)
  • 23843 - JBoss Application Server (jbossas) JMX Console DeploymentFileRepository Traversal Arbitrary File Manipulation
  • 132311 - Red Hat JBoss Enterprise Application Platform 6.x < 6.4.22 Multiple Vulnerabilities
  • 132313 - Red Hat JBoss Enterprise Application Platform 7.x < 7.2.4 Authorization Bypass
  • 132314 - Red Hat JBoss Enterprise Application Platform 7.x < 7.2.5 Multiple Vulnerabilities
  • 121515 - JBoss Remoting RemoteMessageChannel DoS (intrusive check)
  • 66190 - JBossWS Endpoint Uses Unsafe Encryption
  • 66971 - JBoss Enterprise Application Platform 6.1.0 Update (RHSA-2013:0833)
  • 72238 - JBoss Enterprise Application Platform 6.1.1 Update (RHSA-2013:1209)
  • 72237 - JBoss Portal 6.1.0 Update (RHSA-2013:1437)
  • 70414 - Apache Tomcat / JBoss EJBInvokerServlet / JMXInvokerServlet Multiple Vulnerabilities

Version


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

Go back to menu.