real world security protocols spring 2009

82
1 Computer Science 654 Lecture 3: Real-World Protocols Professor Wayne Patterson Howard University Spring 2009

Upload: aniesha-holy-chic-scott

Post on 12-Apr-2016

214 views

Category:

Documents


1 download

DESCRIPTION

Security Protocols

TRANSCRIPT

Page 1: Real World Security Protocols Spring 2009

1

Computer Science 654Lecture 3: Real-World Protocols

Professor Wayne PattersonHoward UniversitySpring 2009

Page 2: Real World Security Protocols Spring 2009

2

Real-World Protocols

Next, we’ll look at specific protocolsSSL security on the WebIPSec security at the IP layerKerberos symmetric key systemGSM mobile phone (in)security

Page 3: Real World Security Protocols Spring 2009

3

Secure Socket Layer

Page 4: Real World Security Protocols Spring 2009

4

Socket layer

“Socket layer” lives between application and transport layersSSL usually lies between HTTP and TCP

application

transport

network

link

physical

Socket“layer”

OS

User

NIC

Page 5: Real World Security Protocols Spring 2009

5

What is SSL?

SSL is the protocol used for most secure transactions over the InternetFor example, if you want to buy a book at amazon.com…

You want to be sure you are dealing with Amazon (authentication)Your credit card information must be protected in transit (confidentiality and/or integrity)As long as you have money, Amazon doesn’t care who you are (authentication need not be mutual)

Page 6: Real World Security Protocols Spring 2009

6

Simple SSL-like Protocol

Alice Bob

I’d like to talk to you securelyHere’s my certificate

{KAB}Bob

protected HTTP

Is Alice sure she’s talking to Bob?Is Bob sure he’s talking to Alice?

Page 7: Real World Security Protocols Spring 2009

7

Simplified SSL Protocol

Alice Bob

Can we talk?, cipher list, RA

certificate, cipher, RB

{S}Bob, E(h(msgs,CLNT,K),K)

Data protected with key Kh(msgs,SRVR,K)

S is pre-master secretK = h(S,RA,RB)msgs = all previous messagesCLNT and SRVR are constants

Page 8: Real World Security Protocols Spring 2009

8

SSL Keys

6 “keys” derived from K = hash(S,RA,RB)2 encryption keys: send and receive2 integrity keys: send and receive2 IVs: send and receiveWhy different keys in each direction?

Q: Why is h(msgs,CLNT,K) encrypted (and integrity protected)?A: It adds no security…

Page 9: Real World Security Protocols Spring 2009

9

SSL Authentication

Alice authenticates Bob, not vice-versaHow does client authenticate server?Why does server not authenticate client?

Mutual authentication is possible: Bob sends certificate request in message 2

This requires client to have certificateIf server wants to authenticate client, server could instead require (encrypted) password

Page 10: Real World Security Protocols Spring 2009

10

SSL MiM Attack

Alice Bob

RA

certificateT, RB

{S1}Trudy,E(X1,K1)

E(data,K1)h(Y1,K1)

Q: What prevents this MiM attack?A: Bob’s certificate must be signed by a certificate authority (such as Verisign)What does Web browser do if sig. not valid?What does user do if signature is not valid?

Trudy

RA

certificateB, RB

{S2}Bob,E(X2,K2)

E(data,K2)h(Y2,K2)

Page 11: Real World Security Protocols Spring 2009

11

SSL Sessions vs Connections

SSL session is established as shown on previous slidesSSL designed for use with HTTP 1.0HTTP 1.0 usually opens multiple simultaneous (parallel) connectionsSSL session establishment is costly

Due to public key operations

SSL has an efficient protocol for opening new connections given an existing session

Page 12: Real World Security Protocols Spring 2009

12

SSL Connection

Alice Bob

session-ID, cipher list, RA

session-ID, cipher, RB, h(msgs,SRVR,K)

h(msgs,CLNT,K)Protected data

Assuming SSL session existsSo S is already known to Alice and BobBoth sides must remember session-IDAgain, K = h(S,RA,RB)

No public key operations! (relies on known S)

Page 13: Real World Security Protocols Spring 2009

13

SSL vs IPSec

IPSec discussed in next sectionLives at the network layer (part of the OS)Has encryption, integrity, authentication, etc.Is overly complex (including serious flaws)

SSL (and IEEE standard known as TLS)Lives at socket layer (part of user space)Has encryption, integrity, authentication, etc.Has a simpler specification

Page 14: Real World Security Protocols Spring 2009

14

SSL vs IPSec

IPSec implementationRequires changes to OS, but no changes to applications

SSL implementationRequires changes to applications, but no changes to OS

SSL built into Web application early on (Netscape)IPSec used in VPN applications (secure tunnel)Reluctance to retrofit applications for SSLReluctance to use IPSec due to complexity and interoperability issuesResult? Internet less secure than it should be!

Page 15: Real World Security Protocols Spring 2009

15

IPSec

Page 16: Real World Security Protocols Spring 2009

16

IPSec and SSL

IPSec lives at the network layerIPSec is transparent to applications

application

transport

network

link

physical

SSL

OS

User

NIC

IPSec

Page 17: Real World Security Protocols Spring 2009

17

IPSec and Complexity

IPSec is a complex protocolOver-engineered

Lots of generally useless extra features

FlawedSome serious security flaws

Interoperability is serious challengeDefeats the purpose of having a standard!

ComplexDid I mention, it’s complex?

Page 18: Real World Security Protocols Spring 2009

18

IKE and ESP/AH

Two parts to IPSecIKE: Internet Key Exchange

Mutual authenticationEstablish shared symmetric key

Two “phases” like SSL session/connection

ESP/AHESP: Encapsulating Security Payload for encryption and/or integrity of IP packets

AH: Authentication Header integrity only

Page 19: Real World Security Protocols Spring 2009

19

IKE

Page 20: Real World Security Protocols Spring 2009

20

IKE

IKE has 2 phasesPhase 1 IKE security association (SA)Phase 2 AH/ESP security association

Phase 1 is comparable to SSL session Phase 2 is comparable to SSL connection Not an obvious need for two phases in IKEIf multiple Phase 2’s do not occur, then it is more expensive to have two phases!

Page 21: Real World Security Protocols Spring 2009

21

IKE Phase 1Four different “key” options

Public key encryption (original version)Public key encryption (improved version)Public key signatureSymmetric key

For each of these, two different “modes”Main modeAggressive mode

There are 8 versions of IKE Phase 1!Evidence that IPSec is over-engineered?

Page 22: Real World Security Protocols Spring 2009

22

IKE Phase 1

We’ll discuss 6 of 8 phase 1 variantsPublic key signatures (main and aggressive modes)Symmetric key (main and aggressive modes)Public key encryption (main and aggressive)

Why public key encryption and public key signatures?

Always know your own private keyMay not (initially) know other side’s public key

Page 23: Real World Security Protocols Spring 2009

23

IKE Phase 1

Uses ephemeral Diffie-Hellman to establish session key

Achieves perfect forward secrecy (PFS)

Let a be Alice’s Diffie-Hellman exponentLet b be Bob’s Diffie-Hellman exponentLet g be generator and p primeRecall p and g are public

Page 24: Real World Security Protocols Spring 2009

24

IKE Phase 1: Digital Signature (Main Mode)

CP = crypto proposed, CS = crypto selectedIC = initiator “cookie”, RC = responder “cookie”K = h(IC,RC,gab mod p,RA,RB)SKEYID = h(RA, RB, gab mod p)proofA = [h(SKEYID,ga,gb,IC,RC,CP,“Alice”)]Alice

Alice Bob

IC, CPIC,RC, CS

IC,RC, ga mod p, RA

IC,RC, E(“Alice”, proofA, K)IC,RC, gb mod p, RB

IC,RC, E(“Bob”, proofB, K)

Page 25: Real World Security Protocols Spring 2009

25

IKE Phase 1: Public Key Signature (Aggressive Mode)

Main difference from main modeNot trying to protect identitiesCannot negotiate g or p

Alice Bob

IC, “Alice”, ga mod p, RA, CPIC,RC, “Bob”, RB,

gb mod p, CS, proofB

IC,RC, proofA

Page 26: Real World Security Protocols Spring 2009

26

Main vs Aggressive Modes

Main mode MUST be implementedAggressive mode SHOULD be implemented

In other words, if aggressive mode is not implemented, “you should feel guilty about it”

Might create interoperability issuesFor public key signature authentication

Passive attacker knows identities of Alice and Bob in aggressive modeActive attacker can determine Alice’s and Bob’s identity in main mode

Page 27: Real World Security Protocols Spring 2009

27

IKE Phase 1: Symmetric Key (Main Mode)

Same as signature mode exceptKAB = symmetric key shared in advance K = h(IC,RC,gab mod p,RA,RB,KAB)SKEYID = h(K, gab mod p)proofA = h(SKEYID,ga,gb,IC,RC,CP,“Alice”)

Alice Bob

IC, CPIC,RC, CS

IC,RC, ga mod p, RA

IC,RC, E(“Alice”, proofA, K)IC,RC, gb mod p, RB

IC,RC, E(“Bob”, proofB, K)

Page 28: Real World Security Protocols Spring 2009

28

Problems with Symmetric Key (Main Mode)

Catch-22Alice sends her ID in message 5Alice’s ID encrypted with KTo find K Bob must know KAB

To get KAB Bob must know he’s talking to Alice!

Result: Alice’s ID must be IP address!Useless mode for the “road warrior”Why go to all of the trouble of trying to hide identities in 6 message protocol?

Page 29: Real World Security Protocols Spring 2009

29

IKE Phase 1: SymmetricKey (Aggressive Mode)

Same format as digital signature aggressive modeNot trying to hide identities…As a result, does not have problems of main modeBut does not (pretend to) hide identities

Alice Bob

IC, “Alice”, ga mod p, RA, CPIC,RC, “Bob”, RB,

gb mod p, CS, proofB

IC,RC, proofA

Page 30: Real World Security Protocols Spring 2009

30

IKE Phase 1: Public Key Encryption (Main Mode)

CP = crypto proposed, CS = crypto selectedIC = initiator “cookie”, RC = responder “cookie”K = h(IC,RC,gab mod p,RA,RB)SKEYID = h(RA, RB, gab mod p)proofA = h(SKEYID,ga,gb,IC,RC,CP,“Alice”)

Alice Bob

IC, CPIC,RC, CS

IC,RC, ga mod p, {RA}Bob, {“Alice”}Bob

IC,RC, E(proofA, K)IC,RC, gb mod p, {RB}Alice, {“Bob”}Alice

IC,RC, E(proofB, K)

Page 31: Real World Security Protocols Spring 2009

31

IKE Phase 1: Public Key Encryption (Aggressive Mode)

K, proofA, proofB computed as in main mode

Note that identities are hiddenThe only aggressive mode to hide identitiesThen why have main mode?

Alice Bob

IC, CP, ga mod p,{“Alice”}Bob, {RA}Bob

IC,RC, CS, gb mod p, {“Bob”}Alice, {RB}Alice, proofB

IC,RC, proofA

Page 32: Real World Security Protocols Spring 2009

32

Public Key Encryption Issue?Public key encryption, aggressive modeSuppose Trudy generates

Exponents a and bNonces RA and RB

Trudy can compute “valid” keys and proofs: gab mod p, K, SKEYID, proofA and proofB

Also true of main mode

Page 33: Real World Security Protocols Spring 2009

33

Public Key Encryption Issue?

Trudyas Alice

Trudyas Bob

Trudy can create exchange that appears to be between Alice and BobAppears valid to any observer, including Alice and Bob!

IC,RC, CS, gb mod p, {“Bob”}Alice, {RB}Alice, proofB

IC,RC, proofA

IC, CP, ga mod p,{“Alice”}Bob, {RA}Bob

Page 34: Real World Security Protocols Spring 2009

34

Plausible Deniability

Trudy can create “conversation” that appears to be between Alice and BobAppears valid, even to Alice and Bob!A security failure?In this mode of IPSec, it is a feature

Plausible deniability: Alice and Bob can deny that any conversation took place!

In some cases it might be a security failureIf Alice makes a purchase from Bob, she could later repudiate it (unless she had signed)

Page 35: Real World Security Protocols Spring 2009

35

IKE Phase 1 Cookies

Cookies (or “anti-clogging tokens”) supposed to make denial of service more difficultNo relation to Web cookiesTo reduce DoS, Bob wants to remain stateless as long as possibleBut Bob must remember CP from message 1 (required for proof of identity in message 6)Bob must keep state from 1st message on!These cookies offer little DoS protection!

Page 36: Real World Security Protocols Spring 2009

36

IKE Phase 1 Summary

Result of IKE phase 1 is Mutual authenticationShared symmetric keyIKE Security Association (SA)

But phase 1 is expensive (in public key and/or main mode cases)Developers of IKE thought it would be used for lots of things not just IPSecPartly explains over-engineering…

Page 37: Real World Security Protocols Spring 2009

37

IKE Phase 2

Phase 1 establishes IKE SAPhase 2 establishes IPSec SAComparison to SSL

SSL session is comparable to IKE Phase 1SSL connections are like IKE Phase 2

IKE could be used for lots of thingsBut in practice, it’s not!

Page 38: Real World Security Protocols Spring 2009

38

IKE Phase 2

Key K, IC, RC and SA known from Phase 1Proposal CP includes ESP and/or AHHashes 1,2,3 depend on SKEYID, SA, RA and RB

Keys derived from KEYMAT = h(SKEYID,RA,RB,junk)Recall SKEYID depends on phase 1 key methodOptional PFS (ephemeral Diffie-Hellman exchange)

Alice Bob

IC,RC,CP,E(hash1,SA,RA,K)IC,RC,CS,E(hash2,SA,RB,K)

IC,RC,E(hash3,K)

Page 39: Real World Security Protocols Spring 2009

39

IPSec

After IKE Phase 1, we have an IKE SAAfter IKE Phase 2, we have an IPSec SABoth sides have a shared symmetric keyNow what?

We want to protect IP datagrams

But what is an IP datagram?From the perspective of IPSec…

Page 40: Real World Security Protocols Spring 2009

40

IP Review

Where IP header is

IP header data

IP datagram is of the form

Page 41: Real World Security Protocols Spring 2009

41

IP and TCP

Consider HTTP traffic (over TCP)IP encapsulates TCPTCP encapsulates HTTP

IP header TCP hdr HTTP hdr app data

IP header data

IP data includes TCP header, etc.

Page 42: Real World Security Protocols Spring 2009

42

IPSec Transport ModeIPSec Transport Mode

IP header data

IP header ESP/AH data

Transport mode designed for host-to-hostTransport mode is efficient

Adds minimal amount of extra headerThe original header remains

Passive attacker can see who is talking

Page 43: Real World Security Protocols Spring 2009

43

IPSec Tunnel ModeIPSec Tunnel Mode

IP header data

new IP hdr ESP/AH IP header data

Tunnel mode for firewall to firewall trafficOriginal IP packet encapsulated in IPSecOriginal IP header not visible to attacker

New header from firewall to firewallAttacker does not know which hosts are talking

Page 44: Real World Security Protocols Spring 2009

44

Comparison of IPSec ModesTransport Mode

Tunnel Mode

IP header data

IP header ESP/AH data

IP header data

new IP hdr ESP/AH IP header data

Transport ModeHost-to-host

Tunnel ModeFirewall-to-firewall

Transport mode not necessaryTransport mode is more efficient

Page 45: Real World Security Protocols Spring 2009

45

IPSec SecurityWhat kind of protection?

Confidentiality?Integrity?Both?

What to protect?Data?Header?Both?

ESP/AH do some combinations of these

Page 46: Real World Security Protocols Spring 2009

46

AH vs ESPAH

Authentication HeaderIntegrity only (no confidentiality)Integrity-protect everything beyond IP header and some fields of header (why not all fields?)

ESPEncapsulating Security PayloadIntegrity and confidentialityProtects everything beyond IP headerIntegrity only by using NULL encryption

Page 47: Real World Security Protocols Spring 2009

47

ESP’s NULL Encryption

According to RFC 2410NULL encryption “is a block cipher the origins of which appear to be lost in antiquity”“Despite rumors”, there is no evidence that NSA “suppressed publication of this algorithm”Evidence suggests it was developed in Roman times as exportable version of Caesar’s cipherCan make use of keys of varying lengthNo IV is requiredNull(P,K) = P for any P and any key K

Security people have a strange sense of humor!

Page 48: Real World Security Protocols Spring 2009

48

Why Does AH Exist? (1)

Cannot encrypt IP headerRouters must look at the IP headerIP addresses, TTL, etc.IP header exists to route packets!

AH protects immutable fields in IP headerCannot integrity protect all header fieldsTTL, for example, must change

ESP does not protect IP header at all

Page 49: Real World Security Protocols Spring 2009

49

Why Does AH Exist? (2)ESP encrypts everything beyond the IP header (if non-null encryption)If ESP encrypted, firewall cannot look at TCP header (e.g., port numbers)Why not use ESP with null encryption?

Firewall sees ESP header, but does not know whether null encryption is usedEnd systems know, but not firewalls

Aside 1: Do firewalls reduce security?Aside 2: Is IPSec compatible with NAT?

Page 50: Real World Security Protocols Spring 2009

50

Why Does AH Exist? (3)

The real reason why AH existsAt one IETF meeting “someone from Microsoft gave an impassioned speech about how AH was useless…”“…everyone in the room looked around and said `Hmm. He’s right, and we hate AH also, but if it annoys Microsoft let’s leave it in since we hate Microsoft more than we hate AH.”

Page 51: Real World Security Protocols Spring 2009

51

Kerberos

Page 52: Real World Security Protocols Spring 2009

52

Kerberos

In Greek mythology, Kerberos is 3-headed dog that guards entrance to Hades

“Wouldn’t it make more sense to guard the exit?”

In security, Kerberos is an authentication system based on symmetric key crypto

Originated at MITBased on work by Needham and SchroederRelies on a trusted third party (TTP)

Page 53: Real World Security Protocols Spring 2009

53

Motivation for Kerberos

Authentication using public keysN users N key pairs

Authentication using symmetric keysN users requires about N2 keys

Symmetric key case does not scale!Kerberos based on symmetric keys but only requires N keys for N users

But must rely on TTPAdvantage is that no PKI is required

Page 54: Real World Security Protocols Spring 2009

54

Kerberos KDC

Kerberos Key Distribution Center or KDCActs as a TTPTTP must not be compromised!KDC shares symmetric key KA with Alice, key KB with Bob, key KC with Carol, etc.

Master key KKDC known only to KDC

KDC enables authentication and session keysKeys for confidentiality and integrityIn practice, the crypto algorithm used is DES

Page 55: Real World Security Protocols Spring 2009

55

Kerberos TicketsKDC issues a ticket containing info needed to access a network resourceKDC also issues ticket-granting tickets or TGTs that are used to obtain ticketsEach TGT contains

Session keyUser’s IDExpiration time

Every TGT is encrypted with KKDCTGT can only be read by the KDC

Page 56: Real World Security Protocols Spring 2009

56

Kerberized Login

Alice enters her passwordAlice’s workstation

Derives KA from Alice’s password

Uses KA to get TGT for Alice from the KDC

Alice can then use her TGT (credentials) to securely access network resourcesPlus: Security is transparent to AliceMinus: KDC must be secure it’s trusted!

Page 57: Real World Security Protocols Spring 2009

57

Kerberized Login

Alice

Alice’sAlice wants

password a TGTE(SA,TGT,KA)

KDC

Key KA derived from Alice’s password

KDC creates session key SA

Workstation decrypts SA, TGT, forgets KA

TGT = E(“Alice”,SA, KKDC)

Computer

Page 58: Real World Security Protocols Spring 2009

58

Alice Requests Ticket to Bob

Alice

Talk to Bob

I want totalk to BobREQUEST

REPLY

KDCREQUEST = (TGT, authenticator) whereauthenticator = E(timestamp,SA)REPLY = E(“Bob”,KAB,ticket to Bob, SA)ticket to Bob = E(“Alice”,KAB,KB)KDC gets SA from TGT to verify timestamp

Computer

Page 59: Real World Security Protocols Spring 2009

59

Alice Uses Ticket to Bob

ticket to Bob, authenticatorE(timestamp + 1,KAB)

ticket to Bob = E(“Alice”,KAB, KB)authenticator = E(timestamp, KAB)Bob decrypts “ticket to Bob” to get KAB which he then uses to verify timestamp

Alice’s Computer

Bob

Page 60: Real World Security Protocols Spring 2009

60

Kerberos

Session key SA used for authentication

Can also be used for confidentiality/integrityTimestamps used for mutual authenticationRecall that timestamps reduce number of messages

Acts like a nonce that is known to both sidesNote: time is a security-critical parameter!

Page 61: Real World Security Protocols Spring 2009

61

Kerberos Questions

When Alice logs in, KDC sends E(SA,TGT,KA) where TGT = E(“Alice”,SA,KKDC)Q: Why is TGT encrypted with KA?

A: Extra work and no added security!

In Alice’s Kerberized login to Bob, why can Alice remain anonymous?Why is “ticket to Bob” sent to Alice?Where is replay prevention in Kerberos?

Page 62: Real World Security Protocols Spring 2009

62

Kerberos Alternatives

Could have Alice’s workstation remember password and use that for authentication

Then no KDC requiredBut hard to protect password on workstationScaling problem

Could have KDC remember session key instead of putting it in a TGT

Then no need for TGTsBut stateless KDC is big feature of Kerberos

Page 63: Real World Security Protocols Spring 2009

63

Kerberos KeysIn Kerberos, KA = h(Alice’s password)Could instead generate random KA and

Compute Kh = h(Alice’s password)And workstation stores E(KA, Kh)

Then KA need not change (on workstation or KDC) when Alice changes her passwordBut E(KA, Kh) subject to password guessing

This alternative approach is often used in applications (but not in Kerberos)

Page 64: Real World Security Protocols Spring 2009

64

GSM Security

Page 65: Real World Security Protocols Spring 2009

65

Cell Phones

First generation cell phonesAnalog, few standardsLittle or no securitySusceptible to cloning

Second generation cell phones: GSMBegan in 1982 as Groupe Speciale MobileNow, Global System for Mobile Communications

Third generation?3rd Generation Partnership Project (3GPP)

Page 66: Real World Security Protocols Spring 2009

66

GSM System Overview

Mobile

HomeNetwork

“land line”

air interface

BaseStation

BaseStation

Controller

PSTNInternet

Etc.Visited Network

VLR

HLR

AuC

Page 67: Real World Security Protocols Spring 2009

67

GSM System Components

Mobile phoneContains SIM (Subscriber Identity Module)

SIM is the security moduleIMSI (International Mobile Subscriber ID)User key Ki (128 bits)Tamper resistant (smart card)PIN activated (usually not used)

SIM

Page 68: Real World Security Protocols Spring 2009

68

GSM System ComponentsVisited network network where mobile is currently located

Base station one “cell”Base station controller manages many cellsVLR (Visitor Location Register) info on all visiting mobiles currently in the network

Home network “home” of the mobileHLR (Home Location Register) keeps track of most recent location of mobileAuC (Authentication Center) contains IMSI/Ki

Page 69: Real World Security Protocols Spring 2009

69

GSM Security GoalsPrimary design goals

Make GSM as secure as ordinary telephonePrevent phone cloning

Not designed to resist an active attack!At the time this seemed infeasibleToday such an attack is very feasible…

Designers considered biggest threatsInsecure billingCorruptionOther low-tech attacks

Page 70: Real World Security Protocols Spring 2009

70

GSM Security FeaturesAnonymity

Intercepted traffic does not identify userNot so important to phone company

AuthenticationNecessary for proper billingVery important to phone company!

ConfidentialityConfidentiality of calls over the air interfaceNot important to phone companyMay be very important for marketing!

Page 71: Real World Security Protocols Spring 2009

71

GSM: Anonymity

IMSI used to initially identify callerThen TMSI (Temporary Mobile Subscriber ID) usedTMSI changed frequentlyTMSI’s encrypted when sentNot a strong form of anonymityBut probably sufficient for most uses

Page 72: Real World Security Protocols Spring 2009

72

GSM: AuthenticationCaller is authenticated to base stationAuthentication is not mutual Authentication via challenge-response

Home network generates RAND and computes XRES = A3(RAND, Ki) where A3 is a hashThen (RAND,XRES) sent to base stationBase station sends challenge RAND to mobileMobile’s response is SRES = A3(RAND, Ki)Base station verifies SRES = XRES

Note: Ki never leaves home network!

Page 73: Real World Security Protocols Spring 2009

73

GSM: ConfidentialityData encrypted with stream cipherError rate estimated at about 1/1000

Error rate too high for a block cipher

Encryption key KcHome network computes Kc = A8(RAND, Ki), where A8 is a hashThen Kc sent to base station with (RAND,XRES)Mobile computes Kc = A8(RAND, Ki)Keystream generated from A5(Kc)

Note: Ki never leaves home network!

Page 74: Real World Security Protocols Spring 2009

74

GSM Security

SRES and Kc must be uncorrelatedEven though both are derived from RAND and Ki

Must not be possible to deduce Ki from known RAND/SRES pairs (known plaintext attack)Must not be possible to deduce Ki from chosen RAND/SRES pairs (chosen plaintext attack)

With possession of SIM, attacker can choose RAND’s

Mobile Base Station

4. RAND5. SRES

6. Encrypt with Kc

1. IMSI

HomeNetwork

3. (RAND,XRES,Kc)2. IMSI

Page 75: Real World Security Protocols Spring 2009

75

GSM Insecurity (1)

Hash used for A3/A8 is COMP128Broken by 160,000 chosen plaintextsWith SIM, can get Ki in 2 to 10 hours

Encryption between mobile and base station but no encryption from base station to base station controller

Often transmitted over microwave link

Encryption algorithm A5/1Broken with 2 seconds of known plaintext

BaseStation

BaseStation

Controller

VLR

Page 76: Real World Security Protocols Spring 2009

76

GSM Insecurity (2)

Attacks on SIM cardOptical Fault Induction can attack SIM with a flashbulb to recover KiPartitioning Attacks using timing and power consumption, can recover Ki with only 8 adaptively chosen “plaintexts”

With possession of SIM, attacker can recover Ki in seconds

Page 77: Real World Security Protocols Spring 2009

77

GSM Insecurity (3)

Fake base station exploits two flawsEncryption not automaticBase station not authenticated

Mobile Base Station

RANDSRES

Fake Base Station

Noencryption

Call todestination

Note: The bill goes to fake base station!

Page 78: Real World Security Protocols Spring 2009

78

GSM Insecurity (4)

Denial of service is possibleJamming (always an issue in wireless)

Base station can replay triple (RAND,XRES,Kc)

One compromised triple gives attacker a key Kc that is valid foreverNo replay protection!

Page 79: Real World Security Protocols Spring 2009

79

GSM Conclusion

Did GSM achieve its goals?Eliminate cloning? YesMake air interface as secure as PSTN? Perhaps…But design goals were clearly too limited

GSM insecurities weak crypto, SIM issues, fake base station, replay, etc.PSTN insecurities tapping, active attack, passive attack (e.g., cordless phones), etc.GSM a (modest) security success?

Page 80: Real World Security Protocols Spring 2009

80

3GPP: 3rd Generation Partnership Project

3G security built on GSM (in)security3G fixes known GSM security problems

Mutual authenticationIntegrity protect signaling (such as “start encryption” command)Keys (encryption/integrity) cannot be reusedTriples cannot be replayedStrong encryption algorithm (KASUMI)Encryption extended to base station controller

Page 81: Real World Security Protocols Spring 2009

81

Protocols Summary

Generic authentication protocolsProtocols can be very subtle!

SSLIPSecKerberosGSM

Page 82: Real World Security Protocols Spring 2009

82

Coming Attractions…

Software and securitySoftware flaws buffer overflow, etc.Malware viruses, worms, etc.Software reverse engineeringDigital rights managementOS and securityMicrosoft’s NGSCB