Dev48
Language
  • About
  • Services
  • Industries
  • Technologies
  • Articles
  • Contacts
Book a call
    Home/Articles/Registeruserapihook a forgotten undocumented handle less session wide dll inject
Dev48
info@dev48.org+375 29 320-40-96WhatsApp@isky_by

© 2026 · All rights reserved.

RegisterUserApiHook - A forgotten undocumented handle-less session-wide DLL injection primitive and its impact on EDR tamper protection

Source: Atos•November 26, 2026 at 10:18 AM

RegisterUserApiHook - A forgotten undocumented handle-less session-wide DLL injection primitive and its impact on EDR tamper protection

  Introduction RegisterUserApiHook is an undocumented export from user32.dll that registers a DLL to be automatically loaded into every process in the same session that calls certain instrumented user32.dll exports (window/metrics/theming APIs). It is the mechanism Windows uses internally…

Introduction

RegisterUserApiHook is an undocumented export from user32.dll that registers a DLL to be automatically loaded into every process in the same session that calls certain instrumented user32.dll exports (window/metrics/theming APIs). It is the mechanism Windows uses internally to inject uxtheme.dll (the theming engine) into GUI processes – ensuring that every window is themed without applications needing to opt in.

This API is a cousin of better-known SetWindowHookEx (opens in a new tab) and SetWinEventHook (opens in a new tab). They all share the following important characteristics:

  • They provide DLL injection primitive into GUI-capable processes on Windows.
  • They do not require the caller to open a handle to target process.

The handle-less characteristic is significant in the context of EDR, especially when evaluating tamper protection. This is because most of the kernel mode tamper protection logic is structured around object handles.

Inspiration - SetWindowHookEx

A couple of years ago I discovered a local privilege escalation vulnerability in an undisclosed EDR product. The attack chain required to operate from a process that was trusted by the product’s tamper protect filter.

There were two challenges:

  • While operating as a regular user with Medium integrity obviously I would not be able to open a writable handle to a process running with System integrity.
  • Standard process injection methods that involve handles obtained with OpenProcess were all blocked by the filter, which is standard behavior and was expected.

But there was one process that allowed me to work around both of those: the tray-embedded GUI component, a very common part of security software solutions.

Those usually run with Medium integrity and are usually also protected from standard process injection by the filter. Knowing that the filter callbacks were structured around handles, I started exploring other process injection primitives and decided to try with SetWindowHookEx. That turned out successful, allowing me to inject into that component, which itself was trusted by the filter, and as a result I was able to take advantage of the process trust relationship to carry out the rest of the attack.

Continuation - RegisterUserApiHook

This year I decided to revisit this subject, and search for more APIs that allow process injection without using a handle.

The outcome were 3 API calls: SetWindowHookEx, SetWinEventHook and RegisterUserApiHook.

Since RegisterUserApiHook is the least known among the three, I decided to explore it deeper.

The only mention of this method in the security context which I was able to find is this presentation from Recon 2012 - Smashing the Atom (opens in a new tab). As a reminder, the term “EDR” was officially coined in 2013 (opens in a new tab).

The offensive potential

I have empirically confirmed this API to be a viable tampering approach alternative to BYOVD, by evaluating this idea against 4 well-known EDR products. For legal and compliance reasons I am not naming any vendors or products.

Contrary to SetWindowHookEx and SetWinEventHook, RegisterUserApiHook requires SYSTEM privileges (which is the same pre-requisite as for BYOVD).

To simply see what can be done with RegisterUserApiHook, feel free to skip the entire technical details section and jump right into potential for offensive use: bypassing EDR tamper protection via trusted-context injection.

← All articles

What this article says

More in Cloud & Infrastructure

All →
AI and the hidden cost of retail variety
HCLTech

AI and the hidden cost of retail variety

The new enterprise imperative: Bringing intelligence closer to decisions
HCLTech

The new enterprise imperative: Bringing intelligence closer to decisions

Edge AI gives a state transport authority a live view across hundreds of waterway sites and an estimated AUD $60M+ in annual savings
HCLTech

Edge AI gives a state transport authority a live view across hundreds of waterway sites and an estimated AUD $60M+ in annual savings

Beyond migration: Turning SAP transformation into a business growth agenda
HCLTech

Beyond migration: Turning SAP transformation into a business growth agenda

Marketing data leader turns its codebase into a 24/7 expert
HCLTech

Marketing data leader turns its codebase into a 24/7 expert

Unified VLM framework for visual design analysis and workflow extraction
HCLTech

Unified VLM framework for visual design analysis and workflow extraction

More from Atos

RegisterUserApiHook - A forgotten undocumented handle-less session-wide DLL injection primitive and its impact on EDR tamper protection
Atos

RegisterUserApiHook - A forgotten undocumented handle-less session-wide DLL injection primitive and its impact on EDR tamper protection

When probability meets accountability
Atos

When probability meets accountability

Don’t make the agent do everything
Atos

Don’t make the agent do everything

You can afford the AI pilot. Can you afford the production system?
Atos

You can afford the AI pilot. Can you afford the production system?

Threat actor playbooks: Who is targeting the IT supply chain & how
Atos

Threat actor playbooks: Who is targeting the IT supply chain & how

Just because AI can do it, does that mean it should?
Atos

Just because AI can do it, does that mean it should?