Skip to content
CVE-2026-129354 Google Chronicle · YARA-L

Detect D-Link DIR-600L HNAP Handler Stack Buffer Overflow (CVE-2026-129354) in Google Chronicle

Detects exploitation attempts against the HNAP handler (hnap_main in htdocs/cgibin) of D-Link DIR-600L 2.17b02. A stack-based buffer overflow (CWE-119/CWE-121) is reachable via the HNAP interface by supplying an oversized or malformed SOAPAction header. NVD lists this as remotely exploitable with a published exploit (CVSS 9.3). The advisory that documents the flaw confirms crashes and memory corruption in an emulated test environment but does not demonstrate arbitrary code execution on a physical device, and notes the CVE is not yet confirmed. Detection focuses on HTTP requests to the HNAP endpoint carrying anomalous SOAPAction headers, oversized POST bodies, and post-exploitation indicators from the embedded device.

MITRE ATT&CK

Tactic
Initial Access Execution

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
// df00tech DF00-5f87aeb292 · https://df00tech.com/detections/CVE-2026-129354 · licence: https://df00tech.com/detections/licence
rule dlink_dir600l_hnap_overflow {
  meta:
    author = "Argus Detection Platform"
    description = "D-Link DIR-600L HNAP hnap_main stack buffer overflow exploitation (CVE-2026-129354)"
    severity = "CRITICAL"
  events:
    $e.metadata.event_type = "NETWORK_HTTP"
    $e.network.http.method = "POST"
    (
      re.regex($e.target.url, `(?i)/HNAP1|HNAP|cgibin`)
    )
    (
      $e.network.http.request_body_bytes > 1000 or
      re.regex($e.additional.fields["SOAPAction"], `\.\./|\$\(|` + "`" + `|;|\||%00`)
    )
  condition:
    $e
}
critical severity medium confidence

Chronicle YARA-L rule detecting POST requests to the D-Link HNAP endpoint with oversized bodies or SOAPAction header metacharacters.

Data Sources

Network HTTP LogsFirewallWeb Proxy

Required Tables

NETWORK_HTTP

False Positives & Tuning

  • Legitimate HNAP cloud management traffic with large valid payloads
  • Authorized scanning of the router's HNAP service
  • DPI appliances altering request body byte counts

Other platforms for CVE-2026-129354


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Oversized SOAPAction header to HNAP endpoint

    Expected signal: Firewall/proxy/web logs record a POST to /HNAP1/ with a SOAPAction header length far exceeding normal values.

  2. Test 2 Oversized POST body to cgibin HNAP handler

    Expected signal: Web/proxy logs show a POST to the HNAP endpoint with a request body exceeding 1000 bytes.

  3. Test 3 SOAPAction header with injection metacharacters

    Expected signal: Logs capture a POST to /HNAP1/ with a SOAPAction header containing ';', '|', and '../' sequences.


Response Playbook

Triage

  1. Confirm the destination IP is a D-Link DIR-600L (firmware 2.17b02) or other HNAP-capable D-Link router exposed to the source network, and verify whether its web/HNAP interface is reachable from untrusted zones.
  2. Inspect the full HTTP request: capture the SOAPAction header value and POST body, measure their lengths, and look for non-printable bytes, long byte runs, or shellcode/ROP-like patterns consistent with a stack overflow.
  3. Determine whether the source IP is a known scanner, threat-intel-flagged host, or previously unseen, and check for repeated or burst requests to /HNAP1/ from the same source.
  4. Review device logs (if syslog is forwarded) for crashes, httpd/cgibin restarts, or watchdog reboots timed to the suspicious request.

Containment

  1. Block the source IP at the perimeter firewall and restrict access to the router's HNAP/web management interface to trusted management VLANs only.
  2. Isolate the affected router from the WAN/untrusted segment and disable remote (WAN-side) management and the HNAP service if not required.
  3. If compromise is suspected, take the device offline and prepare for firmware re-flash, since embedded compromise can persist across reboots.

Evidence Collection

  1. Preserve full packet captures / proxy logs of the offending requests including raw SOAPAction headers and POST bodies.
  2. Export firewall, WAF, and web-proxy logs showing the source, timing, and frequency of HNAP requests for the incident timeline.
  3. If accessible, capture the router's running configuration, process list, and any available crash/core dumps before power-cycling.

Escalation Criteria

  • !Escalate to incident response if post-exploitation indicators appear (unexpected outbound connections from the router, DNS/config changes, new admin accounts, or firmware tampering).
  • !Escalate if the same exploitation pattern targets multiple routers or causes repeated crashes/reboots, indicating active mass exploitation.
  • !Escalate to network/device owners for emergency firmware update or decommissioning given the end-of-life status of DIR-600L and the published exploit.

Investigation Guide

Forensic Artifacts

  • >Web/HNAP access logs on the device or upstream proxy showing POST requests to /HNAP1/ with oversized SOAPAction headers
  • >httpd/cgibin process crash or restart entries and watchdog-triggered reboot records in device syslog
  • >Unexpected modifications to NVRAM/config, new firewall rules, or added credentials on the router
  • >Anomalous outbound connections from the router's IP to attacker infrastructure

Tuning Guidance

Baseline normal SOAPAction length and POST body size for legitimate HNAP/mydlink management traffic in your environment, then raise the length thresholds to just above that baseline to cut noise. Whitelist known management source IPs (mydlink cloud ranges, admin workstations) and authorized scanner IPs. If you only ingest firewall metadata without header/body visibility, rely on the path + method + frequency signals and consider deploying packet capture at the router segment for full fidelity.


Hunting Queries

Hunts for bursts of oversized HNAP POST requests across routers to find scanning/exploitation campaigns and identify impacted devices.

Hunting — KQL
kql
// df00tech DF00-5f87aeb292 · https://df00tech.com/detections/CVE-2026-129354 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has "HNAP" and RequestMethod == "POST" | extend sa = tostring(parse_json(AdditionalExtensions).SOAPAction) | where strlen(sa) > 200 or strlen(RequestContext) > 1000 | summarize count(), make_set(SourceIP) by bin(TimeGenerated, 1h), DestinationIP
Hunting — SPL
spl
``` df00tech DF00-5f87aeb292 · https://df00tech.com/detections/CVE-2026-129354 · licence: https://df00tech.com/detections/licence ```
index=proxy OR index=firewall uri="*HNAP*" http_method=POST | eval sa_len=len(coalesce(SOAPAction,soapaction)) | where sa_len>200 OR coalesce(bytes_in,content_length,0)>1000 | stats count values(src_ip) as sources by dest_ip, date_hour

Atomic Red Team Tests

Test 1 Oversized SOAPAction header to HNAP endpoint
linux

Sends a POST request to the HNAP endpoint with an abnormally long SOAPAction header to simulate the buffer overflow trigger against hnap_main.

Command

bash
curl -s -X POST "http://ROUTER_IP/HNAP1/" -H "SOAPAction: http://purenetworks.com/HNAP1/$(python3 -c 'print("A"*2048)')" -H "Content-Type: text/xml" --data '<?xml version="1.0"?><soap:Envelope><soap:Body></soap:Body></soap:Envelope>' --max-time 10 || true

Cleanup

bash
echo 'No persistent changes made by this test; no cleanup required'

Expected Telemetry

Firewall/proxy/web logs record a POST to /HNAP1/ with a SOAPAction header length far exceeding normal values.

Expected Detection

All seven SIEM queries fire on the oversized SOAPAction header.

Test 2 Oversized POST body to cgibin HNAP handler
linux

Submits a large POST body to the cgibin HNAP handler to exercise the oversized-body detection path.

Command

bash
curl -s -X POST "http://ROUTER_IP/HNAP1/" -H "Content-Type: text/xml" --data "$(python3 -c 'print("A"*4096)')" --max-time 10 || true

Cleanup

bash
echo 'No cleanup required; request-only test'

Expected Telemetry

Web/proxy logs show a POST to the HNAP endpoint with a request body exceeding 1000 bytes.

Expected Detection

SIEM queries flag the request based on body length > 1000 bytes.

Test 3 SOAPAction header with injection metacharacters
linux

Sends a POST to the HNAP endpoint with shell/path metacharacters in the SOAPAction header to validate the metacharacter detection branch.

Command

bash
curl -s -X POST "http://ROUTER_IP/HNAP1/" -H 'SOAPAction: http://purenetworks.com/HNAP1/GetDeviceSettings;$(id)|../../' -H "Content-Type: text/xml" --data '<?xml version="1.0"?><soap:Envelope><soap:Body></soap:Body></soap:Envelope>' --max-time 10 || true

Cleanup

bash
echo 'Request-only test; no cleanup required'

Expected Telemetry

Logs capture a POST to /HNAP1/ with a SOAPAction header containing ';', '|', and '../' sequences.

Expected Detection

SIEM queries match on SOAPAction metacharacter patterns.

Related Detections