Machine Info
Spoiler
Host / IP
At the time of writing this report the machines on the platform have unique IPs for everybody. Get you IP and add it to the /etc/hosts file with the appropriate domain name, forest.htb.
User
Reconnaissance
We are going to start by running our nmap scan:
| |
We don’t see a lot of open services that can be interesting. SMB reveals no open shares. What we see is and is important is that the domain is htb.local and the hostname of the DC is FOREST. We need to edit our records in*/etc/hosts*.
| |
LDAP
Checking the LDAP we can basically query the Domain unauthenticated. We search the directory with different filters and outputs.
| |
| |
Having gathered the username we try to see if they are AS-Roastable!
| |
This is suprising. No user is vulnerable to it. Let’s look again more thorougly the directory objects.
| |
We manage to find a a computer account, propably for some exchange server.
We are going to use another tool for LDAP querying, called windapsearch. Let’s make an export of all the objects and look into them.
| |
Looking at the export file we come accross dn: CN=svc-alfresco,OU=Service Accounts,DC=htb,DC=local. This may be what we missed as it doesn’t have any other attribute except the dn. This is rare but possible.
Trying now to get the hash with Impacket’s GetNPUsers works like a charm.
| |
We crack the hash.
| |
svc-alfresco's password
[email protected]:5b19fcc7133e6d57a68515a2abdd8659$2c2b3d2f1dd7891c46f29e187d45062c0055f76ecf8157d5dd94715898c39965061878d9dc29eb4c71eee8b4f5536706e11e4145cd31925191de27875fab3da4a479f55648ab6a1dbbcc94e40077a3e96dc91441723b5c29440939204979a143f98585daf9ba39527f9245749c416dc336a79f08b0a58d94f89ee3b234ee8b20258213baef6f1bb586c216cf50dd65242e56d05afe8f8b7b05f2b4be85059b899a3492002f3d52662126789816708b4c94f0d2aaa6f6bb9d1fce66d9b78201af4b23e8132cb051862b8f3560d9f904256f6191e427786143bed7a3f378035b1e906cd9d64bce:s3rvice
Using evil-winrm we can login and get the user.txt.
Root
Enumerating our posture and the domain we will launch Bloodhound. First we collect the data from our attacker machine.
| |
We launch Bloodhound GUI and we see this nice path to Admin on the image below.
For this we need to add our selves to the EXCHANGE WINDOWS PERMISSIONS and then we will be able to write a DACL to the HTB.LOCAL for whatever right we want. We can use DCSync to own the domain.
We can use the native commands within the victim host, such as:
| |
Or with Powerview:
| |
| |
After we add are part of the group we can write a DACL and add the DSCync right to our principal. Lastly we use secretsdump.py dump all the secrets drom the DC.
Administrator NT Hash
| |
To get the root.txt we just authenticate as Administrator and Passing the Hash.
| |
