{"id":"3bf1d859-3a7e-44cb-8809-a99e066d3478","title":"PowerShell Set-Acl On Windows Folder - PsScript","description":"Detects PowerShell scripts to set the ACL to a file in the Windows folder","author":"frack113, Nasreddine Bencherchali (Nextron Systems)","status":"test","level":"high","date":"2023-07-18","modified":"","tags":["attack.defense-impairment","attack.t1222"],"technique_ids":["T1222"],"logsource":{"product":"windows","category":"ps_script","definition":"bade5735-5ab0-4aa7-a642-a11be0e40872"},"falsepositives":["Unknown"],"references":["https://github.com/redcanaryco/atomic-red-team/blob/74438b0237d141ee9c99747976447dc884cb1a39/atomics/T1505.005/T1505.005.md","https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-acl?view=powershell-5.1"],"source_path":"rules/windows/powershell/powershell_script/posh_ps_set_acl_susp_location.yml","source_sha256":"e8a88704647a05eb242b93287958690af62976ed8b0e81c009bb780ba43cc4a8","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/powershell/powershell_script/posh_ps_set_acl_susp_location.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: PowerShell Set-Acl On Windows Folder - PsScript\nid: 3bf1d859-3a7e-44cb-8809-a99e066d3478\nrelated:\n    - id: cae80281-ef23-44c5-873b-fd48d2666f49 # PsScript Low\n      type: derived\n    - id: 0944e002-e3f6-4eb5-bf69-3a3067b53d73 # ProcCreation Susp\n      type: derived\n    - id: bdeb2cff-af74-4094-8426-724dc937f20a # ProcCreation Low\n      type: derived\nstatus: test\ndescription: Detects PowerShell scripts to set the ACL to a file in the Windows folder\nreferences:\n    - https://github.com/redcanaryco/atomic-red-team/blob/74438b0237d141ee9c99747976447dc884cb1a39/atomics/T1505.005/T1505.005.md\n    - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-acl?view=powershell-5.1\nauthor: frack113, Nasreddine Bencherchali (Nextron Systems)\ndate: 2023-07-18\ntags:\n    - attack.defense-impairment\n    - attack.t1222\nlogsource:\n    product: windows\n    category: ps_script\n    definition: bade5735-5ab0-4aa7-a642-a11be0e40872\ndetection:\n    selection_cmdlet:\n        ScriptBlockText|contains|all:\n            - 'Set-Acl '\n            - '-AclObject '\n    selection_paths:\n        # Note: Add more suspicious paths\n        ScriptBlockText|contains:\n            - '-Path \"C:\\Windows'\n            - '-Path \"C:/Windows'\n            - \"-Path 'C:\\\\Windows\"\n            - \"-Path 'C:/Windows\"\n            - '-Path C:\\\\Windows'\n            - '-Path C:/Windows'\n            - '-Path $env:windir'\n            - '-Path \"$env:windir'\n            - \"-Path '$env:windir\"\n    selection_permissions:\n        # Note: Add more suspicious permissions\n        ScriptBlockText|contains:\n            - 'FullControl'\n            - 'Allow'\n    condition: all of selection_*\nfalsepositives:\n    - Unknown\nlevel: high\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1222","id":"T1222","name":"File and Directory Permissions Modification","page":"techniques/enterprise/T1222/"}],"data_path":"data/detection-rules/3bf1d859-3a7e-44cb-8809-a99e066d3478.json","kind":"sigma"}
