Windows Registry: Custom URL Protocol Handler Persistence via HKCR\ Protocol Registration
Alerts on HKCR registry set activity registering a new custom URL protocol handler, excluding Microsoft-style ms- protocols.
- Product
- windows
- Category
- registry_set
- Author
- Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
- Published
- 2022-05-30
- Updated
- 2026-07-30
ATT&CK techniques
Persistence → Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags registry value changes under HKCR where a new custom URL protocol handler is registered (Details starting with "URL:"). Attackers can use custom protocol handlers to persist and trigger execution when users or other software invoke the protocol. It relies on Windows telemetry for registry set events that capture the TargetObject path and the registered Details string, then filters out likely Microsoft protocol registrations ("URL:ms-") and common trusted application locations.
Reporting behind it
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: "Windows Registry: Custom URL Protocol Handler Persistence via HKCR\\ Protocol Registration"
id: ec001a1d-02eb-44a7-aa41-4473b6157f4d
status: test
description: This rule flags registry value changes under HKCR where a new custom URL protocol handler is registered (Details starting with "URL:"). Attackers can use custom protocol handlers to persist and trigger execution when users or other software invoke the protocol. It relies on Windows telemetry for registry set events that capture the TargetObject path and the registered Details string, then filters out likely Microsoft protocol registrations ("URL:ms-") and common trusted application locations.
references:
- https://ladydebug.com/blog/2019/06/21/custom-protocol-handler-cph/
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/registry/registry_set/registry_set_persistence_custom_protocol_handler.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2022-05-30
modified: 2023-05-12
tags:
- attack.persistence
- attack.defense-impairment
- attack.t1112
logsource:
category: registry_set
product: windows
detection:
selection:
TargetObject|startswith: HKCR\
Details|startswith: "URL:"
filter_main_ms_trusted:
Details|startswith: URL:ms-
filter_main_generic_locations:
Image|startswith:
- C:\Program Files (x86)
- C:\Program Files\
- C:\Windows\System32\
- C:\Windows\SysWOW64\
condition: selection and not 1 of filter_main_*
falsepositives:
- Many legitimate applications can register a new custom protocol handler. Additional filters needs to applied according to your environment.
level: medium
license: DRL-1.1
related:
- id: fdbf0b9d-0182-4c43-893b-a1eaab92d085
type: derived