Skip to main content

Enumeration

Run Nmap Scan

View Website

Untitled

Directory Bruteforcing (Run Gobuster)

Nothing special found here

Exploitation

Searching for Website Exploit

When we view the website, the server information section contains the version which is 2.3

Copy and Configure Exploit

Exploit

Privilege Escalation

Enumerating Privilege Escalation using WinPEAS

winPEAS Result

There’s the credential for kostas , the user that we are logged in. Also we can find some interesting web browser history like https://www.exploit-db.com/download/39719, which is the exploit that we are going to use! Overall, there’s nothing that we gained here (Let’s exclude the IE History)

Using Kernel Exploit

Getting Systeminfo and Saving the file as systeminfo.txt

Save the above text as systeminfo.txt (Without the command)

Install and execute wes-ng

Search for Privilege Escalation Kernel Exploit

We are using MS16-032 as it is one of the stable exploit for Windows Server 2012

Failed Exploiting MS16-032

Architecture Problem

Powershell is executed in 32bit environment (C:\Windows\System32), hence we should look for 64 bit powershell (C:\Windows\sysnative) - 0xdf

Download and Configure Reverse Shell Powershell Script

Add the code below the script

Re-Exploiting HFS 2.3 Vulnerability Triggering 64bit Powershell

Untitled
You have to modify the attacker ip to get the reverse shell!

Modify the Reverse Shell Powershell Script

Modify the code below the script

Modifying the Invoke-MS16032 Script

To automatically trigger the reverse shell, add the code below the script

Listen to Reverse Shell and Exploit

Reference