Sitemap
System Weakness

System Weakness is a publication that specialises in publishing upcoming writers in cybersecurity and ethical hacking space. Our security experts write to make the cyber universe more secure, one vulnerability at a time.

TryHackMe — Reset

5 min readOct 14, 2024

--

Press enter or click to view image in full size

Reset is a hard rated box from tryhackme which showcases Active Directory attack vectors that are related ACLs. Let’s get started.

Initial Access

Nmap shows the following ports open

`nmap -p- -T 4 <ip>`

&

`nmap -p <ports> -sC -sV — open <ip> -oN nmap_tcp`

Press enter or click to view image in full size
Press enter or click to view image in full size

From the open ports we can deduce that the target is a domain controller. Enumerating smb;

Press enter or click to view image in full size

Enum4linux doesn’t generate anything interesting with anonymous access neither does smbmap. Tried connecting to the shares enumerated starting with “Data” share.

Press enter or click to view image in full size

Was able to connect to the “Data” share anonymously. Inside found the directory “onboarding” with some randomly named files.

Press enter or click to view image in full size

Listing out the contents of the directory after a while shows the files named differently. Some sort of script maybe running (important for later!)

Downloaded the files one by one.

Discovered a default password in one of the txt files

Press enter or click to view image in full size

Need a username / usernames to test this password against.

In another pdf file downloaded from the “Data” share we get a possible username as well

Press enter or click to view image in full size

Can use “username-anarchy” to generate a potential username patters for AD.

Somehow trying the username patterns with crackmapexec throws false positives

Press enter or click to view image in full size

Tried kerbrute instead with no luck with any of the default patterns generated with “username-anarchy”

Press enter or click to view image in full size

Using crackmapexec to brute force RIDs

Press enter or click to view image in full size

Using the usernames discovered by crackmapexec created a list to spray the default password discovered. AD username pattern is also revealed here.

Press enter or click to view image in full size

We have lily_oneill user who has the default password unchanged.

Get PizzSec’s stories in your inbox

Join Medium for free to get updates from this writer.

Before trying to log in, tried kerberoasting, asreproasting and bloodhound enumeration

Press enter or click to view image in full size

No luck with kerberoasting

Press enter or click to view image in full size

Got several hashes launching the asreproasting attack.

Using hashcat was able to crack one user hash

Press enter or click to view image in full size

Mapped the domain with bloodhound and discovered “Tabatha_Britt” user has “GenericAll” privileges on 2 users

Press enter or click to view image in full size

We can reset the password of the users and gain access to these accounts. Bloodhound has instructions on how to do this

Further enumerated on bloodhound what privileges “Raquel_Benson” and “Shawna_Bray” users have.

Press enter or click to view image in full size

“Shawna_Bray” can ForceChangePassword on “Cruz_Hall”. Used the same attack as before to take control of “Cruz_Hall” user.

Going further on bloodhound looked what privileges “Cruz_Hall” user has

“Cruz_Hall” can change the password of “Darla_Winters”. Rinse and repeat the same attack to gain control of “Darla_Winters”.

Privilege Escalation

Checking on privileges of “Darla_Winters” user.

Press enter or click to view image in full size

“Darla_Winters” has constrained delegation privileges on the domain controller. This means we can request a ccache file of the administrator hash and export it to KRB5CCNAME environment variable and create remote session on the DC.

First the domain controller FQDN (haystack.thm.corp) should be added to the hosts file. Using impacket-getST module.

Press enter or click to view image in full size
Press enter or click to view image in full size

With that a remote session has been created as Administrator just by abusing ACLs.

Another Interesting Attack (URL File Attack)

There is another interesting attack vector in this box. Remember the unusual behavior in the SMB share from before where the filenames kept changing? With the “Tabatha_Britt” user enumerated SMB again.

Press enter or click to view image in full size

We have write access on the “Data” share.

From here need to upload file with the url of our attack machine which could give us a hash.

File was named with “@” at the beginning to make it appear on top in the smb share when files are listed. Once this is created, it can be uploaded to the Data\onboarding directory. Then need to run responder in the hopes of catching a hash.

Press enter or click to view image in full size

Starting responder

Press enter or click to view image in full size
Press enter or click to view image in full size

We can try to crack the hash using hashcat

Press enter or click to view image in full size

--

--

System Weakness
System Weakness

Published in System Weakness

System Weakness is a publication that specialises in publishing upcoming writers in cybersecurity and ethical hacking space. Our security experts write to make the cyber universe more secure, one vulnerability at a time.