← Back to SOC feed Coverage →

Custom File Open Handler Executes PowerShell

sigma HIGH SigmaHQ
T1202
imRegistry
powershell
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-05-26T11:00:01Z · Confidence: medium

Hunt Hypothesis

Detects the abuse of custom file open handler, executing powershell

Detection Rule

Sigma (Original)

title: Custom File Open Handler Executes PowerShell
id: 7530b96f-ad8e-431d-a04d-ac85cc461fdc
status: test
description: Detects the abuse of custom file open handler, executing powershell
references:
    - https://news.sophos.com/en-us/2022/02/01/solarmarker-campaign-used-novel-registry-changes-to-establish-persistence/?cmp=30728
author: CD_R0M_
date: 2022-06-11
modified: 2023-08-17
tags:
    - attack.stealth
    - attack.t1202
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject|contains: 'shell\open\command\'
        Details|contains|all:
            - 'powershell'
            - '-command'
    condition: selection
falsepositives:
    - Unknown
level: high

KQL (Azure Sentinel)

imRegistry
| where RegistryKey endswith "shell\\open\\command*" and (RegistryValueData contains "powershell" and RegistryValueData contains "-command")

KQL (Microsoft 365 Defender)

DeviceRegistryEvents
| where RegistryKey endswith "shell\\open\\command*" and (RegistryValueData contains "powershell" and RegistryValueData contains "-command")

Required Data Sources

Sentinel TableNotes
imRegistryEnsure this data connector is enabled

False Positive Guidance

MITRE ATT&CK Context

References

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/registry/registry_set/registry_set_custom_file_open_handler_powershell_execution.yml