πŸ›‘οΈUAC Bypass

🎯 Overview

User Account Control (UAC) provides consent prompts for elevated activities but is not a security boundary. With Admin Approval Mode (AAM), admin users receive two tokens - standard and privileged. UAC bypasses exploit auto-elevating binaries and DLL hijacking to gain elevated privileges without prompts.

πŸ”‘ UAC Fundamentals

Admin Approval Mode (AAM)

# Standard user token (default context)
whoami /priv

# Limited privileges:
SeShutdownPrivilege           Disabled
SeChangeNotifyPrivilege       Enabled
SeUndockPrivilege             Disabled

UAC Configuration Check

# Check if UAC is enabled
REG QUERY HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ /v EnableLUA
# EnableLUA    REG_DWORD    0x1 (Enabled)

# Check UAC level
REG QUERY HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\ /v ConsentPromptBehaviorAdmin
# 0x5 = Always notify (highest level)
# 0x2 = Prompt for consent for non-Windows binaries
# 0x0 = Elevate without prompting

πŸ”§ DLL Hijacking Technique (UACME #54)

Windows Build Assessment

DLL Search Order Exploitation

Target Binary Analysis

πŸš€ Exploitation Process

1. Generate Malicious DLL

2. Deploy DLL to Target

3. Test Standard Execution

4. UAC Bypass Execution

🎯 HTB Academy Lab Solution

Lab Environment

  • Credentials: sarah:HTB_@cademy_stdnt!

  • Access Method: RDP

  • User Context: Local administrator with UAC enabled

  • Flag Location: Desktop of sarah user

Complete Walkthrough

πŸ”„ Alternative UAC Bypasses

UACME Project Techniques

Registry-Based Bypasses

⚠️ Detection & Defense

Detection Indicators

Defensive Measures

πŸ’‘ Key Takeaways

  1. UAC is not a security boundary - convenience feature only

  2. Admin Approval Mode creates dual-token scenario

  3. Auto-elevating binaries can be exploited via DLL hijacking

  4. PATH manipulation enables user-controlled DLL loading

  5. Multiple bypass techniques exist for different Windows versions


UAC bypasses exploit design flaws in auto-elevating mechanisms, enabling privilege escalation without user consent prompts.

Last updated