Windows Registry COM Hijacking via TreatAs Subkey in CLSID

Alerts on registry modifications to HKU\Classes\CLSID\*\TreatAs that may indicate COM object hijacking/persistence.

FreeUnreviewedSigmamediumv1
title: Windows Registry COM Hijacking via TreatAs Subkey in CLSID
id: 06116f51-b133-4420-8869-2eec46527a2d
status: test
description: This rule flags Windows Registry entries under HKU\Classes\CLSID\*\TreatAs, which can indicate COM object hijacking. Attackers can use TreatAs subkeys to redirect COM activation to attacker-controlled classes, supporting persistence and potential privilege escalation. It relies on registry set telemetry capturing the TargetObject path that contains HKU\, Classes\CLSID\, and \TreatAs, while excluding events associated with svchost.exe.
references:
  - https://bohops.com/2018/08/18/abusing-the-com-registry-structure-part-2-loading-techniques-for-evasion-and-persistence/
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/registry/registry_set/registry_set_persistence_com_key_linking.yml
author: Kutepov Anton, oscd.community, Huntrule Team
date: 2019-10-23
modified: 2025-10-26
tags:
  - attack.privilege-escalation
  - attack.persistence
  - attack.t1546.015
logsource:
  category: registry_set
  product: windows
detection:
  selection:
    TargetObject|contains|all:
      - HKU\
      - Classes\CLSID\
      - \TreatAs
  filter_main_svchost:
    Image: C:\WINDOWS\system32\svchost.exe
  condition: selection and not 1 of filter_main_*
falsepositives:
  - Maybe some system utilities in rare cases use linking keys for backward compatibility
level: medium
regression_tests_path: regression_data/rules/windows/registry/registry_set/registry_set_persistence_com_key_linking/info.yml
simulation:
  - type: atomic-red-team
    name: COM hijacking via TreatAs
    technique: T1546.015
    atomic_guid: 33eacead-f117-4863-8eb0-5c6304fbfaa9
license: DRL-1.1
related:
  - id: 9b0f8a61-91b2-464f-aceb-0527e0a45020
    type: derived

What it detects

This rule flags Windows Registry entries under HKU\Classes\CLSID\*\TreatAs, which can indicate COM object hijacking. Attackers can use TreatAs subkeys to redirect COM activation to attacker-controlled classes, supporting persistence and potential privilege escalation. It relies on registry set telemetry capturing the TargetObject path that contains HKU\, Classes\CLSID\, and \TreatAs, while excluding events associated with svchost.exe.

Known false positives

  • Maybe some system utilities in rare cases use linking keys for backward compatibility

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.