🔬UAC Bypass
Lab 1
Target IP:
10.4.19.119UAC bypass
Some useful Win CMD commands
net user
net localgroup administratorsEnumeration
nmap 10.4.19.119PORT STATE SERVICE
80/tcp open http
135/tcp open msrpc
139/tcp open netbios-ssn
445/tcp open microsoft-ds
3389/tcp open ms-wbt-server
49152/tcp open unknown
49153/tcp open unknown
49154/tcp open unknown
49155/tcp open unknown
49175/tcp open unknownDetermine the version information of the web server on port
80

The version can be checked in a browser by opening the link
http://10.4.19.119/
Exploitation
Set the target IP as GLOBAL RHOSTS variable

Use
meterpretercommands to gain more information about the target
Migrate current x86
meterpretersession to a x64 process
Get
adminuser privileges

Verify if
adminuser is part of the local administrators group

In order to run programs or tasks with elevated privileges, UAC bypass is necessary
UAC Bypass & Privesc
UACMe Akagi executable is already present on the attack machine
Generate a
meterpreterpayload withmsfvenom
Set up a new
msfconsolesession and set up a listener withmulti/handler, to receive the connection one the payload is executed on the targetset the payload used with
msfvenom- thewindows/meterpreter/reverse_tcponeset the LHOST IP and LPORT of the attack machine, based on the
msfvenomgenerated payload
The
reverse_tcp handleris listening and ready to receive the connection from the malicious payloadHead back in the
meterpretersession already opened

UAC would prevent running
backdoor.exeRun
Akagi64.exeexecutable with UACMe methor 23

Elevated
meterpretersession should be received on the listener

Migrate to a
NT AUTHORITY\SYSTEMservice

📌 Privileges successfully elevated by bypassing UAC on a system running Windows 2012 R2.
Dump hashes to get the flag
Last updated
Was this helpful?