Kerberos
Slide deck 19. Kerberos threats, the version 4 dialogue with AS and TGS, realms, and the version 5 exchanges.
Kerberos basicsSearch on YouTube
ThreatsSearch on YouTube
Users wish to access services on servers across a network. Three threats exist:
| Threat | Example |
|---|---|
| A user pretends to be another user | An attacker logs on with the identity of another user |
| A user alters the network address of a workstation | Requests from the attacker look as if they come from another workstation |
| A user eavesdrops on exchanges and uses a replay attack | The attacker records an exchange and sends it again later |
Kerberos propertiesSearch on YouTube
- Kerberos provides a centralized authentication server. It authenticates users to servers and servers to users.
- Kerberos relies on conventional (symmetric) encryption. It makes no use of public-key encryption.
- There are two versions: version 4 and version 5.
- Version 4 uses DES.
A good exam opener: "Kerberos is a centralized authentication service. It uses only symmetric encryption (DES in version 4)." Then give the three threats.
NotationSearch on YouTube
| Symbol | Meaning |
|---|---|
| Client | |
| Authentication server | |
| Server | |
| Identifier of the user on | |
| Identifier of | |
| Password of the user on | |
| Network address of | |
| Secret encryption key shared by and | |
| Timestamp | |
| Concatenation |
The version 4 tables also use these keys. is the key derived from the password of the user. is the key shared by the AS and the TGS. and are session keys.
Kerberos version 4Search on YouTube
Simple authentication dialogueSearch on YouTube
The slides start with a simple dialogue:
Only the AS and know , so the client cannot change the ticket. This dialogue has two problems. The password goes over the network in clear in message 1. Also, the user must enter the password for each new service.
Ticket lifetime problemSearch on YouTube
The real version 4 dialogue uses a ticket-granting ticket that the client reuses. The lifetime of this ticket causes a problem:
- If the lifetime is too short, the system repeatedly asks the user for the password.
- If the lifetime is too long, an opponent has a greater opportunity to replay the ticket.
The threat is that an opponent steals the ticket and uses it before it expires.
A ticket is like a day pass. A short pass makes you queue again and again. A long pass is more useful to a thief.
AS, tickets and TGSSearch on YouTube
Version 4 uses DES to provide the authentication service.
Authentication server (AS):
- The AS knows the passwords of all users and stores them in a centralized database.
- The AS shares a unique secret key with each server.
Ticket:
- The AS creates a ticket after it accepts the user as authentic.
- The ticket contains the ID of the user, the network address of the user and the ID of the server.
- The ticket is encrypted with the secret key shared by the AS and the server.
Ticket-granting server (TGS):
- The TGS issues tickets to users who have been authenticated to the AS.
- For each new service, the client applies to the TGS and uses its ticket for authentication.
- The TGS then grants a ticket for that service.
- The client saves each service-granting ticket. It uses the ticket each time the user requests that service.
Version 4 message exchangesSearch on YouTube
Table 15.1 and Figure 15.2 show three exchanges with six messages.
(a) Authentication service exchange, to get a ticket-granting ticket:
The AS encrypts message 2 with , the key derived from the password. Only a user who knows the password can decrypt it. The password itself does not go over the network.
(b) Ticket-granting service exchange, to get a service-granting ticket:
The TGS decrypts the ticket and gets . Then it decrypts the authenticator. and must match in the ticket and the authenticator, and must be recent.
(c) Client/server authentication exchange, to get the service:
In message 6, returns under . Only a server that can decrypt the ticket knows . Thus the client knows the server is genuine.
The order is AS, TGS, V. Message 1 is sent once per logon session. Message 3 is sent once per type of service. Message 5 is sent once per service session.
A ticket can be reused, but an authenticator cannot. A stolen ticket is not sufficient, because the thief cannot make a new authenticator without the session key.
Overview of KerberosSearch on YouTube
The overview figure gives the same exchanges in six steps:
- The user logs on to the workstation and requests service on the host.
- The AS verifies the access right of the user in the database. It creates a ticket-granting ticket and a session key. It encrypts the results with a key derived from the password of the user.
- The workstation prompts the user for the password and uses it to decrypt the incoming message. Then it sends the ticket and an authenticator to the TGS. The authenticator contains the name of the user, the network address and the time.
- The TGS decrypts the ticket and the authenticator, verifies the request, then creates a ticket for the requested server.
- The workstation sends the ticket and the authenticator to the server.
- The server verifies that the ticket and the authenticator match, then grants access to the service. If mutual authentication is necessary, the server returns an authenticator.
Kerberos realmsSearch on YouTube
Full-service environmentSearch on YouTube
A full-service Kerberos environment has a Kerberos server, a number of clients and a number of application servers. It requires that:
- The Kerberos server has the user ID and hashed password of all participating users in its database. All users are registered with the Kerberos server.
- The Kerberos server shares a secret key with each server. All servers are registered with the Kerberos server.
- The Kerberos server in each interoperating realm shares a secret key with the server in the other realm. The two Kerberos servers are registered with each other.
Kerberos realmSearch on YouTube
A Kerberos realm is a set of managed nodes that share the same Kerberos database.
- The database is on the Kerberos master computer system. Keep this system in a physically secure room.
- A read-only copy of the database can also be on other Kerberos computer systems.
- All changes to the database must be made on the master computer system.
- To change or access the database, you must have the Kerberos master password.
Request in another realmSearch on YouTube
A client in realm A gets a service from a server in realm B in seven steps:
- The client requests a ticket for the local TGS from the AS in realm A.
- The AS sends a ticket for the local TGS.
- The client requests a ticket for the remote TGS from the local TGS.
- The local TGS sends a ticket for the remote TGS.
- The client requests a ticket for the remote server from the TGS in realm B.
- The remote TGS sends a ticket for the remote server.
- The client requests the remote service from the server in realm B.
The remote TGS accepts the ticket from step 4 because the two Kerberos servers share a secret key.
Kerberos version 5Search on YouTube
Differences from version 4Search on YouTube
The slides list five areas where version 5 changes version 4:
| Area | Version 4 | Version 5 |
|---|---|---|
| Encryption system dependence | Uses only DES | Ciphertext has an encryption type identifier, so any algorithm can be used |
| Internet protocol dependence | Uses only IP addresses | Network addresses have a type and length tag |
| Ticket lifetime | 8-bit field in units of 5 minutes, maximum minutes (about 21 hours) | Explicit start time and end time |
| Authentication forwarding | Not possible | A server can use the credentials of a client to access another server |
| Interrealm authentication | Each pair of realms needs a key, so realms need relationships | Needs fewer relationships |
Version 5 message exchangesSearch on YouTube
Table 15.3 shows the version 5 exchanges.
(a) Authentication service exchange:
(b) Ticket-granting service exchange:
(c) Client/server authentication exchange:
| New element in version 5 | Purpose |
|---|---|
| The client asks for flags in the ticket | |
| , , | Give the realm of each party |
| The client asks for start, end and renew times | |
| , | Random values that the reply repeats, so the client knows the reply is fresh |
| Give the permitted use of the ticket | |
| , | Optional session subkey and start sequence number for the session |
Kerberos in practiceSearch on YouTube
- At the time of the slides, there were two versions in use. Version 4 is restricted to a single realm. Version 5 allows inter-realm authentication and was in beta test.
- Kerberos version 5 is an Internet standard, specified in RFC 1510. Many utilities use it.
- To use Kerberos, you must have a KDC on your network. You must also have Kerberised applications on all participating systems.
- The major problem was US export restrictions. Kerberos could not be distributed outside the US directly in source format.
- Binary versions had to hide the entry points of the crypto routines and have no encryption. Otherwise, users had to reimplement the crypto libraries locally.
Quick self-testSearch on YouTube
Give the three threats that Kerberos addresses.
A user pretends to be another user. A user alters the network address of a workstation. A user eavesdrops on exchanges and uses a replay attack.
Which type of encryption does Kerberos use?
Conventional (symmetric) encryption only. It makes no use of public-key encryption. Version 4 uses DES.
Write the simple authentication dialogue and give its problems.
(1) : . (2) : . (3) : , with . The password goes in clear, and the user must enter the password for each new service.
Why is the lifetime of the ticket-granting ticket a problem?
If the lifetime is too short, the system repeatedly asks for the password. If it is too long, an opponent has more time to steal the ticket and replay it before it expires.
Write messages 1 to 6 of Kerberos version 4.
(1) . (2) . (3) . (4) . (5) . (6) .
Why does a stolen ticket not let an attacker get a service?
Each request also needs a new authenticator encrypted with the session key. The authenticator has a recent timestamp and must match and in the ticket. The attacker does not know the session key.
What is a Kerberos realm?
A set of managed nodes that share the same Kerberos database. The database is on a master system in a physically secure room. All changes are made on the master and need the Kerberos master password.
Give the seven steps of a request for service in another realm.
Request and get a ticket for the local TGS. Request and get a ticket for the remote TGS. Request and get a ticket for the remote server from the remote TGS. Request the remote service.
Give the five areas where version 5 differs from version 4.
Encryption system dependence, Internet protocol dependence, ticket lifetime, authentication forwarding and interrealm authentication.
What do you need to use Kerberos?
A KDC on your network, and Kerberised applications on all participating systems.
- Kerberos is a centralized authentication service that uses only symmetric encryption. It addresses impersonation, address change and replay.
- Version 4 has three exchanges: AS (ticket-granting ticket), TGS (service-granting ticket) and client/server. Message 6, , gives mutual authentication.
- Tickets are reusable until they expire. Authenticators are new for each use and stop replay of a stolen ticket.
- A realm shares one Kerberos database. Kerberos servers in two realms share a key, so a client can get a service in another realm in seven steps.
- Version 5 removes the DES and IP dependence and adds explicit ticket times, forwarding, better interrealm authentication, nonces, flags and subkeys.
Taming Kerberos - Computerphile
Kerberos Explained (Animated)
5 Minute Cyber: How Kerberos Authentication Works