Sigma rule: Abuse of Service Permissions to Hide Services Via Set-Service - PS
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-049d2cb2d66a, updated 2022-10-17T00:00:00.000Z.
Rule
- Title
- Abuse of Service Permissions to Hide Services Via Set-Service - PS
- Status
- test
- Level
- high
- Author
- Nasreddine Bencherchali (Nextron Systems)
- Date
- 2022-10-17
- File
- rules/windows/powershell/powershell_script/posh_ps_using_set_service_to_hide_services.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:
ScriptBlockText|contains|all:
- 'Set-Service '
- 'DCLCWPDTSD'
ScriptBlockText|contains:
- '-SecurityDescriptorSddl '
- '-sd '
condition: selectionFalse 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_using_set_service_to_hide_services.yml
Sources and licences
SigmaHQ
"Abuse of Service Permissions to Hide Services Via Set-Service - PS" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_using_set_service_to_hide_services.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: Abuse of Service Permissions to Hide Services Via Set-Service - PS",
entity page, dataset version ref-049d2cb2d66a, updated 2022-10-17T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/953945c5-22fe-4a92-9f8a-a9edc1e522da (accessed 2026-11-03).
Underlying source: SigmaHQ rule 953945c5-22fe-4a92-9f8a-a9edc1e522da, 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.