Sigma rule: Detection of PowerShell Execution via Sqlps.exe
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-e184ef54ed83, updated 2022-12-09T00:00:00.000Z.
Rule
- Title
- Detection of PowerShell Execution via Sqlps.exe
- Status
- test
- Level
- medium
- Author
- Agro (@agro_sev) oscd.community
- Date
- 2020-10-10
- Modified
- 2022-12-09
- File
- rules/windows/process_creation/proc_creation_win_mssql_sqlps_susp_execution.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
This rule detects execution of a PowerShell code through the sqlps.exe utility, which is included in the standard set of utilities supplied with the MSSQL Server.
Script blocks are not logged in this case, so this utility helps to bypass protection mechanisms based on the analysis of these logs.
Log source
- product
- windows
- category
- process_creation
Detection
selection_parent:
ParentImage|endswith: '\sqlps.exe'
selection_image:
- Image|endswith: '\sqlps.exe'
- OriginalFileName: 'sqlps.exe'
filter_image:
ParentImage|endswith: '\sqlagent.exe'
condition: selection_parent or (selection_image and not filter_image)False positives (as the rule lists them)
- Direct PS command execution through SQLPS.exe is uncommon, childprocess sqlps.exe spawned by sqlagent.exe is a legitimate action.
Tags
- attack.execution
- attack.stealth
- attack.t1059.001
- attack.t1127
MITRE ATT&CK ids this rule names
References
- https://learn.microsoft.com/en-us/sql/tools/sqlps-utility?view=sql-server-ver15
- https://lolbas-project.github.io/lolbas/OtherMSBinaries/Sqlps/
- https://twitter.com/bryon_/status/975835709587075072
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/process_creation/proc_creation_win_mssql_sqlps_susp_execution.yml
Sources and licences
SigmaHQ
"Detection of PowerShell Execution via Sqlps.exe" by Agro (@agro_sev) oscd.community (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_mssql_sqlps_susp_execution.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: Detection of PowerShell Execution via Sqlps.exe",
entity page, dataset version ref-e184ef54ed83, updated 2022-12-09T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/0152550d-3a26-4efd-9f0e-54a0b28ae2f3 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 0152550d-3a26-4efd-9f0e-54a0b28ae2f3, 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.