MSSQL Server Process Spawning Command Shell via xp_cmdshell

PremiumReviewedSigma · High · v1
Product
windows
Category
process_creation
Author
HuntRule
Published
2026-06-21
Updated
2026-08-28

ATT&CK techniques

Initial Access → Execution
  1. Recon

  2. Resource Dev

  3. Persistence

  4. Priv Esc

  5. Defense Evasion

  6. Cred Access

  7. Discovery

  8. Lateral Movement

  9. Collection

  10. C2

  11. Exfiltration

  12. Impact

What it detects

This rule detects the SQL Server process sqlservr.exe spawning cmd.exe or PowerShell, the direct signature of xp_cmdshell abuse on an exposed database server. Huntress observed operators chaining bcp data staging and local account creation from this shell during MSSQL intrusions. A database engine launching command interpreters is not normal behavior and indicates code execution through the SQL layer.

Related detections9 linkedT1059.001 — drag to rearrange
Malicious WSUS Service Spawning Command Shell via CVE-2025-59287 (via process_creation)
Malicious SharePoint w3wp Spawning Command Shell and PowerShell
Malicious IIS w3wp Worker Spawning Command Interpreter via SharePoint Web Shell
Exchange Worker Process Spawning Command Shell via OWASSRF
Suspicious MSSQL xp_cmdshell OS Command Execution via sqlservr.exe (via process_creation)
Windows Process Creation: CrushFTP spawning PowerShell, CMD, and scripting tool execution
Windows: Suspicious child processes spawned by CrushFTP service
Windows Process Creation: Java exploitation chain targeting Zoho ManageEngine Desktop Central (CVE-2020-10189)
Malicious Command Shell or PowerShell Spawned by Tomcat via Process Creation (via process_creation)
MSSQL Server Process Spawning Command Shell via xp_cmdshell
Pivot detection · T1059.001 · 9 related

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.