To understand why Keberoasting works, one must first understand the basics of Kerberos.
Kerberos is an authentication protocol that lets users and services (such as apps, databases and servers) securely authenticate and communicate within Active Directory and other domains.
The Kerberos authentication process uses a ticketing system. At the heart of this system is the key distribution center (KDC), which operates on the network's domain controller.
The KDC is essentially the gatekeeper of the domain. It authenticates users and services on the network and issues them tickets. Tickets are credentials that prove users’ identities and allow them to access other resources on the network. The users and services exchange these tickets to verify themselves to one another.
When a user logs in to a domain, they first authenticate with the KDC and receive a ticket-granting ticket (TGT). This TGT enables the user to request access to domain services.
When the user wants to access a service, they send a request to the KDC's ticket-granting service (TGS). The TGT accompanies this request to vouch for the user's identity.
In response, the KDC issues a service ticket, also called a "TGS ticket," which is encrypted using the service account password. This happens to ensure that only the target service can validate the user’s access request. The user presents this service ticket to the target service, which authenticates the user and begins a secure session.
There are a few details of Kerberos’s design that leave it open to Kerberoasting.
First, the KDC does not check whether users are authorized to access a service. Any user can request a ticket for any service. It is up to the individual services to enforce permissions and block unauthorized users. Therefore, hackers don't need to seize the accounts of domain admins or other privileged users. Any compromised account works.
Second, each service in a Kerberos domain must be associated with a service account that is responsible for running the service on the domain. Service accounts enable Kerberos to authenticate services, issue service tickets and enforce security controls. These accounts also give hackers a target, as they tend to have high privileges.
Third, Kerberos tickets are encrypted, using the associated accounts' password hashes as keys. Importantly for Kerberoasting, service tickets use the password hashes of the relevant service accounts.
Account passwords are convenient symmetric encryption keys because only the KDC and the related service should know that password. But, because tickets are encrypted using password hashes, hackers can reverse-engineer service account passwords by cracking a ticket's encryption.
Additionally, manually configured service accounts often have the “password never expires” flag enabled. In long-standing networks, this can mean that service accounts use very old passwords that follow outdated security guidelines, making them easy to crack.