D-Link / TOTOLINK (ExportSettings) — 1 vulnerability check

noctis ships 1 vulnerability check for D-Link / TOTOLINK (ExportSettings), covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.

← All products · Feeds on GitHub

D-Link / TOTOLINK ExportSettings.sh configuration download without authentication

CVECVE-2018-17786, CVE-2022-32993
Severitycritical · CVSS 9.8
Categoryexposure — Exposure
Serviceshttp, https
Detectionset_var, tcp_connect, match · highest QoD 75
Feedtests/vulnerabilities/dlink-exportsettings/CVE-2018-17786.yaml

Requests /cgi-bin/ExportSettings.sh without credentials and reports when the device returns its configuration as an octet-stream attachment.

How noctis detects it

  1. Raw TCP (TLS on HTTPS), sent verbatim: GET /cgi-bin/ExportSettings.sh HTTP/1.0
  2. Checks resp.banner for (?im)^HTTP/1\.[01] 200[\s\S]*content-type\s*:\s*application/octet-str…
  3. Checks resp.banner for (?i)content-disposition\s*:\s*attachment;\s*filename="[^"]+\.(dat|bin… → finding QoD 75: D-Link/TOTOLINK ExportSettings.sh returned a config attachment without authentication (200 + octet-stream + Content-Disposition .dat/.bin) …

References:

Feed source — tests/vulnerabilities/dlink-exportsettings/CVE-2018-17786.yaml
uid: 8a3f2b61-5d04-4e7c-9b18-2f6a0c9d4e53
name: "CVE-2018-17786 — D-Link / TOTOLINK ExportSettings.sh configuration download without authentication (CVSS 9.8)"
description: "Requests /cgi-bin/ExportSettings.sh without credentials and reports when the device returns its configuration as an octet-stream attachment."
cves: [CVE-2018-17786, CVE-2022-32993]
cvss: 9.8
severity: critical
category: exposure
confidence_base: 0.30
tags: [dlink, totolink, broken-access-control]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2018-17786"
  - "OpenVAS NASL 2023/dlink/gb_dlink_exportsettings_broken_access_control_active.nasl (GPL-2.0-only)"
# Ported from OpenVAS/Greenbone NASL gb_dlink_exportsettings_broken_access_control_active.nasl
# (GPL-2.0-only). Faithful: the NASL confirms the config export by requiring ALL of a 200 status,
# Content-Type: application/octet-stream, AND a Content-Disposition attachment with a .dat/.bin
# filename — a bare "200 application/octet-stream" (common for arbitrary binary) is not enough.
# Two chained matches make this header-order-independent. Patched devices 401, so nothing fires.
steps:
  - id: init
    action: set_var
    var_name: octet_ok
    var_value: false

  - id: probe
    action: tcp_connect
    port: "{{port}}"
    send: "GET /cgi-bin/ExportSettings.sh HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
    store_as: resp

  - id: header-gate
    action: match
    source: resp.banner
    pattern: '(?im)^HTTP/1\.[01] 200[\s\S]*content-type\s*:\s*application/octet-stream'
    on_match:
      set_vars:
        octet_ok: true

  - id: detect
    action: match
    source: resp.banner
    pattern: '(?i)content-disposition\s*:\s*attachment;\s*filename="[^"]+\.(dat|bin)"'
    condition: "octet_ok == true"
    on_match:
      finding:
        confidence_delta: 0.50
        qod: 75
        evidence: "D-Link/TOTOLINK ExportSettings.sh returned a config attachment without authentication (200 + octet-stream + Content-Disposition .dat/.bin) — CVE-2018-17786: {{resp.banner}}"
      stop: true

View these feeds on GitHub