Executive Summary
Project Zero examines the GetProcessHandleFromHwnd Windows API after finding it used in a public UAC bypass.
What Happened
In my previous blog post I mentioned the GetProcessHandleFromHwnd API. This was an API I didn’t know existed until I found a publicly disclosed UAC bypass using the Quick Assist UI Access application. This API looked interesting so I thought I should take a closer look. I typically start by reading the documentation for an API I don’t know about, assuming it’s documented at all. It can give you an idea of how long the API has existed as well as its security properties. The documentation’s remarks contain the following three statements that I thought were interesting: If the caller has UIAccess, however, they can use a windows hook to inject code into the target process, and from within the target process, send a handle back to the caller. GetProcessHandleFromHwnd is a convenience function that uses this technique to obtain the handle of the process that owns the specified HWND. Note that it only succeeds in cases where the caller and target process are running as the same user.
Affected Products
- Windows
Vulnerability / Attack Technique
API research
Technical Mechanism
A research deep-dive on a Windows API.
AI Security Category
Not AI-specific
RealGround Analysis
Vulnerability research with no AI component.
Recommended Controls
- No specific action
Related RealGround Service
AI Agent Business Logic Audit · or start with the free AI Agent Security Scanner.
Sources
googleprojectzero.blogspot.com: https://projectzero.google/2026/02/gphfh-deep-dive.html
Summary and analysis written by RealGround from the source above; last updated 2026-10-18.
