Sigma rule: Potential PowerShell Execution Policy Tampering

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-770396dcf232, updated 2023-12-14T00:00:00.000Z.

Rule

Title
Potential PowerShell Execution Policy Tampering
Status
test
Level
medium
Author
Nasreddine Bencherchali (Nextron Systems)
Date
2023-01-11
Modified
2023-12-14
File
rules/windows/registry/registry_set/registry_set_powershell_execution_policy.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects changes to the PowerShell execution policy in order to bypass signing requirements for script execution

Log source

product
windows
category
registry_set

Detection

selection:
    TargetObject|endswith:
        # Note for future readers: For PowerShell 7+ the ExecutionPolicy is handled via a setting file due to the fact that PWSH7 is available for mac and linux
        # Attackers can create a per-user setting file (powershell.config.json) and set the execution policy there
        # Learn more here: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_powershell_config?view=powershell-7.3
        - '\ShellIds\Microsoft.PowerShell\ExecutionPolicy'
        - '\Policies\Microsoft\Windows\PowerShell\ExecutionPolicy'
    Details|contains:
        - 'Bypass'
        - 'Unrestricted'
filter_main_svchost:
    # Note: We filter out "svchost" to avoid FP with changes using "gpedit" for example.
    Image|contains:
        - ':\Windows\System32\'
        - ':\Windows\SysWOW64\'
condition: selection and not 1 of filter_main_*

False positives (as the rule lists them)

  • Unknown

Tags

  • attack.defense-impairment

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/registry/registry_set/registry_set_powershell_execution_policy.yml

Sources and licences

  • SigmaHQ

    "Potential PowerShell Execution Policy Tampering" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/registry/registry_set/registry_set_powershell_execution_policy.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: Potential PowerShell Execution Policy Tampering",
entity page, dataset version ref-770396dcf232, updated 2023-12-14T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/fad91067-08c5-4d1a-8d8c-d96a21b37814 (accessed 2026-11-03).
Underlying source: SigmaHQ rule fad91067-08c5-4d1a-8d8c-d96a21b37814, 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.