Scrutinizer — 1 vulnerability check

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

← All products · Feeds on GitHub

Plixer Scrutinizer < 9.5.0 unauthenticated file upload via /d4d/uploader.php

CVECVE-2012-2627, CVE-2012-2626, CVE-2012-3848
Severitycritical · CVSS 9.4
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, set_var, http_request, match · highest QoD 75
Feedtests/vulnerabilities/scrutinizer/scrutinizer-uploader-file-upload.yaml

Plixer (Dell SonicWALL) Scrutinizer NetFlow & sFlow Analyzer before 9.5.0 lets anyone upload files through /d4d/uploader.php without logging in. The file is written under the name chosen by the client into the snmp\mibs folder of the installation, next to the SNMP configuration files that an attacker can thereby overwrite. The test uploads a short text file under a random per-run name (noctis_<random>.txt) and reports the host when the server answers that the upload succeeded for exactly that file name. The uploaded file is not reachable over HTTP and therefore stays on the target: it only contains a line identifying it as a scanner test file and can be deleted safely. Versions before 9.5.0 are also affected by an administrative authentication bypass and by cross-site scripting fixed in the same release.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request POST /d4d/uploader.php with a crafted body
  3. Checks up.body for "success"\s*:\s*1 → finding QoD 75: Scrutinizer /d4d/uploader.php accepted an unauthenticated multipart upload of … and answered "success":1 with that file name (file written …

References:

Feed source — tests/vulnerabilities/scrutinizer/scrutinizer-uploader-file-upload.yaml
# Plixer / Dell SonicWALL Scrutinizer < 9.5.0 — unauthenticated file upload via
# /d4d/uploader.php (CVE-2012-2627; Trustwave TWSL2012-014 finding 2).
#
# /d4d/uploader.php stores the "uploadedfile" multipart part under the file name
# the client chooses, in <install>\snmp\mibs\, without any session check, and
# answers {"success":1,"file_name":"<name>"}. The same folder holds the SNMP
# configuration files, which an attacker can overwrite by picking their name.
#
# Detection (the advisory's / NASL's request, benign):
#   - upload a short text file under a per-run random name
#     (noctis_<32 hex>.txt — it can never collide with an existing MIB/config
#     file) whose content says it is a scanner test file;
#   - the reply must carry "success":1 AND "file_name":"<that random name>"
#     → QoD 75. The uploaded file is not reachable over HTTP, so it cannot be
#     read back or removed: one small text file is left in snmp\mibs.
#
# Deviations from the NASL (improvements):
#   - the NASL accepts '"success":1' anywhere plus the file name anywhere in
#     the raw reply (headers included); the feed requires the JSON keys
#     "success":1 and "file_name":"<random name>" in the body, so an error page
#     that merely echoes the request cannot match;
#   - the random name is 32 hex characters instead of the NASL's short
#     lowercase string, so a canned/static success reply cannot match either
#     (proven by the mock's "blanket" mode);
#   - well-formed multipart body (the NASL hard-codes a Content-Length and
#     sends a stray blank line before the first boundary).
#
# CVEs: the probe proves CVE-2012-2627. CVE-2012-2626 (admin.cgi auth bypass)
# and CVE-2012-3848 (d4d XSS) were fixed in the same release (9.5.0), so a
# vulnerable uploader implies them too; they stay on the finding, as in the
# source check. Proving CVE-2012-2626 directly would create an admin account,
# so it is not probed. CVSS: NVD v2 9.4 (CVE-2012-2627, no v3 on NVD).
#
# Ported from OpenVAS/Greenbone NASL 2012/gb_scrutinizer_54726.nasl
# (OID 1.3.6.1.4.1.25623.1.0.103528, GPL-2.0-only).
uid: 44ccf33f-a5b5-4eb2-9466-e78be1552de1
name: "Plixer Scrutinizer < 9.5.0 unauthenticated file upload via /d4d/uploader.php"
description: |
  Plixer (Dell SonicWALL) Scrutinizer NetFlow & sFlow Analyzer before 9.5.0
  lets anyone upload files through /d4d/uploader.php without logging in. The
  file is written under the name chosen by the client into the snmp\mibs
  folder of the installation, next to the SNMP configuration files that an
  attacker can thereby overwrite. The test uploads a short text file under a
  random per-run name (noctis_<random>.txt) and reports the host when the
  server answers that the upload succeeded for exactly that file name. The
  uploaded file is not reachable over HTTP and therefore stays on the target:
  it only contains a line identifying it as a scanner test file and can be
  deleted safely. Versions before 9.5.0 are also affected by an administrative
  authentication bypass and by cross-site scripting fixed in the same release.
category: rce
cves: [CVE-2012-2627, CVE-2012-2626, CVE-2012-3848]
cvss: 9.4
severity: critical
confidence_base: 0.30
tags: [scrutinizer, plixer, sonicwall, netflow, file-upload, unauthenticated, intrusive]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-2627"
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-2626"
  - "https://nvd.nist.gov/vuln/detail/CVE-2012-3848"
  - "https://seclists.org/fulldisclosure/2012/Jul/360"
  - "https://www.exploit-db.com/exploits/37548"
  - "https://www.securityfocus.com/bid/54726"

steps:
  # Per-run random file name and multipart boundary.
  - id: gen-proof
    action: script
    code: |
      let tok = rand_hex(16);
      #{ tok: tok, name: "noctis_" + tok + ".txt" }
    store_as: proof

  # Pre-init so the confirm condition never reads an undefined variable when
  # the request fails (connection refused / TLS error).
  - id: init-up
    action: set_var
    var_name: up
    var_value: ""

  - id: upload
    action: http_request
    method: POST
    path: "/d4d/uploader.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "multipart/form-data; boundary=_NOCTIS_{{proof.tok}}"
    body: "--_NOCTIS_{{proof.tok}}\r\nContent-Disposition: form-data; name=\"uploadedfile\"; filename=\"{{proof.name}}\"\r\nContent-Type: application/octet-stream\r\n\r\nnoctis vulnerability scanner test file - safe to delete\r\n--_NOCTIS_{{proof.tok}}--\r\n"
    store_as: up

  - id: confirm-upload
    action: match
    source: up.body
    pattern: "\"success\"\\s*:\\s*1"
    condition: 'type_of(up.body) == "string" && ereg("\"success\"[ \t]*:[ \t]*1[^0-9]", up.body) && ereg("\"file_name\"[ \t]*:[ \t]*\"" + proof.name + "\"", up.body)'
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "Scrutinizer /d4d/uploader.php accepted an unauthenticated multipart upload of {{proof.name}} and answered \"success\":1 with that file name (file written to the snmp\\mibs folder; it holds one test line and can be deleted)"
        remediation: "Upgrade Scrutinizer to 9.5.0 or later, and restrict access to the web console. Delete the noctis_*.txt test file from the snmp\\mibs folder of the installation."
      stop: true

View these feeds on GitHub