HTB - BlackField

Machine Info

Backfield is a hard difficulty Windows machine featuring Windows and Active Directory misconfigurations. Anonymous / Guest access to an SMB share is used to enumerate users. Once user is found to have Kerberos pre-authentication disabled, which allows us to conduct an ASREPRoasting attack. This allows us to retrieve a hash of the encrypted material contained in the AS-REP, which can be subjected to an offline brute force attack in order to recover the plaintext password. With this user we can access an SMB share containing forensics artefacts, including an lsass process dump. This contains a username and a password for a user with WinRM privileges, who is also a member of the Backup Operators group. The privileges conferred by this privileged group are used to dump the Active Directory database and retrieve the hash of the primary domain administrator.

Enumeration

Scope

IP Address: 10. 10.10.192

Nmap Scan

RPC Enumeration

SMB Enumeration

When I connected to smb server with anonymous login, it failed

However, when I attempted to authenticate with guest account, I got a hit

smbclient shows the same results, too

I mounted the share to my kali machine to explore it easily

The folders have names of humans which can be users' home directories, So I will append these names to a list and attempt it against Kerberos to find valid usernames

Kerberos Enumeration

I found three valid users with kerbrute

When I attempted ASREP-Roasting attack against these users, I got a hash of user support

Initial Access

Confirm the credentials we got

List shares that support has access to

  • I couldn't find any interesting files even I had valid credentials, So I will continue enumeration with bloodhound.py

Enumerate the domain with bloodhound.py and feed the zip file to bloodhound GUI

Looking at bloodhound, I found that suppport can Chane password of audit2020

I provide a custom query to bloodhound to see what user can PSRemote to the machine

I searched for a way to change user's password from without access to the machine and I found this command from this post: https://www.thehacker.recipes/ad/movement/dacl/forcechangepassword

I managed to change the user password but still not have access to the machine, So I will try to enumerate the share again with the user audit2020

I got a read access on share forensic with the user audit2020

I will mount the share to my kali machine and start navigate it

These two directories look interesting and lsass.zip file is the most important file here

zip file content

I will extract secrets from this memory dump with pypykatz, It's like mimikatz but for Linux

I tried to authenticate with NT hash for svc_backup and administrator. I got a hit with svc_backup but didn't with admin

we know from bloodhound that we can PSRemote to the machine with svc_backup account, So I will start evil-winrm

User Flag: 3920bb317a0bef51xxxxxxxxxxxxxxxx

Privilege Escalation

svc_backup is a member of privileged group Backup operators which can be abused to get Domain admin privileges.

I will create a backup of ntds.dit as shadow copy with diskshadow.exe. create this file that contains commands for diskshadow utility

I run an issue when running diskshadow, So I asked the community, and the solution was in endiness of the file and can be solved by this command

Create a shadow copy

Copy the database file to current directory

get the system hive which we need to decrypt the database

Dump the secrets from the database

Root Flag: 4375a629c7c67c8exxxxxxxxxxxx

Last updated