SolarWinds Storage Resource Monitor — 1 vulnerability check

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

← All products · Feeds on GitHub

SolarWinds Storage Resource Monitor Multiple SQL Injection

CVECVE-2016-4350
Severitycritical · CVSS 9.8
Categorysqli — SQL injection
Serviceshttp, https
Detectiontcp_connect, script, match · highest QoD 75
Feedtests/vulnerabilities/solarwinds-srm/CVE-2016-4350.yaml

SolarWinds Storage Resource Monitor (Storage Manager) is prone to multiple SQL injection vulnerabilities. After authenticating to /LoginServlet, an attacker can inject SQL via the fileName parameter of /DuplicateFilesServlet. This check logs in, carries the session cookie to the DuplicateFilesServlet with a single-quote SQLi probe, and confirms the issue when the injected "SQL-INJECTION-TEST" marker is reflected back on the SRM "Enterprise Report" page.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: POST /LoginServlet HTTP/1.0
  2. Parses / computes the next value with a Rhai script
  3. Raw TCP (TLS on HTTPS), sent verbatim: GET /DuplicateFilesServlet?fileName=%27SQL-INJECTION-TEST HTTP/1.0
  4. Checks sqli_resp.banner for SQL-INJECTION-TEST → finding QoD 75: SolarWinds SRM /DuplicateFilesServlet reflected the injected SQL-INJECTION-TEST marker on the authenticated Enterprise Report page: …

References:

Feed source — tests/vulnerabilities/solarwinds-srm/CVE-2016-4350.yaml
# SolarWinds Storage Resource Monitor — multiple SQL injection (CVE-2016-4350)
#
# Active check ported from OpenVAS/Greenbone NASL
# 2016/gb_solarwinds_storage_resource_monitor_mult_sql_inj_vuln.nasl (GPL-2.0-only).
#
# The NVT performs an authenticated, two-step flow against SolarWinds Storage
# Manager / Storage Resource Monitor (SRM):
#   1. POST /LoginServlet with "loginState=checkLogin&loginName=admin&password="
#      and confirm the login by requiring HTTP 200 and the
#      "SolarWinds - Storage Manager" page fingerprint; the login cookie is then
#      extracted from the Set-Cookie header (this is the ONLY cookie the NASL
#      regex pulls out — it is the authenticated session, not a generic one).
#   2. GET /DuplicateFilesServlet?fileName=%27SQL-INJECTION-TEST carrying that
#      session cookie. On a vulnerable build the single-quote breaks the SQL
#      query and the injected "SQL-INJECTION-TEST" marker is reflected back in an
#      error page that also carries the ">Enterprise Report<" / ">Storage
#      Manager<" SRM fingerprint.
#
# The finding keys on the reflected injection marker together with the SRM
# fingerprint on the authenticated DuplicateFiles report — not on the mere
# presence of a session cookie. The payload path carries URL encoding (%27), so
# both requests are sent verbatim over HTTP/1.0 via tcp_connect and matched on
# the raw response text (resp.banner); reqwest would normalise the encoding.
uid: c9d1144e-fd67-4e34-a7ba-5f16c7f89243
name: "SolarWinds Storage Resource Monitor Multiple SQL Injection (CVE-2016-4350)"
description: |
  SolarWinds Storage Resource Monitor (Storage Manager) is prone to multiple SQL
  injection vulnerabilities. After authenticating to /LoginServlet, an attacker
  can inject SQL via the fileName parameter of /DuplicateFilesServlet. This check
  logs in, carries the session cookie to the DuplicateFilesServlet with a
  single-quote SQLi probe, and confirms the issue when the injected
  "SQL-INJECTION-TEST" marker is reflected back on the SRM "Enterprise Report"
  page.
cves: [CVE-2016-4350]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: sqli
tags: [solarwinds, srm, storage-resource-monitor, sqli, web]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2016-4350"
  - "OpenVAS/Greenbone NASL 2016/gb_solarwinds_storage_resource_monitor_mult_sql_inj_vuln.nasl (GPL-2.0-only)"
steps:
  # 1 — authenticate to the Storage Manager login servlet with the probe creds.
  - id: login
    action: tcp_connect
    port: "{{port}}"
    send: "POST /LoginServlet HTTP/1.0\r\nHost: {{target_host}}\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 47\r\n\r\nloginState=checkLogin&loginName=admin&password="
    store_as: login_resp

  # 2 — require HTTP 200 + the SRM login fingerprint, then extract the login
  #     session cookie (the whole NAME=value pair) from the Set-Cookie header.
  #     Returns "" when login did not succeed on a real SRM instance.
  - id: extract-session-cookie
    action: script
    condition: "login_resp.connected == true"
    store_as: session_cookie
    code: |
      let cookie = "";
      if type_of(login_resp.banner) == "string" {
          let banner = login_resp.banner;
          if stridx(banner, "200 OK") >= 0 && stridx(banner, "SolarWinds - Storage Manager") >= 0 {
              let m = eregmatch("Set-Cookie:\\s*([^;\\r\\n]+)", banner);
              if m.len() > 1 { cookie = m[1]; }
          }
      }
      cookie

  # 3 — authenticated SQLi probe: single-quote injection in fileName on the
  #     DuplicateFilesServlet, carrying the session cookie from step 2.
  - id: sqli-probe
    action: tcp_connect
    port: "{{port}}"
    condition: "strlen(session_cookie) > 0"
    send: "GET /DuplicateFilesServlet?fileName=%27SQL-INJECTION-TEST HTTP/1.0\r\nHost: {{target_host}}\r\nCookie: {{session_cookie}}\r\n\r\n"
    store_as: sqli_resp

  # 4 — confirm: the injected SQL-INJECTION-TEST marker is reflected back on the
  #     authenticated SRM "Enterprise Report" page. A patched SRM still serves
  #     the report (with the fingerprint) but does not reflect the injection.
  - id: sqli-confirm
    action: match
    source: sqli_resp.banner
    pattern: "SQL-INJECTION-TEST"
    condition: "stridx(sqli_resp.banner, \">Enterprise Report<\") >= 0"
    on_match:
      finding:
        confidence_delta: 0.50
        qod: 75
        evidence: "SolarWinds SRM /DuplicateFilesServlet reflected the injected SQL-INJECTION-TEST marker on the authenticated Enterprise Report page: {{sqli_resp.banner}}"
      stop: true

View these feeds on GitHub