Detectionhightest
Abuse of Service Permissions to Hide Services Via Set-Service - PS
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)
Convert In Phoenix Studio
Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.
Launch
Nasreddine Bencherchali (Nextron Systems)Created Mon Oct 17953945c5-22fe-4a92-9f8a-a9edc1e522dawindows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script
Definition
Requirements: Script Block Logging must be enabled
Detection Logic
Detection Logic1 selector
detection:
selection:
ScriptBlockText|contains|all:
- 'Set-Service '
- 'DCLCWPDTSD'
ScriptBlockText|contains:
- '-SecurityDescriptorSddl '
- '-sd '
condition: selectionFalse Positives
Rare intended use of hidden services
Rare FP could occur due to the non linearity of the ScriptBlockText log
MITRE ATT&CK
Rule Metadata
Rule ID
953945c5-22fe-4a92-9f8a-a9edc1e522da
Status
test
Level
high
Type
Detection
Created
Mon Oct 17
Path
rules/windows/powershell/powershell_script/posh_ps_using_set_service_to_hide_services.yml
Raw Tags
attack.persistenceattack.defense-evasionattack.privilege-escalationattack.t1574.011