Solution
Context and Objective
The challenge provides an LDAP dump of an Active Directory environment, exported in JSON format using ldap2json.
The goal is to identify a Kerberoastable user account, meaning:
A user account that owns a Service Principal Name (SPN), allowing an attacker to request a Ticket Granting Service (TGS) and perform a Kerberoasting attack.
The analysis is fully static: no interaction with the Domain Controller is required.
Kerberoasting – Theory Reminder
Kerberoasting is a post-exploitation technique T1558.003 in Active Directory where an attacker abuses normal Kerberos behavior to obtain crackable material.
In Kerberos:
- A SPN (Service Principal Name) identifies a service account
- Any authenticated domain user can request a TGS for that SPN
- The returned TGS is encrypted with the target service account key (derived from its password)
- If this service account is a regular user account with a weak password, the ticket can be cracked offline to recover the plaintext password
Typical Kerberoasting flow:
- Enumerate accounts that have
servicePrincipalName - Request TGS tickets for those SPNs
- Export the ticket material
- Crack it offline (wordlist/rules)
- Reuse recovered credentials for lateral movement/privilege escalation
Because the attack is mostly offline after ticket retrieval, it can be stealthy and does not require continuous interaction with the domain controller.
A user is Kerberoastable if:
- it is of type
user - it has a
servicePrincipalName - the account is enabled
- it is neither a machine account nor
krbtgt
Installation / Tools
Tools used:
jq– JSON parsing and filtering- LDAP dump generated with
ldap2json
No offensive tooling (Rubeus, Impacket, etc.) is required.
LDAP Dump Structure Analysis
The JSON file is not a flat list, but a full LDAP tree:
- Domain
- Containers (
CN=Users,OU=...) - User, group and computer objects
A recursive traversal of the JSON structure is therefore required.
Extracting Accounts with SPNs
First step: identify all objects containing a servicePrincipalName.
| |
This is the result :
| |
We can directly see that the only user account is a.newton, because krbtgtis the Kerberos system account, and DC01$ is the machine account and passwords are automatically managed.
We can then confirm that this account works, and display his email using the following jq command:
| |
It gives us the following result :
| |
CONCLUSION
The conditions for a user to be Kerberoastable are :
UAC (UserAccountControl)
512 → standard enabled user account
66048 → enabled user account with non-expiring password
These values exclude:
- disabled accounts
- machine accounts
- system accounts
The email of the Kerberoastable account is then alexandria.newton@rootme.local.