1200kmSECURITY RESEARCH

1200KM / sigma-rule

Change PowerShell Policies to an Insecure Level - PowerShell — Sigma Rule

Sigma rule 61d0475c-173f-4844-86f7-f3eebae1c66b. Change PowerShell Policies to an Insecure Level - PowerShell — Sigma Rule. Detects changing the PowerShell script execution policy to a potentially insecure level using the "Set-ExecutionPolicy" cmdlet.

Rule metadata and linked tags

Author: frack113. Source status: test; severity: medium. Source dates: 2021-10-20 / 2023-12-14.

{
  "product": "windows",
  "category": "ps_script",
  "definition": "Requirements: Script Block Logging must be enabled"
}

Pinned original Sigma rule · Detection Rule License 1.1

Source SHA-256: 6b22b57236c5e4771707161db082f704470d5918e317b59dc54fb35031150ade

Detection logic

Original source YAML. Source-tag agreement is not proof of complete semantic coverage. This rule has not been compiled for a SIEM backend or validated against live telemetry here.

title: Change PowerShell Policies to an Insecure Level - PowerShell
id: 61d0475c-173f-4844-86f7-f3eebae1c66b
related:
    - id: cf2e938e-9a3e-4fe8-a347-411642b28a9f # ProcCreation Registry
      type: similar
    - id: 87e3c4e8-a6a8-4ad9-bb4f-46e7ff99a180 # ProcCreation Cmdlet
      type: similar
    - id: fad91067-08c5-4d1a-8d8c-d96a21b37814 # Registry
      type: similar
status: test
description: Detects changing the PowerShell script execution policy to a potentially insecure level using the "Set-ExecutionPolicy" cmdlet.
references:
    - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.4
    - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4
    - https://adsecurity.org/?p=2604
author: frack113
date: 2021-10-20
modified: 2023-12-14
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: ps_script
    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_*
falsepositives:
    - Administrator script
level: medium

Original YAML and metadata in JSON

False positives

  • Administrator script

Source references

Connected ecosystem references

Exact source-tagged techniques

Telemetry review

Read the original logsource above, then inspect the linked detection workspaces for technique-level sensor context. No per-rule telemetry equivalence is inferred.

Pinned research references. No browser attack runner, live simulation result or validated detector is asserted. Source mappings and validation limits are preserved. ATT&CK / Atomic provenance · Detection provenance.