Overview
impacket-GetUserSPNs performs Kerberoasting by enumerating user accounts with Service Principal Names (SPNs) and requesting their TGS tickets. These tickets are encrypted with the service account’s password hash and can be cracked offline.
Authentication
With Password
With NTLM Hash
With Kerberos
-k, provide -dc-host with the FQDN instead of -dc-ip.
Enumerate SPN Accounts
List all user accounts that have SPNs set (without requesting tickets):Request TGS Tickets
Request All
Request for Specific User
Output Format for Cracking
Save to File
Request Specific User and Save
$krb5tgs$23$*...).
Cracking with Hashcat and John
Hashcat
RC4 (most common):| Hash Mode | Encryption Type |
|---|---|
13100 | Kerberos 5 TGS-REP etype 23 (RC4) |
19600 | Kerberos 5 TGS-REP etype 17 (AES128) |
19700 | Kerberos 5 TGS-REP etype 18 (AES256) |
John the Ripper
Kerberos Authentication
Use an existing TGT to Kerberoast without sending NTLM traffic:No Preauth Enumeration
If you find accounts with Kerberos pre-authentication disabled, you can request their AS-REP hashes without credentials. For that specific attack, useimpacket-GetNPUsers instead.
However, GetUserSPNs can be combined with accounts that have SPNs but no preauth:
Quick Reference
| Flag | Description |
|---|---|
-request | Request TGS tickets for all SPN accounts |
-request-user USER | Request TGS for a specific user |
-outputfile FILE | Save tickets to file |
-hashes LMHASH:NTHASH | Authenticate with NTLM hash |
-aesKey KEY | Authenticate with AES key |
-dc-ip IP | Domain controller IP address |
-dc-host HOST | Domain controller hostname (for Kerberos auth) |
-k | Use Kerberos authentication |
-no-pass | Don’t ask for password |
-usersfile FILE | File with target usernames (one per line) |