© 2018 Caendra Inc. - Hera For Ptpv5 - Post-Exploitation
© 2018 Caendra Inc. - Hera For Ptpv5 - Post-Exploitation
Once the vulnerability has been identified as the administrator user, log onto the same
system as a low-privileged user and exploit the DLL Hijacking vulnerability to escalate
privileges to SYSTEM.
• Process Explorer
• Process Monitor
• PowerShell
• Metasploit
IP: 172.16.48.100
Username: student_admin
Password: s7udent_n1md@
Using the information obtained through manual analysis of the system as the administrator
user, use the Low Privileged user credentials below to remote desktop to the system,
exploit a DLL Hijacking vulnerability and escalate your privileges to SYSTEM.
IP: 172.16.48.100
Username: lowpriv
Password: c00l_passw0rd!
From our tester machine, which is a Kali Rolling install, we Remote Desktop the Lab System
as the administrator user:
Username: student_admin
Password: s7udent_n1md@
# rdesktop 172.16.48.100
Once connected, we can launch the Process Explorer application from the shortcut on the
Desktop. We right-click on the shortcut, and select “Run as Administrator.”
Once in Process Explorer, we identify a particular process we’re interested in, running as
NT AUTHORITY\SYSTEM, the “outpost.exe” process, which through some research, we find
is associated to a third-party firewall application.
Once in the Process Monitor, we modify the current filter by clicking on the small filter
button in the top menu, or by clicking CTRL+L, where we’re presented with the Process
Monitor Filter dialog:
We also add a filter for the “Result” column, and supply a value of “NAME NOT FOUND” in
the text field:
We click “Add,” and then the “OK” button to apply our selections.
Next, we want to kill the “outpost.exe” process which has the NT AUTHORITY\SYSTEM
privileges. We can kill the outpost.exe SYSTEM process from Process Explorer by right-
clicking, and selecting the “Kill Process” option, making sure you’re killing the correct
outpost.exe process that is running as SYSTEM.
Once we start the service, we’ll notice in Process Monitor, that we’ve captured some events
that might be useful to us for the purpose of DLL Hijacking:
For this example, we’ll choose the “UxTheme.dll” file for our candidate to execute a DLL
Hijack exploit.
At this point, we’ve identified that the service is looking for several DLL’s in a directory
which we can write too as a low-privileged user in the “Users” group.
Our next step is to log in to the system as the low privileged user, plant our chosen DLL
(UxTheme.dll), and ultimately get a SYSTEM shell on the target.
Username: lowpriv
Password: c00l_passw0rd!
# rdesktop 172.16.48.100
The first thing we need to do is create a payload we can use our “malicious” “UxTheme.dll”
file.
We need a way to get this payload down to our target system, so on the attacker machine,
we first run a python HTTPServer to host our payload from the directory which contains
our “malicious” DLL file. We’ll run the server on port 80:
Then, from the target system, we launch a command prompt and execute a powershell
download cradle to download our payload into the application directory:
We can then confirm our DLL has been download into the applications’ program directory:
Now that our rogue DLL is in place, next we need to prepare a listener on our attacker
machine to handle the connection once we restart the Outpost Firewall application on the
target.
Now that we have our handler ready, we need to restart the machine, so when the service
starts, it will load our “rogue” “UxTheme.dll,” and we should at that point get a meterpreter
session from the target back to the attacker machine as SYSTEM.
C:\Users\lowpriv> shutdown /r /t 0
When the system comes back, it may take several minutes with this particular
application for the system to fully power up, and the all necessary services to start, but
we should end up with a SYSTEM-level meterpreter session after some time: