TL;DR
A security researcher discovered an undocumented Windows API called GetProcessHandleFromHwnd that lacked clear security documentation. The researcher performed a detailed analysis by examining API documentation, tracing its history, and studying a publicly disclosed UAC bypass vulnerability in Quick Assist.
✦ Why It Matters
Engineers must audit undocumented or poorly-documented APIs for security implications before deployment in privileged contexts.
Key Takeaways
How It Works
The GetProcessHandleFromHwnd API allows a process to obtain a handle to another process based on its window handle (HWND). Initially, it utilized a Windows hook mechanism to facilitate this, but later versions directly accessed the kernel, bypassing some security checks.
The API checks the integrity levels of processes and their access rights, but flaws in these checks can lead to unauthorized access, especially for processes with UI Access.
Related