Windows SQL Server xp_cmdshell Config Change
This detection identifies when the xp_cmdshell configuration is modified in SQL Server. The xp_cmdshell extended stored procedure allows execution of operating system commands and programs from SQL Server, making it…
Description
This detection identifies when the xp_cmdshell configuration is modified in SQL Server. The xp_cmdshell extended stored procedure allows execution of operating system commands and programs from SQL Server, making it a high-risk feature commonly abused by attackers for privilege escalation and lateral movement.
Detection logic
Detection requirements
- Platform
- LinuxWindows
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source category
- windows_event_log_application_15457
Known benign triggers
- Database administrators may legitimately enable xp_cmdshell for maintenance tasks, such as database maintenance scripts requiring OS-level operations, legacy applications, or automated system management tasks; however, this feature should generally remain disabled in production environments due to security risks. To reduce false positives, document when xp_cmdshell is required, monitor for unauthorized changes, create change control procedures for xp_cmdshell modifications, and consider alerting on the enabled state rather than configuration changes if preferred.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| attack.mitre.org/techniques/T1505/003/ | 2 |
| learn.microsoft.com/en-us/sql/database-engine/configure-windows/xp-cmdshell-server-configuration-option | Only this detection cites it |
| learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/xp-cmdshell-transact-sql | Only this detection cites it |
From the source
- At source
- Open at source
- Upstream identifier
- 5eb76fe2-a869-4865-8c4c-8cff424b18b1
- Tagged by the source as
- GhostRedirector IIS Module and Rungan BackdoorSeashell BlizzardSQL Server AbuseWindowsendpointSplunk CloudSplunk EnterpriseSplunk Enterprise Securityendpoint
Licence
- Published under
- Apache License 2.0Read the licence
- Attribution
- Required
- Obtained under
- Apache-2.0Read the origin licence
Authorship
- Published
- Aug 26, 2026
- Version
- 1