Bypassing UAC
Last updated
Last updated
User Account Control (UAC) is a Windows security feature introduced in Windows Vista to prevent unauthorized system changes. It ensures that any modification to the operating system requires approval from an administrator or a user with administrative privileges.
Non-privileged users executing programs with elevated privileges will receive a UAC credential prompt.
Privileged users will see a UAC consent prompt before the action is approved.
To bypass UAC, an attacker needs access to a local administrator account on the target system.
UAC prompts users before executing programs with administrative rights.
UAC operates at different integrity levels (Low to High). If set below High, certain programs can execute without user confirmation.
Various tools and techniques can be used to bypass UAC, depending on the Windows version.
UACMe is an open-source and powerful privilege escalation tool. It automates UAC bypass techniques to execute processes with elevated privileges without triggering UAC prompts.
It provides a comprehensive and well-documented list of methods for bypassing UAC across multiple Windows versions, from Windows 7 to Windows 10. By exploiting the built-in Windows AutoElevate tool, it enables attackers to execute malicious payloads on a target system with administrative or elevated privileges.
I started by gathering basic information on the target machine, listing all user accounts (net users
) and identifying members of the Administrators group (net localgroup administrators
). Then, from the attacker machine, I scanned the target using Nmap to identify open ports and services.
I leveraged Metasploit to exploit the Rejetto HFS vulnerability, gaining an initial foothold on the target. Once inside, I used Meterpreter to enumerate system details (sysinfo
), check running processes (pgrep explorer
), migrate to a stable process, and verify privileges.
To escalate privileges, I utilized UACMe, an open-source privilege escalation tool, to bypass User Account Control (UAC). I created a Meterpreter payload using msfvenom
, uploaded it to the target machine, and executed it with elevated privileges using UACMe (Akagi64.exe 23 backdoor.exe
).
Finally, I set up a multi-handler on Metasploit to catch the reverse shell connection from the backdoor, successfully establishing a new Meterpreter session with elevated privileges on the target.
I used the bypassuac_injection exploit to escalate privileges on a Windows machine. After setting the session and payload, I executed the exploit.
Once inside, I ran getsystem to gain SYSTEM privileges and confirmed my user identity with getuid.
Next, I listed processes searching for lsass.exe and migrated to its PID (484) for stability. Finally, I dumped password hashes using hashdump for credential extraction.