Detectionmediumtest

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.

Launch
François HubautCreated Wed Oct 20Updated Thu Dec 1461d0475c-173f-4844-86f7-f3eebae1c66bwindows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script

Definition

Requirements: Script Block Logging must be enabled

Detection Logic
Detection Logic3 selectors
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_*
False Positives

Administrator script