Sigma rule: MSSQL XPCmdshell Option Change
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-8cd282426c0a, updated 2024-06-26T00:00:00.000Z.
Rule
- Title
- MSSQL XPCmdshell Option Change
- Status
- test
- Level
- high
- Author
- Nasreddine Bencherchali (Nextron Systems)
- Date
- 2022-07-12
- Modified
- 2024-06-26
- File
- rules/windows/builtin/application/mssqlserver/win_mssql_xp_cmdshell_change.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects when the MSSQL "xp_cmdshell" stored procedure setting is changed.
Log source
- product
- windows
- service
- application
Detection
selection:
Provider_Name|contains: 'MSSQL' # Note: We use contains to account for other third party providers - See https://github.com/SigmaHQ/sigma/issues/4876
EventID: 15457
Data|contains: 'xp_cmdshell'
condition: selectionFalse positives (as the rule lists them)
- Legitimate enable/disable of the setting
- Note that since the event contain the change for both values. This means that this will trigger on both enable and disable
Tags
- attack.execution
References
- https://www.netspi.com/blog/technical/network-penetration-testing/sql-server-persistence-part-1-startup-stored-procedures/
- https://thedfirreport.com/2022/07/11/select-xmrig-from-sqlserver/
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/builtin/application/mssqlserver/win_mssql_xp_cmdshell_change.yml
Sources and licences
SigmaHQ
"MSSQL XPCmdshell Option Change" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/builtin/application/mssqlserver/win_mssql_xp_cmdshell_change.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: MSSQL XPCmdshell Option Change",
entity page, dataset version ref-8cd282426c0a, updated 2024-06-26T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/d08dd86f-681e-4a00-a92c-1db218754417 (accessed 2026-11-03).
Underlying source: SigmaHQ rule d08dd86f-681e-4a00-a92c-1db218754417, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.