Kerberoast
MITRE ATT&CK™ Sub-technique T1558.003
Last updated
Was this helpful?
MITRE ATT&CK™ Sub-technique T1558.003
Last updated
Was this helpful?
When asking the KDC (Key Distribution Center) for a Service Ticket (ST), the requesting user needs to send a valid TGT (Ticket Granting Ticket) and the service name (sname
) of the service wanted. If the TGT is valid, and if the service exists, the KDC sends the ST to the requesting user.
Multiple formats are accepted for the sname
field: servicePrincipalName (SPN), sAMAccountName (SAN), userPrincipalName (UPN), etc. (see ).
The ST is encrypted with the requested service account's NT hash. If an attacker has a valid TGT and knows a service (by its SAN or SPN), he can request a ST for this service and crack it offline later in an attempt to retrieve that service account's password.
In most situations, services accounts are machine accounts, which have very complex, long, and random passwords. But if a service account, with a human-defined password, has a SPN set, attackers can request a ST for this service and attempt to crack it offline. This is Kerberoasting.
Unlike , this attack can only be carried out with a prior foothold (valid domain credentials), except in the scenario.
The script (Python) can perform all the necessary steps to request a ST for a service given its SPN (or name) and valid domain credentials.
This can also be achieved with (Python).
Using (Python) it is possible to request an RC4 encrypted ST even when AES encryption is enabled (and if RC4 is still accepted of course). The tool features an -e flag which specifies what encryption type should be requested (default to 23, i.e. RC4). Trying to crack $krb5tgs$23
takes less time than for krb5tgs$18
.
and can then be used to try .
In September 2022, explained how Service Tickets could be obtained through AS-REQ
requests (which are usually used for TGT requests), instead of the usual TGS-REQ
. He demonstrated (and ) how to abuse this in a Kerberoasting scenario.
If an attacker knows of an account for which pre-authentication isn't required (i.e. an account), as well as one (or multiple) service accounts to target, a Kerberoast attack can be attempted without having to control any Active Directory account (since pre-authentication won't be required).
The script (Python) can perform all the necessary steps to request a ST for a service given its SPN (or name) and valid domain credentials.
At the time of writing, Sept. 28th 2022, adding the -no-preauth
option for GetUserSPNs.py
is pending.
(C#) can be used for that purpose.
At the time of writing, Sept. 28th 2022, adding the /nopreauth
option for Rubeus' kerberoast
command is pending.
If an attacker controls an account with the rights to add an SPN to another (, ), it can be abused to make that other account vulnerable to Kerberoast (see ).
Controlling a member of the group, targeted Kerberoasting can be conducted for the whole domain (see ).