cscli scenarios install sigmahq/proc_creation_win_powershell_service_dacl_modification_set_service1type: trigger2name: sigmahq/proc_creation_win_powershell_service_dacl_modification_set_service3description: |4 Detects suspicious DACL modifications via the "Set-Service" cmdlet using the "SecurityDescriptorSddl" flag (Only available with PowerShell 7) that can be used to hide services or make them unstopable5filter: |6 (evt.Meta.service == 'sysmon' && evt.Parsed.EventID == '1') && ((evt.Parsed.Image endsWith '\\pwsh.exe' || evt.Parsed.OriginalFileName == 'pwsh.dll') && (evt.Parsed.CommandLine contains '-SecurityDescriptorSddl ' || evt.Parsed.CommandLine contains '-sd ') && evt.Parsed.CommandLine contains 'Set-Service ' && evt.Parsed.CommandLine contains 'D;;' && (evt.Parsed.CommandLine contains ';;;IU' || evt.Parsed.CommandLine contains ';;;SU' || evt.Parsed.CommandLine contains ';;;BA' || evt.Parsed.CommandLine contains ';;;SY' || evt.Parsed.CommandLine contains ';;;WD'))7blackhole: 2m8#status: test9labels:10 service: windows11 confidence: 112 spoofable: 013 classification:14 - attack.t1543.0031516 label: "Suspicious Service DACL Modification Via Set-Service Cmdlet"17 behavior : "windows:audit"18 remediation: false1920scope:21 type: ParentProcessId22 expression: evt.Parsed.ParentProcessId2324