COM HIJACKING
CLSID
INPROCSERVER32
HKCU
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting COM Hijacking: HKCU CLSID InprocServer32 Overrides

COM looks up HKCU before HKLM. That ordering turns every per-user registry write into a way to change what a trusted process loads.

Scroll

When an application instantiates a COM object, Windows resolves its CLSID by checking the current user’s registry hive before the machine hive. An attacker with ordinary user rights can therefore create an HKCU entry that shadows a legitimate HKLM class and points InprocServer32 at a malicious DLL or a scriptlet. The next time a trusted process such as explorer.exe requests that object, the payload loads, giving stealthy, userland persistence.

Signals at a Glance

SignalWhereATT&CK
Value set under HKCU\Software\Classes\CLSID\{...}\InprocServer32Sysmon 13, EDR registry eventsT1546.015
HKCU CLSID that duplicates an existing HKLM CLSID (a shadow entry)Registry sweep, osqueryT1546.015
InprocServer32 or LocalServer32 default value in a user-writable pathSysmon 13 (Details)T1546.015
TreatAs key or ScriptletURL / scrobj.dll handler writtenSysmon 13T1546.015
explorer.exe or an Office process loading an unsigned DLL from AppDataSysmon 7T1574.001
reg.exe, PowerShell or regsvr32 as the writer of a CLSID keySysmon 13 (Image)T1112

Registry Writes Under HKCU Classes

Legitimate installers rarely write InprocServer32 values into a user hive, because per-machine registration goes under HKLM. That makes the HKCU path a high-signal location. Sysmon reports these writes under the HKU hive with the user SID, so match on the path suffix rather than the root:

title: COM Class Registered Or Overridden In User Hive
logsource:
  product: windows
  category: registry_set
detection:
  selection:
    TargetObject|contains: '\Software\Classes\CLSID\'
    TargetObject|endswith:
      - '\InprocServer32\(Default)'
      - '\LocalServer32\(Default)'
      - '\TreatAs\(Default)'
  susp_value:
    Details|contains:
      - '\AppData\'
      - '\Temp\'
      - '\ProgramData\'
      - '\Users\Public\'
      - 'scrobj.dll'
      - 'script:'
  condition: selection and susp_value
level: high
# tune/validate: some developer tools register per-user COM servers in AppData.

Treat the target process as a second signal. Explorer, the Office applications and scheduled-task hosts instantiate many COM objects at startup, so those are the processes whose unexpected module loads matter.

Sweeping for Shadow Entries

A shadow entry is an HKCU CLSID that also exists under HKLM. Hijackers rely on exactly this, whereas a CLSID that exists only in HKCU is a per-user registration. The sweep below lists every HKCU server value, flags those that shadow an HKLM class, and reports the file signature:

# PowerShell: HKCU COM servers, flagging shadows of HKLM classes
$base = 'HKCU:\Software\Classes\CLSID'
Get-ChildItem $base -ErrorAction SilentlyContinue | ForEach-Object {
  $clsid = $_.PSChildName
  foreach ($srv in 'InprocServer32', 'LocalServer32') {
    $key = Join-Path $_.PSPath $srv
    if (Test-Path $key) {
      $path = (Get-Item $key).GetValue('')
      $file = $path -replace '^"?([^"]+)"?.*$', '$1'
      $sig  = if ($file -and (Test-Path $file)) { (Get-AuthenticodeSignature $file).Status } else { 'FileMissing' }
      [pscustomobject]@{
        CLSID  = $clsid; Server = $srv; Path = $path
        Shadows = Test-Path "HKLM:\SOFTWARE\Classes\CLSID\$clsid"
        Signature = $sig
      }
    }
  }
} | Where-Object { $_.Shadows -or $_.Signature -ne 'Valid' }
# tune/validate: run on a clean baseline host; per-user app registrations will appear.
Vetted sources

Use the SigmaHQ COM-hijacking and registry-set rules, Elastic’s COM hijack detections, Splunk ESCU content, MITRE CAR analytics, Atomic Red Team T1546.015 tests and the published research on COM object hijacking. Autoruns’ Explorer and COM tabs help review loaded handlers. Baseline your own environment, because developer tooling does register per-user COM servers.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026