PowerShell Set-Acl On Windows Folder

Detects PowerShell scripts to set the ACL to a file in the Windows folder

Sigma rule (View on GitHub)

 1title: PowerShell Set-Acl On Windows Folder
 2id: 0944e002-e3f6-4eb5-bf69-3a3067b53d73 # ProcCreation Susp
 3related:
 4    - id: cae80281-ef23-44c5-873b-fd48d2666f49 # PsScript Low
 5      type: derived
 6    - id: bdeb2cff-af74-4094-8426-724dc937f20a # ProcCreation Low
 7      type: derived
 8    - id: 3bf1d859-3a7e-44cb-8809-a99e066d3478 # PsScript High
 9      type: derived
10status: test
11description: Detects PowerShell scripts to set the ACL to a file in the Windows folder
12references:
13    - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-acl?view=powershell-5.1
14    - https://github.com/redcanaryco/atomic-red-team/blob/74438b0237d141ee9c99747976447dc884cb1a39/atomics/T1505.005/T1505.005.md
15author: Nasreddine Bencherchali (Nextron Systems)
16date: 2022-10-18
17tags:
18    - attack.defense-evasion
19logsource:
20    category: process_creation
21    product: windows
22detection:
23    selection_img:
24        - OriginalFileName:
25              - 'PowerShell.EXE'
26              - 'pwsh.dll'
27        - Image|endswith:
28              - '\powershell.exe'
29              - '\pwsh.exe'
30    selection_cmdlet:
31        CommandLine|contains|all:
32            - 'Set-Acl '
33            - '-AclObject '
34    selection_paths:
35        # Note: Add more suspicious paths
36        CommandLine|contains:
37            - '-Path "C:\Windows'
38            - "-Path 'C:\\Windows"
39            - '-Path %windir%'
40            - '-Path $env:windir'
41    selection_permissions:
42        # Note: Add more suspicious permissions
43        CommandLine|contains:
44            - 'FullControl'
45            - 'Allow'
46    condition: all of selection_*
47falsepositives:
48    - Unknown
49level: high

References

Related rules

to-top