Rapid7 Vulnerability & Exploit Database

Windows UAC Protection Bypass (Via Slui File Handler Hijack)

Back to Search

Windows UAC Protection Bypass (Via Slui File Handler Hijack)

Disclosed
01/15/2018
Created
06/14/2018

Description

This module will bypass UAC on Windows 8-10 by hijacking a special key in the Registry under the Current User hive, and inserting a custom command that will get invoked when any binary (.exe) application is launched. But slui.exe is an auto-elevated binary that is vulnerable to file handler hijacking. When we run slui.exe with changed Registry key (HKCU:\Software\Classes\exefile\shell\open\command), it will run our custom command as Admin instead of slui.exe. The module modifies the registry in order for this exploit to work. The modification is reverted once the exploitation attempt has finished. The module does not require the architecture of the payload to match the OS. If specifying EXE::Custom your DLL should call ExitProcess() after starting the payload in a different process.

Author(s)

  • bytecode-77
  • gushmazuko

Platform

Windows

Development

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_sluihijack
msf exploit(bypassuac_sluihijack) > show targets
    ...targets...
msf exploit(bypassuac_sluihijack) > set TARGET < target-id >
msf exploit(bypassuac_sluihijack) > show options
    ...show and set options...
msf exploit(bypassuac_sluihijack) > 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

;