Enumeration

Nmap

Initial Nmap scan revealed many standard ports for Domain Controllers.

00 - nmap

SMB Null

SMB Null enumeration was allowed and it revealed some accessible shares.

01 - smb null

One of the shares was homes share which included usernames. I noted them. Morover, I put desktop.ini generated by ntlm_theft tool to each one of them and started responder.

03 - put ntlmtheft to everyone home

To enhance my user list, I also applied rid brute forcing and noted these users too.

02 - rid userList

There was another share called apps and it included a .lnk file.

04 - apps

I used lnk-parse tool to analyze it. It did not reveal any useful data other than startup scripts location.

05 - lnk parser

Brute Forcing

Then, I applied brute forcing to SMB with username and password as username from previously generated user list. Found 2 valid credentials.

06 - username username

06 - username username 2 library

More SMB Enumeration

User Carl.Moore had READ access to the sysvol share which inlcudes startup scripts.

07 - sysvol

At first I analyzed the login.vbs script and it was not useful. 08 - login vbs nothing useful

Later I found out that, despite nxc was sayinng it was READ access, I could write into scripts folder. So at first I updated login.vbs script and added a reverse shell.

09 - 0 login vbs update

Then put it to scripts folder.

09 - 1 put

Then simply got a reverse powershell using netcat. Moreover, I got the user flag.

09 - 2 user flag

Privilege Escalation

BloodHound

The user Carl.Moore could authenticate using LDAP. So I ran bloodhoun-python using Carl.Moore’s credentials.

09 - bloodhound python ldap

WriteDACL over GPOADM

Analyzing the bloodhound revealed that current user in reverse shell (Amellia) had WriteDACL priviliges over GPOAdm user.

10 - writeDacl

So at first, I updated ACL’s and gave the Amellia GenericAll privileges over GPOAdm. Then I updated its password.

11 - updated gpoadm password

GenericAll over GPO

The GPOAdm user had GenericAll privileges over default domain policy object.

12 - generic all

So I can abuse this using pyGPOAbuse or SharpGPOAbuse to add a new user to Local Admins group.

I used pyGPOAbuse and used its default options which adds john user to local administrators group with Password: ‘H4x00r123..’

13 - pygpoabuse

Then used xfreerdp3 to get an RDP session using new user.

14 - login

And got the root flag.

15 - flag

Pwned

Pwned it baby :)

pwned


<
Previous Post
CozyHosting - Hack The Box
>
Next Post
TombWatcher - Hack The Box