Sigma rule: Change PowerShell Policies to an Insecure Level

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-47a164adc70d, updated 2025-10-07T00:00:00.000Z.

Rule

Title
Change PowerShell Policies to an Insecure Level
Status
test
Level
medium
Author
frack113
Date
2021-11-01
Modified
2025-10-07
File
rules/windows/process_creation/proc_creation_win_powershell_set_policies_to_unsecure_level.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects changing the PowerShell script execution policy to a potentially insecure level using the "-ExecutionPolicy" flag.

Log source

product
windows
category
process_creation

Detection

selection_img:
    - OriginalFileName:
          - 'powershell_ise.exe'
          - 'PowerShell.EXE'
          - 'pwsh.dll'
    - Image|endswith:
          - '\powershell_ise.exe'
          - '\powershell.exe'
          - '\pwsh.exe'
selection_option:
    CommandLine|contains:
        - '-executionpolicy '
        - ' -ep '
        - ' -exec '
selection_level:
    CommandLine|contains:
        - 'Bypass'
        - 'Unrestricted'
filter_main_powershell_core:
    ParentImage:
        - 'C:\Windows\SysWOW64\msiexec.exe'
        - 'C:\Windows\System32\msiexec.exe'
    CommandLine|contains:
        - '-NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\PowerShell\7\'
        - '-NoProfile -ExecutionPolicy Bypass -File "C:\Program Files (x86)\PowerShell\7\'
filter_optional_avast:
    ParentImage|contains:
        - 'C:\Program Files\Avast Software\Avast\'
        - 'C:\Program Files (x86)\Avast Software\Avast\'
        - '\instup.exe'
    CommandLine|contains:
        - '-ExecutionPolicy ByPass -File "C:\Program Files\Avast Software\Avast'
        - '-ExecutionPolicy ByPass -File "C:\Program Files (x86)\Avast Software\Avast\'
condition: all of selection_* and not 1 of filter_main_* and not 1 of filter_optional_*

False positives (as the rule lists them)

  • Administrator scripts

Tags

  • attack.execution
  • attack.t1059.001

MITRE ATT&CK ids this rule names

Related rules

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_powershell_set_policies_to_unsecure_level.yml

Sources and licences

  • SigmaHQ

    "Change PowerShell Policies to an Insecure Level" by frack113 (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_powershell_set_policies_to_unsecure_level.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Change PowerShell Policies to an Insecure Level",
entity page, dataset version ref-47a164adc70d, updated 2025-10-07T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/87e3c4e8-a6a8-4ad9-bb4f-46e7ff99a180 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 87e3c4e8-a6a8-4ad9-bb4f-46e7ff99a180, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.