ActiveDirectoryHackTheBoxWindows

TombWatcher

Windows AD box chaining WriteSPN Kerberoasting, GMSA password abuse, and a multi-step ACL takeover to reach WinRM, then ESC15 certificate abuse after recovering a deleted user from the AD Recycle Bin

Difficulty: Medium OS: Windows Domain: tombwatcher.htb DC: DC01.tombwatcher.htb (10.129.3.20)


Overview

TombWatcher is a Windows Active Directory machine that chains together several classic and modern AD attack techniques: Kerberoasting after writing an SPN, GMSA password abuse, ACL-chain exploitation to escalate across users, AD Recycle Bin object recovery, and finally ESC15 (CVE-2024-49019) ADCS abuse to gain Domain Admin.

Attack Path Summary:


Enumeration

Nmap

The scan reveals a standard Windows Domain Controller

Key findings from the scan:

  • Domain: tombwatcher.htb

  • Hostname: DC01.tombwatcher.htb

  • SMB Signing: Enabled and required (relay attacks not viable)

  • Clock skew: ~4 hours — important to account for when using Kerberos tools (faketime or ntpdate needed)

SMB Enumeration with NetExec

Using initial credentials henry:H3nry_987TGV!

Henry has read access to IPC$, NETLOGON, and SYSVOL — standard for domain users, no unusual shares.

RID Brute-Forcing — User Enumeration

Discovered domain users and groups:

RID
Account

500

Administrator

1103

Henry

1104

Alfred

1105

sam

1106

john

1107

Infrastructure (Group)

1108

ansible_dev$ (GMSA account)

The $ suffix on ansible_dev$ immediately signals a Group Managed Service Account (GMSA) — a high-value target if we can read its managed password.


BloodHound ACL Analysis

Running BloodHound against the domain reveals the full attack path:

This means:

  1. Henry has WriteSPN on Alfred → enables targeted Kerberoasting

  2. Alfred can add himself to Infrastructure group

  3. Infrastructure group can read ansible_dev$'s GMSA password

  4. ansible_dev$ has ForceChangePassword over sam

  5. sam has WriteOwner over john → can get GenericAll → change john's password


Initial Access — Kerberoasting Alfred

Step 1: Write a Fake SPN onto Alfred

Henry's WriteSPN privilege on Alfred allows us to set an arbitrary Service Principal Name, making Alfred Kerberoastable:

Step 2: Request and Crack Alfred's TGS

A Kerberos TGS-REP hash is returned for Alfred ->Crack with Hashcat (mode 13100 = Kerberos 5 TGS-REP etype 23)

Cracked password: basketball


Lateral Movement via ACL Chain

Step 3: Alfred Adds Himself to Infrastructure Group

The BloodHound graph showed Alfred has AddSelf rights on the Infrastructure group, meaning he can add himself as a member:

Step 4: Read ansible_dev$ GMSA Password

Infrastructure group members have ReadGMSAPassword rights on ansible_dev$. The GMSA password is stored in the AD attribute msDS-ManagedPassword:

Verify the hash works:

Step 5: Force Change sam's Password

ansible_dev$ has ForceChangePassword over sam:

Step 6: Abuse sam's WriteOwner on john

With WriteOwner, sam can take ownership of john's object and then grant himself full control:


User Flag

John is a member of the Remote Management Users group, allowing WinRM access:


Privilege Escalation — ESC15 (CVE-2024-49019)

Step 7: Enumerate Writable Objects as John

John has full write control over the OU=ADCS organizational unit — this is unusual and very significant.

Step 8: Discover Deleted Users via AD Recycle Bin

The AD Recycle Bin is enabled on this domain. Check for deleted objects in the ADCS OU:

Three deleted cert_admin user objects are found, all with LastKnownParent: OU=ADCS,DC=tombwatcher,DC=htb:

GUID
SID RID

f80369c8-96a2-4a7f-a56c-9c15edd7d1e3

1109

c1f1f0fe-df9c-494c-bf05-0679e181b358

1110

938182c3-bf0b-410a-9aaa-45c8e1a02ebf

1111

The third object (SID ending -1111) is noteworthy — earlier, Certipy failed to look up SID ...2126982587-1111, suggesting this is the one the CA was configured for.

Step 9: Restore cert_admin from Recycle Bin

Since john has write/create-child rights on the ADCS OU, we can restore the deleted objects back into it:

Confirm restoration:

The -1111 SID cert_admin is now live again in the ADCS OU.

Step 10: Set cert_admin's Password

John has write control over the ADCS OU (and objects within it):

Step 11: Find the Vulnerable Certificate Template (ESC15)

Certipy identifies the WebServer template as vulnerable to ESC15:

ESC15 (CVE-2024-49019) affects Certificate Templates with Schema Version 1 where the enrollee supplies the subject. Because Schema V1 templates don't enforce Extended Key Usage (EKU) restrictions at issuance time the same way V2+ do, an attacker can inject an arbitrary UPN (like [email protected]) AND request Client Authentication capability via the -application-policies flag — bypassing the template's intended Server Authentication-only EKU.

Step 12: Request a Certificate as Administrator

Step 13: Authenticate via Certificate to LDAP Shell

Step 14: Get the Root Flag

John is now a Domain Admin. Connect via WinRM and retrieve the root flag:


Techniques & CVEs Reference

Technique
Tool
Description

WriteSPN → Kerberoast

bloodyAD, GetUserSPNs

Add fake SPN to target, then request crackable TGS

GMSA Password Read

bloodyAD

Read msDS-ManagedPassword via group membership

ACL Abuse Chain

bloodyAD

WriteOwner → GenericAll → password change

AD Recycle Bin Recovery

PowerShell

Restore deleted privileged user objects

ESC15 / CVE-2024-49019

Certipy

Schema V1 template with enrollee-supplied subject and injected Client Auth EKU


Credentials Recovered

User
Password / Hash

henry

H3nry_987TGV!

alfred

basketball

ansible_dev$

NT: 838b2bd83fbe39901be3713e8c79ce37

sam

Test123! (forced)

john

Test123! (forced)

cert_admin

Test123! (forced)

Last updated