Change PowerShell Policies to an Insecure Level - PowerShell
Detects changing the PowerShell script execution policy to a potentially insecure level using the "Set-ExecutionPolicy" cmdlet.
Convert In Phoenix Studio
Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.
Definition
Requirements: Script Block Logging must be enabled
detection:
selection_cmdlet:
ScriptBlockText|contains: 'Set-ExecutionPolicy'
selection_option:
ScriptBlockText|contains:
- 'Unrestricted'
- 'bypass'
filter_optional_chocolatey:
ScriptBlockText|contains:
- "(New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')"
- "(New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')"
condition: all of selection_* and not 1 of filter_optional_*Administrator script
Tactics
Sub-techniques
Potential PowerShell Execution Policy Tampering - ProcCreation
Detects changes to the PowerShell execution policy registry key in order to bypass signing requirements for script execution from the CommandLine
Detects similar activity. Both rules may fire on overlapping events.
Change PowerShell Policies to an Insecure Level
Detects changing the PowerShell script execution policy to a potentially insecure level using the "-ExecutionPolicy" flag.
Detects similar activity. Both rules may fire on overlapping events.
Potential PowerShell Execution Policy Tampering
Detects changes to the PowerShell execution policy in order to bypass signing requirements for script execution
Detects similar activity. Both rules may fire on overlapping events.