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 linkedT1190 — drag to rearrange
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 IIS Worker Spawning nslookup via WS_FTP Deserialization
Malicious ActiveMQ Exploitation Java Spawning PowerShell Downloader (via process_creation)
Suspicious Cleo Autorun Health Check File Drop (via file_event)
Obfuscated IIS Worker Spawning Encoded PowerShell after SharePoint ToolShell (via process_creation)
Malicious WSUS Service Spawning Command Shell via Remote Code Execution
MSSQL Server Process Spawning Command Shell via xp_cmdshell
Pivot detection · T1190 · 9 related

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