Top Banner
Chair of Network Architectures and Services Department of Informatics Technical University of Munich Network Security (NetSec) IN2101 – WS 19/20 Prof. Dr.-Ing. Georg Carle Dr. Holger Kinkelin Jonas Jelten Richard von Seck Johannes Schleger Chair of Network Architectures and Services Department of Informatics Technical University of Munich
50

Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Aug 04, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Chair of Network Architectures and ServicesDepartment of InformaticsTechnical University of Munich

Network Security (NetSec)

IN2101 – WS 19/20

Prof. Dr.-Ing. Georg Carle

Dr. Holger KinkelinJonas Jelten

Richard von SeckJohannes Schleger

Chair of Network Architectures and ServicesDepartment of Informatics

Technical University of Munich

Page 2: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Chapter 13: Kerberos and other Frameworks for Client Authentication

Introduction

Design Options for Client Authentication Frameworks

Kerberos

Chapter 13: Kerberos and other Frameworks for Client Authentication 13-1

Page 3: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Chapter 13: Kerberos and other Frameworks for Client Authentication

Explanation Pony

• Slides called "Explanation" and usually marked with are not for the lecture, but they contain furtherexplanations for your learning at home.

Chapter 13: Kerberos and other Frameworks for Client Authentication 13-2

Page 4: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Chapter 13: Kerberos and other Frameworks for Client Authentication

Introduction

Design Options for Client Authentication Frameworks

Kerberos

Chapter 13: Kerberos and other Frameworks for Client Authentication 13-3

Page 5: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Introduction

• Focus of this chapter: User Authentication

• Authenticate a user towards a ...• ... payment system to protect against unauthorized payments• ... room/door lock to protect a room against physical access• ... service in the network to protect against unauthorized service usage/data access...

Chapter 13: Kerberos and other Frameworks for Client Authentication — Introduction 13-4

Page 6: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Introduction

• Focus of this chapter: User Authentication

• Authenticate a user towards a ...• ... payment system to protect against unauthorized payments• ... room/door lock to protect a room against physical access• ... service in the network to protect against unauthorized service usage/data access...← Important for us!

Chapter 13: Kerberos and other Frameworks for Client Authentication — Introduction 13-4

Page 7: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Login to Services on the Local Network

• User Authentication typically works with• Username• Credential

• A credentials is• Usually a secret shared between user and service, e.g., a "password" or key derived from a password• Less frequently used (due to costs): asymmetric key used in some challenge/response protocol

• Taxonomy of credentials/authentication factors:• Password→ Knowledge-based authentication• (Smart card with) symmetric/asymmetric key→ Possession/token-based authentication• Biometric features→ Information derived from something the user is/does

• Multi-factor authentication• Multiple (different) authentication factors get combined• Example: username/password + OTP (One Time Password) generator• Benefit: Multiple lines of defense make attack more complicated, however not impossible.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Introduction 13-5

Page 8: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Login to Services on the Local Network

• User Authentication typically works with• Username• Credential

• A credentials is• Usually a secret shared between user and service, e.g., a "password" or key derived from a password• Less frequently used (due to costs): asymmetric key used in some challenge/response protocol

• Taxonomy of credentials/authentication factors:• Password→ Knowledge-based authentication• (Smart card with) symmetric/asymmetric key→ Possession/token-based authentication• Biometric features→ Information derived from something the user is/does

• Multi-factor authentication• Multiple (different) authentication factors get combined• Example: username/password + OTP (One Time Password) generator• Benefit: Multiple lines of defense make attack more complicated, however not impossible.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Introduction 13-5

Page 9: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Login to Services on the Local Network

• User Authentication typically works with• Username• Credential

• A credentials is• Usually a secret shared between user and service, e.g., a "password" or key derived from a password• Less frequently used (due to costs): asymmetric key used in some challenge/response protocol

• Taxonomy of credentials/authentication factors:• Password→ Knowledge-based authentication• (Smart card with) symmetric/asymmetric key→ Possession/token-based authentication• Biometric features→ Information derived from something the user is/does

• Multi-factor authentication• Multiple (different) authentication factors get combined• Example: username/password + OTP (One Time Password) generator• Benefit: Multiple lines of defense make attack more complicated, however not impossible.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Introduction 13-5

Page 10: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Login to Services on the Local Network

• User Authentication typically works with• Username• Credential

• A credentials is• Usually a secret shared between user and service, e.g., a "password" or key derived from a password• Less frequently used (due to costs): asymmetric key used in some challenge/response protocol

• Taxonomy of credentials/authentication factors:• Password→ Knowledge-based authentication• (Smart card with) symmetric/asymmetric key→ Possession/token-based authentication• Biometric features→ Information derived from something the user is/does

• Multi-factor authentication• Multiple (different) authentication factors get combined• Example: username/password + OTP (One Time Password) generator• Benefit: Multiple lines of defense make attack more complicated, however not impossible.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Introduction 13-5

Page 11: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Chapter 13: Kerberos and other Frameworks for Client Authentication

Introduction

Design Options for Client Authentication Frameworks

Kerberos

Chapter 13: Kerberos and other Frameworks for Client Authentication 13-6

Page 12: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Assumptions

• We focus on authentication to services in (local) networks

• User needs to prove her identity to service

• User utilizes a client to interact with the service

• "Client" is often used for user + client

• We usually assume the use of symmetric cryptography

Chapter 13: Kerberos and other Frameworks for Client Authentication — Design Options for Client Authentication Frameworks 13-7

Page 13: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Authenticating to a Server

Client (A) Server (S1)

User name and Password (protected in some form)

• A user has accounts at each of the servers it uses.• Each server has a user database and operates as authentication server.• Disadvantages:

• Key management is hard• Large number of passwords (or password reuse issues)• User needs to authenticate to each service individually

• Note:• This is what we typically use in the Internet: different accounts at different services• Never use the same username/password combination with different services!!

Chapter 13: Kerberos and other Frameworks for Client Authentication — Design Options for Client Authentication Frameworks 13-8

Page 14: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Authenticating to a Server

Client (A) Server (S1)

User name and Password (protected in some form)

• A user has accounts at each of the servers it uses.• Each server has a user database and operates as authentication server.• Disadvantages:

• Key management is hard• Large number of passwords (or password reuse issues)• User needs to authenticate to each service individually

• Note:• This is what we typically use in the Internet: different accounts at different services• Never use the same username/password combination with different services!!

Chapter 13: Kerberos and other Frameworks for Client Authentication — Design Options for Client Authentication Frameworks 13-8

Page 15: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Authenticating to a Server with Authentication Server

Client (A) Server (S1)

Authentication Server (AS)

User name and Password (protected in some form)

User name and Password (protected in some form)

• Better alternative (for corporate scenarios): Use a central Authentication Server (AS).• Authentication of user (represented by his client) to server involves participation of the AS.• Advantages:

• User only needs one account with the AS• Only AS needs user database→ simplified user management

• Disadvantages:• AS is single point of failure / attack; hence this service must be especially protected/hardened!• User’s password is also a single point of failure / attack...

Chapter 13: Kerberos and other Frameworks for Client Authentication — Design Options for Client Authentication Frameworks 13-9

Page 16: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Options for Authentication with external AS

• S1 uses the credentials provided by A to run a cryptographic protocol with AS.• Common practice for authentication within one infrastructure.• Example: SSH remote login to work stations with LDAP-managed accounts, also local login

• Alternative (better): End-to-end Authentication between A and AS. S1 relays messages and AS informsS1 about outcome (ACCEPT / DENY).• Often found in more public infrastructures• Link Layer Access: Extensible Authentication Protocol (EAP; "WPA2 Enterprise"), ...• Example: Eduroam

• Alternative (better): A runs protocol with AS, interaction results in information A and S1 can use tomutually authenticate.• Can happen before A and S1 interact or in-between.• A receives "ticket" that proves her identity to S1• Example: SSH remote login to work stations with Kerberos ticket• Alternative example: "Login with Twitter/Facebook/Google", typically realized with OAuth

(also OpenID, Shibboleth, etc.)• Further benefit: suitable to realize single-sign-on (SSO) systems

Chapter 13: Kerberos and other Frameworks for Client Authentication — Design Options for Client Authentication Frameworks 13-10

Page 17: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Options for Authentication with external AS

• S1 uses the credentials provided by A to run a cryptographic protocol with AS.• Common practice for authentication within one infrastructure.• Example: SSH remote login to work stations with LDAP-managed accounts, also local login

• Alternative (better): End-to-end Authentication between A and AS. S1 relays messages and AS informsS1 about outcome (ACCEPT / DENY).• Often found in more public infrastructures• Link Layer Access: Extensible Authentication Protocol (EAP; "WPA2 Enterprise"), ...• Example: Eduroam

• Alternative (better): A runs protocol with AS, interaction results in information A and S1 can use tomutually authenticate.• Can happen before A and S1 interact or in-between.• A receives "ticket" that proves her identity to S1• Example: SSH remote login to work stations with Kerberos ticket• Alternative example: "Login with Twitter/Facebook/Google", typically realized with OAuth

(also OpenID, Shibboleth, etc.)• Further benefit: suitable to realize single-sign-on (SSO) systems

Chapter 13: Kerberos and other Frameworks for Client Authentication — Design Options for Client Authentication Frameworks 13-10

Page 18: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Options for Authentication with external AS

• S1 uses the credentials provided by A to run a cryptographic protocol with AS.• Common practice for authentication within one infrastructure.• Example: SSH remote login to work stations with LDAP-managed accounts, also local login

• Alternative (better): End-to-end Authentication between A and AS. S1 relays messages and AS informsS1 about outcome (ACCEPT / DENY).• Often found in more public infrastructures• Link Layer Access: Extensible Authentication Protocol (EAP; "WPA2 Enterprise"), ...• Example: Eduroam

• Alternative (better): A runs protocol with AS, interaction results in information A and S1 can use tomutually authenticate.• Can happen before A and S1 interact or in-between.• A receives "ticket" that proves her identity to S1• Example: SSH remote login to work stations with Kerberos ticket• Alternative example: "Login with Twitter/Facebook/Google", typically realized with OAuth

(also OpenID, Shibboleth, etc.)• Further benefit: suitable to realize single-sign-on (SSO) systems

Chapter 13: Kerberos and other Frameworks for Client Authentication — Design Options for Client Authentication Frameworks 13-10

Page 19: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Chapter 13: Kerberos and other Frameworks for Client Authentication

Introduction

Design Options for Client Authentication Frameworks

Kerberos

Chapter 13: Kerberos and other Frameworks for Client Authentication 13-11

Page 20: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

KerberosIntroduction

• Kerberos is an authentication and access control service for worksta-tion clusters

• Kerberos acts as trusted third party key distribution service• Principals share symmetric master key with Kerberos• Once the principal logs on to her workstation (username/password), she

gets authenticated by Kerberos• Once the principal wants to use a service, Kerberos delivers a symmetric

session key that authenticates principal to service; principal doesn’t needto enter username/password again

→ Single sign on service

• Designed at the MIT during the late 1980s

• Current version is 5

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-12

Page 21: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

KerberosDesign goals

• Security• Eavesdroppers or active attackers should not be able to obtain the necessary information to impersonate a user

when accessing a service

• Reliability• Every use of a service requires prior authentication• Thus Kerberos should be highly reliable and available

• Transparency• The authentication process should be transparent• The user should only witness the requirement to enter a password

• Scaleability• The system should be able to support a large number of clients and servers

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-13

Page 22: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

KerberosDesign goals

• Security• Eavesdroppers or active attackers should not be able to obtain the necessary information to impersonate a user

when accessing a service

• Reliability• Every use of a service requires prior authentication• Thus Kerberos should be highly reliable and available

• Transparency• The authentication process should be transparent• The user should only witness the requirement to enter a password

• Scaleability• The system should be able to support a large number of clients and servers

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-13

Page 23: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

KerberosDesign goals

• Security• Eavesdroppers or active attackers should not be able to obtain the necessary information to impersonate a user

when accessing a service

• Reliability• Every use of a service requires prior authentication• Thus Kerberos should be highly reliable and available

• Transparency• The authentication process should be transparent• The user should only witness the requirement to enter a password

• Scaleability• The system should be able to support a large number of clients and servers

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-13

Page 24: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

KerberosDesign goals

• Security• Eavesdroppers or active attackers should not be able to obtain the necessary information to impersonate a user

when accessing a service

• Reliability• Every use of a service requires prior authentication• Thus Kerberos should be highly reliable and available

• Transparency• The authentication process should be transparent• The user should only witness the requirement to enter a password

• Scaleability• The system should be able to support a large number of clients and servers

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-13

Page 25: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Concept

Client (A)

Server (S1)

Key Distribution Center (KDC)

Authentication Server (AS)

Ticket Granting Server (TGS)

1. I am Alice, give me a ticket.

2. Key and ticket. Provides Authentication,only Alice can use ticket

3. Here is my ticket, give me a ticket for S1.4. Key and ticket for S1. Provides Authorization,Alice allowed to use S1?

5. Dear S1, here is my ticket and authentication.

6. S1 authenticates.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-14

Page 26: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Concept

Client (A)

Server (S1)

Key Distribution Center (KDC)

Authentication Server (AS)

Ticket Granting Server (TGS)

1. I am Alice, give me a ticket.

2. Key and ticket.

3. Here is my ticket, give me a ticket for S1.4. Key and ticket for S1.

5. Dear S1, here is my ticket and authentication.

6. S1 authenticates.

Kerberos Realm of A, AS, TGS, and S1

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-14

Page 27: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos vs. Needham-Schroeder

• Kerberos is based on the Needham-Schroeder Symmetric Key Protocol• Uses timestamps instead of nonces to guarantee freshness / prevent replay attacks• Requires synchronized clocks on involved machines• Benefits of timestamps over nonces: server only needs to remember last n minutes

• Key Distribution Center• Provides authentication and authorization→ Authentication Server• Stores database of users and their keys, i.e., hashed passwords• Generates and provides tickets and keys for the next steps→ Ticket Granting Server

• Ticket• Binds key to identity and IP address of client• Has limited lifetime• Types: ticket granting ticket (TGT), service granting ticket (SGT)• Are encrypted, see next slide

• Realm• Kerberos operates in organizational realms• Operation is limited to realm• Multi-realm possible if realms cooperate

• Shared Keys and Trust Relationships• A, AS: know each other; have long-term shared master key kAS,A = h(PasswordA )• TGS, AS: know each other, have long-term shared key kAS,TGS• S1, TGS: know each other, have long-term shared key kTGS,S1

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-15

Page 28: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos vs. Needham-Schroeder

• Kerberos is based on the Needham-Schroeder Symmetric Key Protocol• Uses timestamps instead of nonces to guarantee freshness / prevent replay attacks• Requires synchronized clocks on involved machines• Benefits of timestamps over nonces: server only needs to remember last n minutes

• Key Distribution Center• Provides authentication and authorization→ Authentication Server• Stores database of users and their keys, i.e., hashed passwords• Generates and provides tickets and keys for the next steps→ Ticket Granting Server

• Ticket• Binds key to identity and IP address of client• Has limited lifetime• Types: ticket granting ticket (TGT), service granting ticket (SGT)• Are encrypted, see next slide

• Realm• Kerberos operates in organizational realms• Operation is limited to realm• Multi-realm possible if realms cooperate

• Shared Keys and Trust Relationships• A, AS: know each other; have long-term shared master key kAS,A = h(PasswordA )• TGS, AS: know each other, have long-term shared key kAS,TGS• S1, TGS: know each other, have long-term shared key kTGS,S1

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-15

Page 29: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos vs. Needham-Schroeder

• Kerberos is based on the Needham-Schroeder Symmetric Key Protocol• Uses timestamps instead of nonces to guarantee freshness / prevent replay attacks• Requires synchronized clocks on involved machines• Benefits of timestamps over nonces: server only needs to remember last n minutes

• Key Distribution Center• Provides authentication and authorization→ Authentication Server• Stores database of users and their keys, i.e., hashed passwords• Generates and provides tickets and keys for the next steps→ Ticket Granting Server

• Ticket• Binds key to identity and IP address of client• Has limited lifetime• Types: ticket granting ticket (TGT), service granting ticket (SGT)• Are encrypted, see next slide

• Realm• Kerberos operates in organizational realms• Operation is limited to realm• Multi-realm possible if realms cooperate

• Shared Keys and Trust Relationships• A, AS: know each other; have long-term shared master key kAS,A = h(PasswordA )• TGS, AS: know each other, have long-term shared key kAS,TGS• S1, TGS: know each other, have long-term shared key kTGS,S1

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-15

Page 30: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos vs. Needham-Schroeder

• Kerberos is based on the Needham-Schroeder Symmetric Key Protocol• Uses timestamps instead of nonces to guarantee freshness / prevent replay attacks• Requires synchronized clocks on involved machines• Benefits of timestamps over nonces: server only needs to remember last n minutes

• Key Distribution Center• Provides authentication and authorization→ Authentication Server• Stores database of users and their keys, i.e., hashed passwords• Generates and provides tickets and keys for the next steps→ Ticket Granting Server

• Ticket• Binds key to identity and IP address of client• Has limited lifetime• Types: ticket granting ticket (TGT), service granting ticket (SGT)• Are encrypted, see next slide

• Realm• Kerberos operates in organizational realms• Operation is limited to realm• Multi-realm possible if realms cooperate

• Shared Keys and Trust Relationships• A, AS: know each other; have long-term shared master key kAS,A = h(PasswordA )• TGS, AS: know each other, have long-term shared key kAS,TGS• S1, TGS: know each other, have long-term shared key kTGS,S1

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-15

Page 31: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos vs. Needham-Schroeder

• Kerberos is based on the Needham-Schroeder Symmetric Key Protocol• Uses timestamps instead of nonces to guarantee freshness / prevent replay attacks• Requires synchronized clocks on involved machines• Benefits of timestamps over nonces: server only needs to remember last n minutes

• Key Distribution Center• Provides authentication and authorization→ Authentication Server• Stores database of users and their keys, i.e., hashed passwords• Generates and provides tickets and keys for the next steps→ Ticket Granting Server

• Ticket• Binds key to identity and IP address of client• Has limited lifetime• Types: ticket granting ticket (TGT), service granting ticket (SGT)• Are encrypted, see next slide

• Realm• Kerberos operates in organizational realms• Operation is limited to realm• Multi-realm possible if realms cooperate

• Shared Keys and Trust Relationships• A, AS: know each other; have long-term shared master key kAS,A = h(PasswordA )• TGS, AS: know each other, have long-term shared key kAS,TGS• S1, TGS: know each other, have long-term shared key kTGS,S1

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-15

Page 32: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos V4 - ProtocolClient (A)

Server (S1)

Authentication Server (AS)

Ticket Granting Server (TGS)

1. A , tA , TGS, RequestedTicketLifetimeTGS

2. {KA ,TGS , TGS, tAS , LifetimeTicketTGS , TicketTGS}KA ,ASwith TicketTGS = {KA ,TGS , A , AddrA , TGS, tAS , LifetimeTicketTGS}KAS,TGS

3. S1, TicketTGS , AuthenticatorA ,TGS

with AuthenticatorA ,TGS = {A , AddrA , t1A}KA ,TGS

4. {KA ,S1 , S1, tTGS , TicketS1}KA ,TGSwith TicketS1 = {KA ,S1 , A , AddrA , S1, tTGS , LifetimeTicketS1}KTGS,S1

5. TicketS1 , AuthenticatorA ,S1

with AuthenticatorA ,S1 = {A , AddrA , t2A}KA ,S1

6. {t2A + 1}KA ,S1

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-16

Page 33: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos V4 - ProtocolClient (A)

Server (S1)

Authentication Server (AS)

Ticket Granting Server (TGS)

1. A , tA , TGS, RequestedTicketLifetimeTGS

2. {KA ,TGS , TGS, tAS , LifetimeTicketTGS , TicketTGS}KA ,ASwith TicketTGS = {KA ,TGS , A , AddrA , TGS, tAS , LifetimeTicketTGS}KAS,TGS

3. S1, TicketTGS , AuthenticatorA ,TGS

with AuthenticatorA ,TGS = {A , AddrA , t1A}KA ,TGS

4. {KA ,S1 , S1, tTGS , TicketS1}KA ,TGSwith TicketS1 = {KA ,S1 , A , AddrA , S1, tTGS , LifetimeTicketS1}KTGS,S1

5. TicketS1 , AuthenticatorA ,S1

with AuthenticatorA ,S1 = {A , AddrA , t2A}KA ,S1

6. {t2A + 1}KA ,S1

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-16

Page 34: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos V4 - ProtocolClient (A)

Server (S1)

Authentication Server (AS)

Ticket Granting Server (TGS)

1. A , tA , TGS, RequestedTicketLifetimeTGS

2. {KA ,TGS , TGS, tAS , LifetimeTicketTGS , TicketTGS}KA ,ASwith TicketTGS = {KA ,TGS , A , AddrA , TGS, tAS , LifetimeTicketTGS}KAS,TGS

3. S1, TicketTGS , AuthenticatorA ,TGS

with AuthenticatorA ,TGS = {A , AddrA , t1A}KA ,TGS

4. {KA ,S1 , S1, tTGS , TicketS1}KA ,TGSwith TicketS1 = {KA ,S1 , A , AddrA , S1, tTGS , LifetimeTicketS1}KTGS,S1

5. TicketS1 , AuthenticatorA ,S1

with AuthenticatorA ,S1 = {A , AddrA , t2A}KA ,S1

6. {t2A + 1}KA ,S1

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-16

Page 35: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos V4 - ProtocolClient (A)

Server (S1)

Authentication Server (AS)

Ticket Granting Server (TGS)

1. A , tA , TGS, RequestedTicketLifetimeTGS

2. {KA ,TGS , TGS, tAS , LifetimeTicketTGS , TicketTGS}KA ,ASwith TicketTGS = {KA ,TGS , A , AddrA , TGS, tAS , LifetimeTicketTGS}KAS,TGS

3. S1, TicketTGS , AuthenticatorA ,TGS

with AuthenticatorA ,TGS = {A , AddrA , t1A}KA ,TGS

4. {KA ,S1 , S1, tTGS , TicketS1}KA ,TGSwith TicketS1 = {KA ,S1 , A , AddrA , S1, tTGS , LifetimeTicketS1}KTGS,S1

5. TicketS1 , AuthenticatorA ,S1

with AuthenticatorA ,S1 = {A , AddrA , t2A}KA ,S1

6. {t2A + 1}KA ,S1

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-16

Page 36: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos V4 - ProtocolClient (A)

Server (S1)

Authentication Server (AS)

Ticket Granting Server (TGS)

1. A , tA , TGS, RequestedTicketLifetimeTGS

2. {KA ,TGS , TGS, tAS , LifetimeTicketTGS , TicketTGS}KA ,ASwith TicketTGS = {KA ,TGS , A , AddrA , TGS, tAS , LifetimeTicketTGS}KAS,TGS

3. S1, TicketTGS , AuthenticatorA ,TGS

with AuthenticatorA ,TGS = {A , AddrA , t1A}KA ,TGS

4. {KA ,S1 , S1, tTGS , TicketS1}KA ,TGSwith TicketS1 = {KA ,S1 , A , AddrA , S1, tTGS , LifetimeTicketS1}KTGS,S1

5. TicketS1 , AuthenticatorA ,S1

with AuthenticatorA ,S1 = {A , AddrA , t2A}KA ,S1

6. {t2A + 1}KA ,S1

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-16

Page 37: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos V4 - ProtocolClient (A)

Server (S1)

Authentication Server (AS)

Ticket Granting Server (TGS)

1. A , tA , TGS, RequestedTicketLifetimeTGS

2. {KA ,TGS , TGS, tAS , LifetimeTicketTGS , TicketTGS}KA ,ASwith TicketTGS = {KA ,TGS , A , AddrA , TGS, tAS , LifetimeTicketTGS}KAS,TGS

3. S1, TicketTGS , AuthenticatorA ,TGS

with AuthenticatorA ,TGS = {A , AddrA , t1A}KA ,TGS

4. {KA ,S1 , S1, tTGS , TicketS1}KA ,TGSwith TicketS1 = {KA ,S1 , A , AddrA , S1, tTGS , LifetimeTicketS1}KTGS,S1

5. TicketS1 , AuthenticatorA ,S1

with AuthenticatorA ,S1 = {A , AddrA , t2A}KA ,S1

6. {t2A + 1}KA ,S1

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-16

Page 38: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Protocol

1. A → AS : A , tA , TGS, RequestedTicketLifetimeTGS

• The first message does not use cryptography.• Fields are the user name, timestamp, a valid Ticket Granting Server, and the requested lifetime to the tickets.

2. AS → A : {KA ,TGS , TGS, tAS , LifetimeTicketTGS , TicketTGS}KA ,ASwith TicketTGS = {KA ,TGS , A , AddrA , TGS, tAS , LifetimeTicketTGS}KAS,TGS

• This message is protected with KA ,AS ("hash of password of A"), which is part of the user database of the AS.• The first part of the message is information Alice needs to use the ticket

(e.g. the new shared key KA ,TGS with the TGS).• The second part of the message is the ticket, which Alice cannot decrypt or modify.• In general, the ticket concepts needs to give the ticket holder enough information to be able to use the ticket.• The ticket itself contains similar information, yet for the server that verifies the ticket.• The ticket is protected from the ticket holder.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-17

Page 39: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Protocol

3. A → TGS : S1, TicketTGS , AuthenticatorA ,TGS with AuthenticatorA ,TGS = {A , AddrA , t1A}KA ,TGS

• With the Authenticator Alice shows to the TGS that she is the legitimate ticket holder.• She uses the relevant key KA ,TGS , which is part of the ticket.• She has the right IP address AddrA .• Authenticator and Ticket are fresh due to fresh enough timestamps.

4. TGS → A : {KA ,S1, S1, tTGS , TicketS1}KA ,TGSwith TicketS1 = {KA ,S1, A , AddrA , S1, tTGS , LifetimeTicketS1}KTGS,S1

• Similar to 2.

5. A → S1 : TicketS1, AuthenticatorA ,S1 with AuthenticatorA ,S1 = {A , AddrA , t2A}KA ,S1

• Similar to 3.

6. S1→ A : {t2A + 1}KA ,S1

• S1 uses the relevant shared key and answers with Alice’s timestamp as nonce. Alice knows she uses the rightserver.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-18

Page 40: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Multi-Realm

Client (A)

Server S2

AS

TGS

AS

TGS

0.know

eachother,

havelong-term

sharedkey

kTG

S1,TG

S2

Realm 1

Realm 2

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-19

Page 41: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Multi-Realm

Client (A)

Server S2

AS

TGS

AS

TGS

...

0.know

eachother,

havelong-term

sharedkey

kTG

S1,TG

S2

4. Key and Ticket for TGS2

5. Here is my ticket, give me ticket for S2

6. Ticket for S2

7. Here is my ticket and authentication

8. S2 authenticates

Realm 1

Realm 2

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-19

Page 42: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Pre-Authentication Preliminaries

• Weakness Password Authentication• Remember message 1: A , tA , TGS, RequestedTicketLifetimeTGS• Message 1 is not protected. An attacker can request a ticket for someone else.• The AS will send message 2 to the attacker.

• Remember Message 2: {KA ,TGS , TGS, tAS , LifetimeTicketTGS , TicketTGS}KA ,ASwith KA ,AS = h(PasswordA )

• Now the attacker has ciphertext encrypted with a low-entropy key derived from the password.• Attacking this long-term (!) key with a suitable offline attack (e.g. dictionary attack, brute force) is possible

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-20

Page 43: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Pre-Authentication Preliminaries

• Weakness Password Authentication• Remember message 1: A , tA , TGS, RequestedTicketLifetimeTGS• Message 1 is not protected. An attacker can request a ticket for someone else.• The AS will send message 2 to the attacker.• Remember Message 2: {KA ,TGS , TGS, tAS , LifetimeTicketTGS , TicketTGS}KA ,AS

with KA ,AS = h(PasswordA )• Now the attacker has ciphertext encrypted with a low-entropy key derived from the password.• Attacking this long-term (!) key with a suitable offline attack (e.g. dictionary attack, brute force) is possible

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-20

Page 44: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Pre-Authentication

• Kerberos Pre-Authentication• Pre-Authentication is a concept developed for Kerberos V5 to extend the protocol messages (optional).• Specified in IETF RFC 6113• Idea: Protocol principles prove their identity before their message is further processed.• To avoid the attack above, PA-ENC-TIMESTAMP was proposed in Kerberos 5.• Pre-Authentication as generic concept supports all kinds of authentication concepts.

• PA-ENC-TIMESTAMP• Add {tA}KA ,AS

as pre-authentication in message 1.• AS will only reply if a current timestamp protected with Alice’s key was sent.• Thus, ciphertext using key KA ,AS will not be sent to the attacker.

• Note:• If we assume an attacker able to monitor the entire network (Dolev-Yao), this attacker will see all communication

between Alice and AS, including Message 2;• As before, attacker can attack the encryption!• Security of passwords is highly important! Insecure passwords are a major weakness.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-21

Page 45: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Pre-Authentication

• Kerberos Pre-Authentication• Pre-Authentication is a concept developed for Kerberos V5 to extend the protocol messages (optional).• Specified in IETF RFC 6113• Idea: Protocol principles prove their identity before their message is further processed.• To avoid the attack above, PA-ENC-TIMESTAMP was proposed in Kerberos 5.• Pre-Authentication as generic concept supports all kinds of authentication concepts.

• PA-ENC-TIMESTAMP• Add {tA}KA ,AS

as pre-authentication in message 1.• AS will only reply if a current timestamp protected with Alice’s key was sent.• Thus, ciphertext using key KA ,AS will not be sent to the attacker.

• Note:• If we assume an attacker able to monitor the entire network (Dolev-Yao), this attacker will see all communication

between Alice and AS, including Message 2;• As before, attacker can attack the encryption!• Security of passwords is highly important! Insecure passwords are a major weakness.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-21

Page 46: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Does it Meet the Design Goals?

Remember the design goals:

• Security• Eavesdroppers or active attackers should not be able to obtain the necessary information to impersonate a user

when accessing a service

⇒ Modern versions of Kerberos use state-of-the-art cryptography,⇒ (optional) Pre-Authentication helps with password issues but does not completely solve them⇒ Future Kerberos versions should support asymmetric cryptography to authenticate users (e.g. key in smart card)

• Reliability• Every use of a service requires prior authentication• Thus Kerberos should be highly reliable and available

⇒ The design allows redundant servers and tickets can be reused within their lifetime.

• Transparency• The authentication process should be transparent• The user should only witness the requirement to enter a password

⇒ Kerberos is a single-sign-on solution. Applications can use tickets within their lifetime.⇒ General APIs like PAM help with Kerberos integration in applications.

• Scalability• The system should be able to support a large number of clients and servers

⇒ The design allows redundant servers.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-22

Page 47: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Does it Meet the Design Goals?

Remember the design goals:

• Security• Eavesdroppers or active attackers should not be able to obtain the necessary information to impersonate a user

when accessing a service⇒ Modern versions of Kerberos use state-of-the-art cryptography,⇒ (optional) Pre-Authentication helps with password issues but does not completely solve them⇒ Future Kerberos versions should support asymmetric cryptography to authenticate users (e.g. key in smart card)

• Reliability• Every use of a service requires prior authentication• Thus Kerberos should be highly reliable and available

⇒ The design allows redundant servers and tickets can be reused within their lifetime.

• Transparency• The authentication process should be transparent• The user should only witness the requirement to enter a password

⇒ Kerberos is a single-sign-on solution. Applications can use tickets within their lifetime.⇒ General APIs like PAM help with Kerberos integration in applications.

• Scalability• The system should be able to support a large number of clients and servers

⇒ The design allows redundant servers.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-22

Page 48: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Does it Meet the Design Goals?

Remember the design goals:

• Security• Eavesdroppers or active attackers should not be able to obtain the necessary information to impersonate a user

when accessing a service⇒ Modern versions of Kerberos use state-of-the-art cryptography,⇒ (optional) Pre-Authentication helps with password issues but does not completely solve them⇒ Future Kerberos versions should support asymmetric cryptography to authenticate users (e.g. key in smart card)

• Reliability• Every use of a service requires prior authentication• Thus Kerberos should be highly reliable and available⇒ The design allows redundant servers and tickets can be reused within their lifetime.

• Transparency• The authentication process should be transparent• The user should only witness the requirement to enter a password

⇒ Kerberos is a single-sign-on solution. Applications can use tickets within their lifetime.⇒ General APIs like PAM help with Kerberos integration in applications.

• Scalability• The system should be able to support a large number of clients and servers

⇒ The design allows redundant servers.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-22

Page 49: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Does it Meet the Design Goals?

Remember the design goals:

• Security• Eavesdroppers or active attackers should not be able to obtain the necessary information to impersonate a user

when accessing a service⇒ Modern versions of Kerberos use state-of-the-art cryptography,⇒ (optional) Pre-Authentication helps with password issues but does not completely solve them⇒ Future Kerberos versions should support asymmetric cryptography to authenticate users (e.g. key in smart card)

• Reliability• Every use of a service requires prior authentication• Thus Kerberos should be highly reliable and available⇒ The design allows redundant servers and tickets can be reused within their lifetime.

• Transparency• The authentication process should be transparent• The user should only witness the requirement to enter a password⇒ Kerberos is a single-sign-on solution. Applications can use tickets within their lifetime.⇒ General APIs like PAM help with Kerberos integration in applications.

• Scalability• The system should be able to support a large number of clients and servers

⇒ The design allows redundant servers.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-22

Page 50: Network Security (NetSec)netsec.net.in.tum.de/slides/13_kerberos.pdf · Login to Services on the Local Network •User Authentication typically works with •Username •Credential

Kerberos – Does it Meet the Design Goals?

Remember the design goals:

• Security• Eavesdroppers or active attackers should not be able to obtain the necessary information to impersonate a user

when accessing a service⇒ Modern versions of Kerberos use state-of-the-art cryptography,⇒ (optional) Pre-Authentication helps with password issues but does not completely solve them⇒ Future Kerberos versions should support asymmetric cryptography to authenticate users (e.g. key in smart card)

• Reliability• Every use of a service requires prior authentication• Thus Kerberos should be highly reliable and available⇒ The design allows redundant servers and tickets can be reused within their lifetime.

• Transparency• The authentication process should be transparent• The user should only witness the requirement to enter a password⇒ Kerberos is a single-sign-on solution. Applications can use tickets within their lifetime.⇒ General APIs like PAM help with Kerberos integration in applications.

• Scalability• The system should be able to support a large number of clients and servers⇒ The design allows redundant servers.

Chapter 13: Kerberos and other Frameworks for Client Authentication — Kerberos 13-22