Sigma rule: Suspicious Service DACL Modification Via Set-Service Cmdlet - PS
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-f8570bd14452, updated 2022-10-24T00:00:00.000Z.
Rule
- Title
- Suspicious Service DACL Modification Via Set-Service Cmdlet - PS
- Status
- test
- Level
- high
- Author
- Nasreddine Bencherchali (Nextron Systems)
- Date
- 2022-10-24
- File
- rules/windows/powershell/powershell_script/posh_ps_susp_service_dacl_modification_set_service.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects usage of the "Set-Service" powershell cmdlet to configure a new SecurityDescriptor that allows a service to be hidden from other utilities such as "sc.exe", "Get-Service"...etc. (Works only in powershell 7)
Log source
- product
- windows
- category
- ps_script
- definition
- Requirements: Script Block Logging must be enabled
Detection
selection_sddl_flag:
ScriptBlockText|contains:
- '-SecurityDescriptorSddl '
- '-sd '
selection_set_service:
ScriptBlockText|contains|all:
- 'Set-Service '
- 'D;;'
ScriptBlockText|contains:
- ';;;IU'
- ';;;SU'
- ';;;BA'
- ';;;SY'
- ';;;WD'
condition: all of selection_*False positives (as the rule lists them)
- Rare intended use of hidden services
- Rare FP could occur due to the non linearity of the ScriptBlockText log
Tags
- attack.persistence
- attack.privilege-escalation
- attack.execution
- attack.stealth
- attack.t1574.011
MITRE ATT&CK ids this rule names
Related rules
References
- https://twitter.com/Alh4zr3d/status/1580925761996828672
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-service?view=powershell-7.2
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/powershell/powershell_script/posh_ps_susp_service_dacl_modification_set_service.yml
Sources and licences
SigmaHQ
"Suspicious Service DACL Modification Via Set-Service Cmdlet - PS" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_susp_service_dacl_modification_set_service.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: Suspicious Service DACL Modification Via Set-Service Cmdlet - PS",
entity page, dataset version ref-f8570bd14452, updated 2022-10-24T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/22d80745-6f2c-46da-826b-77adaededd74 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 22d80745-6f2c-46da-826b-77adaededd74, 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.