UAC Bypass
The UAC bypass is needed in the following situation: the UAC is activated, your process is running in a medium integrity context, and your user belongs to the administrators group.
Last updated
The UAC bypass is needed in the following situation: the UAC is activated, your process is running in a medium integrity context, and your user belongs to the administrators group.
Last updated
Confirm UAC by reading the registry.
Now notice the three highlighted keys above and their values:
EnableLUA
tells us whether UAC is enabled. If 0 we don’t need to bypass it at all can just PsExec to SYSTEM. If it’s 1 however, then check the other 2 keys
ConsentPromptBehaviorAdmin
can theoretically take on 6 possible values (readable explanation here), but from configuring the UAC slider in Windows settings it takes on either 0, 2 or 5.
PromptOnSecureDesktop
is binary, either 0 or 1.
Also confirm if you have this type of situation that your process is running on an administrative accout but in a standard user context.
If UAC is already disabled (ConsentPromptBehaviorAdmin
is 0
) you can execute a reverse shell with admin privileges (high integrity level) using something like:
The easiest way of manual UAC bypass is simply uploading bypassuac-x86.exe
or bypassuac-x64.exe
and execute it. Locate these two executables in your system:
If UAC is configured on the "Always Notify" level, fodhelper and similar apps won't be of any use as they will require the user to go through the UAC prompt to elevate. We'll be abusing a scheduled task that can be run by any user but will execute with the highest privileges available to the caller.
Scheduled tasks are an exciting target. By design, they are meant to be run without any user interaction (independent of the UAC security level), so asking the user to elevate a process manually is not an option. Any scheduled tasks that require elevation will automatically get it without going through a UAC prompt.