Last updated
Last updated
Scope
Ip Address: 10.10.11.174
Nmap Scan
DNS
RPC
SMB
I opened a file and list share names in it, Then I created a for loop to find accessible share
I will mount the remote share on my kali machine to easily navigate the share
UserInfo.exe.zip
File looks interesting, So I will copy it to windows machine
I've downloaded dnSpy.exe
before, So I decided to open the files with it, Under LdapQuery tab
there is interesting information here
A user has a name support\ldap
but the password is protected
I clicked on getPassword()
Function to see its content
I can say that it's a decryption function to get the password in secure way involving base64
encoding and xor
operation, So I asked chatGPT to rewrite this function in python to be able to run it on my host and here is the code
Run it and you will get the password
I verified with crackmapexec
and Success :)
I tried to connect with winRM
but failed So I decided to continue enumerating the domain with bloodhound-python
and rpcclient
I Created a zip file to upload it to bloodhound GUI after starting it
I put custom query to bloodhound to see which user can PSRemote to the machine
I can also see that support
User exists from rpcclient
command
I searched for this account on bloodhound and knew that support
account is a member of SHARED SUPPORT ACCOUNTS
which has GenericAll
rights on DC.SUPPORT.HTB
which is an attack path known as Resource based constrianed delegation (RBCD)
, So If I have the support
I can takeover the DC
I search a lot to get the syntax of ldapsearch
as it's confusing for me to get information from ldap
about user support
There is a value in info
field, So I will try to connect to the machine with it and I got a hit :)
We knew from bloodhound that we can PSRemote
with user support
, So I fired up evil-winrm and waited for a shell access
User flag 8959fba6ef693c03xxxxxxxxxxxx
The path to domain admins is already obvious now. We can get the help of this post if we want to perform attack from Linux:
We need a fake computer account and the name of the machine account that we can write attribute on.
The machine's name is DC$
For some reason, I couldn't connect with psexec.py
or dump hashes with secretsdump.py
, So I switched to crackmpaexec
Root flag: e99ab2203321xxxxxxxxxxxxxxxxxxxx