AS-REQ
2. In Kerberos, there are two commonly encountered user key encryption types - AES and RC4. AES derives a separate key from the password using a KDF and salt. RC4 uses the NT hash directly as its key. AES is preferred today; RC4 remains mainly for compatibility.
1. Client sends AS-REQ containing username and pre-authentication data.
In AD Kerberos, pre-authentication data is usually an encrypted timestamp.
The client gets the current time and encrypts it using a key derived from the user’s password. It puts that encrypted timestamp inside the AS-REQ.
6. TGT (Ticket granting ticket) is send as it's the primary ticket used later by the user to ask for any other tickets like TGS.
Client TGS session key is a temporary symmetric key shared between the client and the TGS. The client receives it encrypted with the user’s password-derived key, so only the legitimate client can decrypt it.
3. If pre-authentication is enabled (normal/default), the KDC requires this encrypted timestamp before issuing the TGT.
If pre-authentication is disabled, the client can send an AS-REQ containing essentially just the username, and the KDC will return an AS-REP without requiring proof of the password first. This enables AS-REP roasting.
8. The request contains the TGT plus an authenticator, which is encrypted using the client–TGS session key.
Authenticator hold the client's username and a timestamp so it's very similar to the pre-auth.
TGS-REQ
7. After receiving the TGT, the client wants access to a service, e.g. a file server.
It sends a TGS-REQ (Ticket Granting Service Request) to the KDC’s TGS.
AP-REQ
12. Now the client has the ST (Service Ticket) and client–server session key. It sends an AP-REQ (Application Request) directly to the target service/server.
10. The TGS-REP contains the service ticket (ST) and a client–server session key.
The ST contains the client’s identity, such as the username, validity information such as when the ticket becomes valid and expires, and the client–server session key.
The entire ST is encrypted with the target server’s Kerberos key, meaning the client cannot read or modify it. This prevents the client from forging claims about its identity, permissions, or ticket validity.
The same client–server session key inside the ST is also provided separately to the client, encrypted with the existing client–TGS session key, because the client needs its own copy of the CSSK to later authenticate securely to the target service.
11. It's important to note that client–TGS session key and client–server session key are two different things!
The client–TGS session key is specifically shared between the client and TGS, while client–server session key is specifically shared between the client and the target service.
Finish
14. At this point the server decrypts the ST using its own Kerberos key, obtains the session key, then decrypts the authenticator and verifies the client. If valid, authentication succeeds.
13. The AP-REQ contains the ST plus a new authenticator, encrypted with the client–server session key.
16. The AP-REP contains a response confirming the server received and verified the client’s authenticator. More precisely, it contains the authenticator’s timestamp incremented by 1ms.
The server encrypts this AP-REP using the client–server session key.
17. The client decrypts it using its copy of the client–server session key. If the timestamp matches what it expects, the client knows the server successfully decrypted the ST and therefore possesses the correct server key.
AS-REP
4. The KDC verifies the user’s pre-authentication data. The KDC has the corresponding key for that user account, so if pre-auth is enabled it decrypts the timestamp and checks that it’s valid and recent. If verification succeeds, the KDC authenticates the user.
5. The KDC has two main logical services:
AS (Authentication Service) → authenticates the user and issues the TGT.
TGS (Ticket Granting Service) → accepts the TGT and issues service tickets for things like file servers.
TGS-REP
9.
The TGS decrypts the TGT using the krbtgt key and obtains the client–TGS session key. It then uses that session key to decrypt the authenticator and verifies the client’s identity and timestamp. If everything is valid, the TGS creates a service ticket for the requested server and generates a new client–server session key.
AP-REP
15. Optionally, if mutual authentication is requested, the server sends an AP-REP back to the client proving, that the server successfully decrypted the ST and possesses the same client–server session key.
Example of a Ticket Granting Ticket
Client: jen @ CORP.COM Server: krbtgt/CORP.COM @ CORP.COM KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96 Ticket Flags 0x40e10000 -> forwardable renewable initial pre_authent name_canonicalize Start Time: 2/27/2023 5:27:28 (local) End Time: 2/27/2023 15:27:28 (local) Renew Time: 3/6/2023 5:27:28 (local) Session Key Type: RSADSI RC4-HMAC(NT) Cache Flags: 0x1 -> PRIMARY Kdc Called: DC1.corp.com
Example of a Service Ticket
Client: jen @ CORP.COM Server: cifs/files04 @ CORP.COM KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96 Ticket Flags 0x40a10000 -> forwardable renewable pre_authent name_canonicalize Start Time: 2/27/2023 5:27:28 (local) End Time: 2/27/2023 15:27:28 (local) Renew Time: 3/6/2023 5:27:28 (local) Session Key Type: AES-256-CTS-HMAC-SHA1-96 Cache Flags: 0 Kdc Called: DC1.corp.com
Service Server
KDC
KDC
This is where the AS-REP roasting happens!
This is where the Kerberoasting happens!