Detection logic
Original SigmaHQ detection and related fields from the pinned file. The source file includes its full metadata.
logsource:
category: registry_set
product: windows
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_*
falsepositives:
- Unknown