Support: HTB Machine Writeup (Retired)

A series of CTF Writeups. Follow Along!

Mritunjay Kumar
3 min read4 days ago
I need your support!

I start with an NMap scan. Found an SMB port.

There’s kerberos runinng as well, but that’s irrelevant

My quick instincts forces me to see if any files can be accessed anonymously through the SMB service.

See the odd one out of them?

There is a file names UserInfo.exe.zip that stands out of the other commonly used files. I downloaded it. Inside the zip file there is an executable named UserInfo.exe

The UserInfo.exe looks like it is communicating with the domain to find out a user’s information. It accepts command line arguments including the first name or last name of the target user. On looking into the communication under Wireshark, I found that some credentials were passed in clear text.

Achha baat nhi hai ye (Sardar Khan)

This credential is valid and ldap queries can be performed through it.

Wohoo!

I tried bloodhound enumeration after this but didn’t find anything. An LLM Model suggested me to perform enumeration through the ldapsearch utility and look for passwords.

So I did

Turns out that it was not wrong. I found a password for a user in its output.

Bhai hai tu apna

This user could log in through the WinRM service, so I used evil-winrm to log in and got the user.txt

Half of my work is done

I turned to bloodhound again.

2 Blood 2 Hound

Under the Outbound Object Control section for the compromised user’s node shows that it has a Group Delegated Object Control. The user is a member of the Shared Support Account group and this group has a Generic All over the Domain Controller.

Delegated for destruction

The best thing that I like about bloodhound is that it does not only share the path to misconfiguration but also the information on how to exploit it.

Follow Along

So, I followed the steps.

Bloodhound shows that since the group has a Shared Support Account over the DC so the user can perform the RBCD Attack (Role Based Contsrained Delegation).

This simply means that the compromised user can create a machine in the domain and configure the DC to allow the machine to act on behalf of it.

1987 called, they want their cmd back

Once this is done, we can perform the S4U attack to request an Administrator’s Kerberos Ticket using Rubeus.

I thought Rubeus was obsolete. Sorry that was Powerview!!

Since now we have the base64 encoded ticket, we can decode it and convert it to a normalized form which the impacket module can recognize. This can be done through the tickerConverter script from impacket. We can then use psexec to gain the Administrator shell on the DC.

Address me as “Your Majesty”

--

--

No responses yet