Suspicious Service DACL Modification Via Set-Service Cmdlet

Last updated on:

About the rule

Rule Type

Standard

Rule Description

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 unstopable

Severity

Trouble

Rule Requirement

Criteria

Action1: actionname = "Process started" AND (PROCESSNAME endswith "\pwsh.exe" OR ORIGINALFILENAME = "pwsh.dll") AND COMMANDLINE contains "-SecurityDescriptorSddl ,-sd " AND ((COMMANDLINE contains "Set-Service " AND COMMANDLINE contains "D;;") AND COMMANDLINE contains ";;;IU,;;;SU,;;;BA,;;;SY,;;;WD") select Action1.HOSTNAME,Action1.MESSAGE,Action1.COMMANDLINE,Action1.FILE_NAME,Action1.PROCESSNAME,Action1.USERNAME,Action1.PARENTPROCESSNAME

Detection

Execution Mode

realtime

Log Sources

Windows

Author

Nasreddine Bencherchali (Nextron Systems)