Rapid7 Vulnerability & Exploit Database

Windows Escalate UAC Protection Bypass (Via COM Handler Hijack)

Back to Search

Windows Escalate UAC Protection Bypass (Via COM Handler Hijack)



This module will bypass Windows UAC by creating COM handler registry entries in the HKCU hive. When certain high integrity processes are loaded, these registry entries are referenced resulting in the process loading user-controlled DLLs. These DLLs contain the payloads that result in elevated sessions. Registry key modifications are cleaned up after payload invocation. This module requires the architecture of the payload to match the OS, but the current low-privilege Meterpreter session architecture can be different. If specifying EXE::Custom your DLL should call ExitProcess() after starting your payload in a separate process. This module invokes the target binary via cmd.exe on the target. Therefore if cmd.exe access is restricted, this module will not run correctly.


  • Matt Nelson
  • b33f
  • OJ Reeves




Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/windows/local/bypassuac_comhijack
msf exploit(bypassuac_comhijack) > show targets
msf exploit(bypassuac_comhijack) > set TARGET < target-id >
msf exploit(bypassuac_comhijack) > show options
    ...show and set options...
msf exploit(bypassuac_comhijack) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security