Detect D-Link DIR-600L GENA gena.cgi Stack Buffer Overflow (CVE-2026-133993) in Splunk
Detects exploitation attempts against a stack-based buffer overflow in the FUN_0040efb0 function of gena.cgi (GENA Subscription Handler) on D-Link DIR-600L 2.17b02 routers (CVE-2026-133993, CVSS 9.3, CWE-119/CWE-121). A remote, unauthenticated attacker can manipulate the service argument to corrupt the stack. The exploit has been released to the public. Detection logic focuses on inbound HTTP SUBSCRIBE requests to /gena.cgi (or UPnP service control URLs) carrying abnormally long Callback/NT/SID header values, oversized request lines, and anomalous UPnP control traffic from untrusted sources. Detection is proactive and perimeter/network-telemetry oriented since embedded SOHO firmware rarely emits host logs.
MITRE ATT&CK
- Tactic
- Initial Access Lateral Movement
SPL Detection Query
``` df00tech DF00-c7d42a629d · https://df00tech.com/detections/CVE-2026-133993 · licence: https://df00tech.com/detections/licence ```
index=network (sourcetype="zeek:http" OR sourcetype="pan:traffic" OR sourcetype="stream:http")
| where (method="SUBSCRIBE" OR like(uri_path,"%gena.cgi%") OR like(uri_path,"%/upnp%"))
| eval callback_len=if(isnotnull('request_header.callback'),len('request_header.callback'),0)
| eval nt_len=if(isnotnull('request_header.nt'),len('request_header.nt'),0)
| eval sid_len=if(isnotnull('request_header.sid'),len('request_header.sid'),0)
| eval uri_len=len(uri_path)
| where callback_len>512 OR nt_len>512 OR sid_len>512 OR uri_len>1024
| table _time src_ip dest_ip dest_port method uri_path callback_len nt_len sid_len uri_len sourcetype
| sort - _time Splunk detection for oversized GENA SUBSCRIBE headers aimed at gena.cgi on D-Link DIR-600L, indicative of the FUN_0040efb0 stack overflow.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Legitimate UPnP control points issuing valid long Callback URLs
- Authorized security scanning of UPnP services
- Header reassembly artifacts inflating measured header length
Other platforms for CVE-2026-133993
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.
- Test 1 Oversized UPnP GENA SUBSCRIBE Callback header (lab simulation)
Expected signal: Network/HTTP telemetry (Zeek, packetbeat, proxy) records a SUBSCRIBE request to /gena.cgi with a Callback header length > 512 bytes.
- Test 2 Oversized SUBSCRIBE request URI to UPnP control endpoint
Expected signal: HTTP request log shows a SUBSCRIBE method with URL/URI length > 1024 bytes to a UPnP control port.
- Test 3 Oversized NT/SID header fuzz against gena.cgi
Expected signal: HTTP telemetry records SUBSCRIBE request with NT and SID header lengths exceeding 512 bytes.
References (6)
- https://github.com/ruanyi101/router-firmware-security-advisories/blob/main/router-firmware-GitHub-advisories/related-findings/D-Link-DIR-600L-gena-cgi-stack-overflow-review.md
- https://vuldb.com/cve/CVE-2026-133993
- https://vuldb.com/submit/1052046
- https://vuldb.com/vuln/441598
- https://vuldb.com/vuln/441598/cti
- https://www.dlink.com/
Response Playbook
Triage
- Confirm the destination IP/device is a D-Link DIR-600L (or similar UPnP-enabled SOHO router) running firmware 2.17b02 and whether its UPnP/GENA service is reachable from the source network.
- Extract and measure the Callback, NT, and SID header values and the request URI from the flagged SUBSCRIBE request; lengths far beyond typical (~100-200 bytes) or containing non-printable/shellcode-like bytes strongly indicate exploitation.
- Determine whether the source IP is internal, a known UPnP control point, an authorized scanner, or an untrusted/external host, and review surrounding traffic for repeated or scripted SUBSCRIBE attempts.
Containment
- Block inbound UPnP/GENA traffic (typically HTTP SUBSCRIBE to the device's control port) from untrusted sources at the perimeter firewall and disable UPnP exposure on the WAN interface.
- Isolate or power-cycle any DIR-600L that shows signs of successful exploitation (unexpected reboots, config changes, new outbound connections) and remove it from the trusted network pending firmware remediation.
Evidence Collection
- Capture full packet capture (PCAP) of the offending SUBSCRIBE request(s) including all headers and payload for forensic analysis and to confirm overflow payload content.
- Preserve firewall/IDS/proxy logs, device syslog (if forwarded), and any router configuration backups before remediation or reboot.
Escalation Criteria
- !Escalate to incident response if the targeted device reboots, exhibits config tampering, or initiates anomalous outbound connections following the SUBSCRIBE request, indicating likely code execution.
- !Escalate if the oversized SUBSCRIBE traffic originates from the WAN/internet or is observed against multiple internal routers, indicating active mass exploitation or lateral movement.
Investigation Guide
Forensic Artifacts
- >
Packet captures of inbound SUBSCRIBE requests with oversized Callback/NT/SID headers to the device's UPnP control port. - >
Firewall/IDS alert records and connection logs showing the source IP, timing, and repetition of GENA requests. - >
Router crash/reboot indicators or config diffs captured from device management or syslog forwarding.
Tuning Guidance
Baseline the normal length of Callback/NT/SID headers emitted by your legitimate UPnP control points and raise or lower the 512-byte threshold accordingly; many media servers send Callback URLs of 150-300 bytes. Scope the rule to network segments where DIR-600L / SOHO routers actually exist, exclude authorized vulnerability-scanner source IPs, and verify your proxy/IDS does not concatenate multiple headers into one field (which inflates measured length and causes false positives). Because a public exploit exists, prioritize alerting on this rule and plan for blocking once false-positive rates are confirmed acceptable.
Hunting Queries
Hunts for hosts sending abnormally large UPnP GENA SUBSCRIBE requests, surfacing potential overflow attempts against DIR-600L devices even when specific header extraction fails.
// df00tech DF00-c7d42a629d · https://df00tech.com/detections/CVE-2026-133993 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestMethod =~ "SUBSCRIBE" or RequestURL has "gena.cgi" | extend hlen = strlen(AdditionalExtensions) | where hlen > 800 | summarize count(), max(hlen) by SourceIP, DestinationIP | order by max_hlen desc ``` df00tech DF00-c7d42a629d · https://df00tech.com/detections/CVE-2026-133993 · licence: https://df00tech.com/detections/licence ```
index=network (method=SUBSCRIBE OR uri_path="*gena.cgi*") | eval hlen=len(_raw) | where hlen>800 | stats count, max(hlen) as max_hlen by src_ip, dest_ip | sort - max_hlen Atomic Red Team Tests
Sends an HTTP SUBSCRIBE request to a lab gena.cgi endpoint with an oversized Callback header to trigger the network detection logic. Use only against an isolated test router or mock server.
Command
python3 -c "import socket; h=socket.gethostbyname('192.168.0.1'); s=socket.socket(); s.connect((h,49152)); p='SUBSCRIBE /gena.cgi HTTP/1.1\r\nHost: 192.168.0.1\r\nCallback: <http://%s>\r\nNT: upnp:event\r\nTimeout: Second-1800\r\n\r\n' % ('A'*1200); s.sendall(p.encode()); print(s.recv(256)); s.close()" Cleanup
echo 'No persistent artifacts; close any open sockets. Reboot lab router if it hung.' Expected Telemetry
Network/HTTP telemetry (Zeek, packetbeat, proxy) records a SUBSCRIBE request to /gena.cgi with a Callback header length > 512 bytes.
Expected Detection
KQL/SPL/EQL rules fire on the oversized Callback header length exceeding the 512-byte threshold.
Sends a SUBSCRIBE request with an abnormally long URI path to simulate overflow probing against the UPnP handler.
Command
python3 -c "import socket; s=socket.socket(); s.connect(('192.168.0.1',49152)); uri='/gena.cgi?'+('B'*1100); s.sendall(('SUBSCRIBE %s HTTP/1.1\r\nHost: 192.168.0.1\r\nNT: upnp:event\r\n\r\n'%uri).encode()); print(s.recv(256)); s.close()" Cleanup
echo 'No cleanup required; connection is transient.' Expected Telemetry
HTTP request log shows a SUBSCRIBE method with URL/URI length > 1024 bytes to a UPnP control port.
Expected Detection
Detections fire on url/uri length exceeding 1024 bytes combined with the SUBSCRIBE method.
Issues a SUBSCRIBE request with oversized NT and SID headers mimicking fuzzing/exploit payloads against FUN_0040efb0.
Command
python3 -c "import socket; s=socket.socket(); s.connect(('192.168.0.1',49152)); p='SUBSCRIBE /gena.cgi HTTP/1.1\r\nHost: 192.168.0.1\r\nSID: uuid:'+('C'*900)+'\r\nNT: '+('D'*600)+'\r\n\r\n'; s.sendall(p.encode()); print(s.recv(256)); s.close()" Cleanup
echo 'No persistent changes; power-cycle lab device if unresponsive.' Expected Telemetry
HTTP telemetry records SUBSCRIBE request with NT and SID header lengths exceeding 512 bytes.
Expected Detection
Detections fire on NT or SID header length exceeding the 512-byte threshold.