NETGEAR WNDAP350 — 1 vulnerability check

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

← All products · Feeds on GitHub

NETGEAR WNDAP350 / WN604 downloadFile.php Unauthenticated Configuration Disclosure

CVECVE-2024-6646
Severitymedium · CVSS 5.3
Categoryexposure — Exposure
Serviceshttp, https
Detectionset_var, http_request, script, match · highest QoD 75
Feedtests/vulnerabilities/netgear-wndap350/CVE-2024-6646.yaml

Requests /downloadFile.php?file=config and /downloadFile.php without credentials and confirms that the access point returns its configuration file: at least one body line starts with a sensitive configuration key followed by a space — the admin account (`system:basicSettings:adminName`, `system:basicSettings:adminPasswd`) or a Wi-Fi key (`system:staSettings:...presharedKey` / `...wepPassPhrase`, `system:wdsSettings:...wdsPresharedkey`). Only the names of the keys found are reported; their values are not copied into the finding.

How noctis detects it

  1. HTTP(S) request GET /downloadFile.php?file=config
  2. HTTP(S) request GET /downloadFile.php
  3. Parses / computes the next value with a Rhai script
  4. Checks leak.redacted for <sensitive key> <redacted> → finding QoD 75: Unauthenticated GET … at …:… returned the access point configuration file with … sensitive key(s) (values withheld): …

References:

Feed source — tests/vulnerabilities/netgear-wndap350/CVE-2024-6646.yaml
# NETGEAR WNDAP350 / WN604 — downloadFile.php unauthenticated configuration download (CVE-2024-6646)
#
# The access point's web UI serves its running configuration through
# /downloadFile.php without any login: the WN604 (firmware up to 20240710) answers
# `/downloadFile.php?file=config`, the older WNDAP350 (firmware 2.0.1 / 2.0.9)
# answers the bare `/downloadFile.php`. The file is a `key value` list holding the
# admin account (`system:basicSettings:adminName` / `adminPasswd`) and the Wi-Fi
# keys (`...presharedKey`, `...wepPassPhrase`, `...wdsPresharedkey`).
#
# Ported from OpenVAS/Greenbone NASL 2013/gb_netgear_WNDAP350_48085.nasl
# (OID 1.3.6.1.4.1.25623.1.0.103702, GPL-2.0-only): same two request paths, same
# sensitive-key regex (trailing space included).
#
# Real exploitation, read-only: the feed actually downloads the configuration
# without credentials — that IS the exploit. Only the NAMES of the sensitive keys
# found reach the finding; no value (password, Wi-Fi key) and no other byte of the
# reply is copied (the match step copies its `source`, so it reads a fixed text).
#
# Better than the NASL:
#   - no "Netgear" landing-page pre-gate: the NASL only tries the download on hosts
#     whose /index.php?page=master, /index.php, /login_button.html or / carries a
#     Netgear title/footer, and exits otherwise (rebranded UI, reverse proxy, a
#     landing page that redirects). The sensitive-key regex is specific enough to
#     stand on its own, so both download paths are always tried;
#   - the key regex is anchored per line on the body only (never on headers), and
#     the key name must be one whitespace-free token (`[^\s]+`, not the source
#     check's `.+`, which spans into a value containing "presharedKey ").
uid: 7c5f4a36-f78c-4b50-aa6b-6e270dde9c97
name: "CVE-2024-6646 — NETGEAR WNDAP350 / WN604 downloadFile.php Unauthenticated Configuration Disclosure"
description: |
  Requests /downloadFile.php?file=config and /downloadFile.php without
  credentials and confirms that the access point returns its configuration
  file: at least one body line starts with a sensitive configuration key
  followed by a space — the admin account (`system:basicSettings:adminName`,
  `system:basicSettings:adminPasswd`) or a Wi-Fi key
  (`system:staSettings:...presharedKey` / `...wepPassPhrase`,
  `system:wdsSettings:...wdsPresharedkey`). Only the names of the keys found
  are reported; their values are not copied into the finding.
cves: [CVE-2024-6646]
cvss: 5.3
severity: medium
category: exposure
confidence_base: 0.30
tags: [netgear, wndap350, wn604, access-point, credential-disclosure, config-disclosure, openvas]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2024-6646"
  - "https://github.com/mikutool/vul/issues/1"
  - "https://vuldb.com/?id.271052"
  - "https://www.securityfocus.com/bid/48085"
  - "OpenVAS/Greenbone NASL 2013/gb_netgear_WNDAP350_48085.nasl (OID 1.3.6.1.4.1.25623.1.0.103702, GPL-2.0-only)"

steps:
  # 0 — pre-init both results: a failed request never sets its store_as, and the
  #     parse script would otherwise abort on an undefined variable.
  - id: init-r1
    action: set_var
    var_name: r1
    var_value: ""

  - id: init-r2
    action: set_var
    var_name: r2
    var_value: ""

  # 1 — WN604 form (the CVE-2024-6646 request).
  - id: probe-config
    action: http_request
    method: GET
    path: "/downloadFile.php?file=config"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: r1

  # 2 — WNDAP350 form (no parameter).
  - id: probe-bare
    action: http_request
    method: GET
    path: "/downloadFile.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    store_as: r2

  # 3 — look for the sensitive keys line by line in each body. Only the path that
  #     leaked, the key names and a fixed placeholder text leave this step.
  - id: parse
    action: script
    code: |
      let pat = "^\\s*(system:basicSettings:admin(Passwd|Name)|system:(sta|wds)Settings:[^\\s]+([Ww]epPassPhrase|presharedKey|wdsPresharedkey)) ";
      let out = #{ leaked: false, path: "", count: 0, keys: "", redacted: "" };
      let cands = [["/downloadFile.php?file=config", r1], ["/downloadFile.php", r2]];
      for c in cands {
        let r = c[1];
        if !out.leaked && type_of(r) == "map" && type_of(r.body) == "string" {
          let hits = egrep(pat, r.body);
          if hits != "" {
            let names = [];
            for l in split(hits, "\n") {
              let k = eregmatch("^\\s*(system:[^\\s]+) ", l);
              if k.len() > 1 && !names.contains(k[1]) {
                names.push(k[1]);
              }
            }
            if names.len() > 0 {
              out.leaked = true;
              out.path = c[0];
              out.count = names.len();
              out.keys = names.reduce(|sum, v| if sum == "" { v } else { sum + ", " + v }, "");
              out.redacted = "configuration file: <sensitive key> <redacted>";
            }
          }
        }
      }
      out
    store_as: leak

  # 4 — report on the fixed placeholder; no disclosed value reaches the finding.
  - id: confirm
    action: match
    condition: "leak.leaked == true"
    source: leak.redacted
    pattern: '<sensitive key> <redacted>'
    on_match:
      finding:
        confidence_delta: 0.55
        qod: 75
        evidence: "Unauthenticated GET {{leak.path}} at {{target_host}}:{{port}} returned the access point configuration file with {{leak.count}} sensitive key(s) (values withheld): {{leak.keys}}"
      stop: true

View these feeds on GitHub