πŸ΄β€β˜ οΈPirate

https://app.hackthebox.com/machines/Pirate

Pirate β€” HackTheBox Writeup

Machine Information

  • Initial creds: pentest / p3nt3st2025!&


Recon

Notable ports/services:

  • 53 DNS

  • 80 IIS

  • 88 Kerberos

  • 135/139/445 RPC/SMB

  • 636/3268/3269 LDAP/LDAPS/GC


Local Config

/etc/hosts

/etc/krb5.conf


Enumeration / Attack Path Discovery

Used ADScan/BloodHound and identified these key edges:

  • Domain Secure Servers -> ReadGMSAPassword -> gMSA_ADFS_prod$

  • A.WHITE -> ForceChangePassword -> A.WHITE_ADM

  • A.WHITE_ADM -> AllowedToDelegate -> WEB01$


1) Get gMSA secrets

Use recovered gMSA_ADFS_prod$ NTLM hash.


2) WinRM to DC01 as gMSA

If Kerberos/time issues appear:


3) Pivot to WEB01 with Ligolo-ng

On attacker:

On compromised Windows session:

On attacker, configure tunnel:

Add ip to hosts

In Ligolo console:


4) NTLM relay + RBCD to WEB01

Start relay to DC LDAPS:

Trigger coercion from WEB01:

Relay should create a new machine account like:

  • NEWMACHINE$ / <RANDOM_PASSWORD>

Use it for S4U to WEB01:


5) Dump secrets from WEB01

From WEB01 shell:

From attacker:

Recovered useful credential:

  • a.white : E2nvAOKSz5Xz2MJu

Validate:


6) ForceChangePassword on a.white_adm


7) Constrained Delegation abuse (S4U)

Request ticket as Administrator for delegated service:

If you need service-name rewrite trick:

Then execute as Administrator on DC01 with Kerberos tooling (psexec / wmiexec / smbexec) depending on tool stability in your setup.


Result

  • Pivoted into internal network (192.168.100.0/24) via Ligolo

  • Gained Administrator on WEB01 via RBCD

  • Extracted credentials, pivoted to a.white then a.white_adm

  • Completed constrained delegation abuse path to obtain high-privileged Kerberos tickets

Last updated