writeup
HackTheBox
Machine
Easy
OSCP
bloodhound
impacket
DCsync
ASPReroast
kerbrute
AD
Knowing that we can enumerate kerberos we are going to use kerbrute to bruteforce usernames.
After enumerate with this list I discover this usernames:
But looking into this usernames i don't found nothing interesting so we can enumerate with enum4linux.
Reading the resutls of this tool I noticed that there are more users.
Looking the new stuff discovered we have this list.
Looking the usernames at the first look we see that svc-alfresco its a service account so maybe is ASPR-Roastable and we can obtain the kerberos ticket to crack it.
To do de ASPR-Roastable we are gonna use impacket:
We receive the Kerberos TGT and now we can try to crack it with john:
We have to put the Kerberos hash into a file and use the following command to crack it.
We receive the following result:
s3rvice ($krb5asrep$23$svc-alfresco@HTB.LOCAL)
After knowing the user and the password we can use evil-winrm to obtain a shell as svc-alfresco, use the following command:
After that now we have a shell as svc-alfresco, for more info about evil-winrm go to his github.
Now it's time to enumerate and find the way to obtain Administrator priveleges.
Knowing this is an AD we are gonna start enumerating with Bloodhound, so knowing the credentials for svc-alfresco we can use bloodhound-python ingestor, that can be used remotely and it isn't necessary to upload any file to the machine, we can use the following command:
bloohound-python -u svc-alfresco -p s3rvice -ns 10.10.10.161 -d HTB.local -c All
This we generate in our machine a few json that we have to upload to Bloodhound as we see in my previous bloodhound post.
After upload it and bloodhound and Start the query select the shortest path to domain admins we see this.
We have to right click on HTB.local and click Set as Ending Node:
After that we obtain this graph that show to us the path to make the privilege escalation.
Taking a look into the graph we see that we have to make part of 'EXCHANGE WINDOWS PERMISSIONS@HTB.LOCAL' to be capable of use WriteDacl to obtain Admin privileges, so adding EXCHANGE WINDOWS PERMISSIONS@HTB.LOCAL group to svc-alfresco user we can leverage this account and try to dump the NTLM hashes.
Right clicking on WriteDacl inside bloodhound and clicking on help next to on abuse info, it will explain how to abuse from DCsync in my case i recommend to look in a web like this.
Reading the Abuse info and the the guide on the web we see, that we have to make this steps:
After that we should can dump the credential hashes from the dc. These are the Commands that you have to enter.
In the case that when you add the user to the Exchange Windows Permissions don't work you have to make a script that executes all in once. In my case i found it after doing the machine in the 0xdf writeup.
After execute the commands or the Script we can use impacket-secretdump to dump the LDAP hashes using the following command:
We receive this something like this:
If you look the entire hash you can see that is a NTLMv1 hash so we can pass-the-hash to Administrator account .
Using evil-winrm we can pass the hash it and obtain Administrator shell:
And that's all folks we obtained Administrator Privileges! Check my media!