cscli scenarios install sigmahq/proc_creation_win_powershell_hide_services_via_set_service
1type: trigger2name: sigmahq/proc_creation_win_powershell_hide_services_via_set_service3description: |4 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)5filter: |6 (evt.Meta.service == 'sysmon' && evt.Parsed.EventID == '1') && ((evt.Parsed.Image endsWith '\\pwsh.exe' || evt.Parsed.OriginalFileName == 'pwsh.dll') && evt.Parsed.CommandLine contains 'Set-Service ' && evt.Parsed.CommandLine contains 'DCLCWPDTSD' && (evt.Parsed.CommandLine contains '-SecurityDescriptorSddl ' || evt.Parsed.CommandLine contains '-sd '))7blackhole: 2m8#status: test9labels:10 service: windows11 confidence: 112 spoofable: 013 classification:14 - attack.t1574.0111516 label: "Abuse of Service Permissions to Hide Services Via Set-Service"17 behavior : "windows:audit"18 remediation: false1920scope:21 type: ParentProcessId22 expression: evt.Parsed.ParentProcessId2324