29
Network Security: GSM and 3G Security Tuomas Aura T-110.5241 Network security Aalto University, Nov-Dec 2011

Network Security: GSM and 3G Security

  • Upload
    naif

  • View
    100

  • Download
    9

Embed Size (px)

DESCRIPTION

Network Security: GSM and 3G Security. Tuomas Aura T-110.5241 Network security Aalto University, Nov-Dec 2011. Outline. Cellular networks GSM security architecture and protocols Counters UMTS AKA and session protocols. Cellular networks. GSM network architecture. UMTS architecture. - PowerPoint PPT Presentation

Citation preview

Page 1: Network Security:  GSM and 3G Security

Network Security: GSM and 3G Security

Tuomas AuraT-110.5241 Network security

Aalto University, Nov-Dec 2011

Page 2: Network Security:  GSM and 3G Security

2

OutlineCellular networksGSM security architecture and protocolsCounters UMTS AKA and session protocols

Page 3: Network Security:  GSM and 3G Security

Cellular networks

Page 4: Network Security:  GSM and 3G Security

6

GSM network architectureBase station subsystem BSS

Home location register HLRVisitor location register VLRAuthentication center AuCEquipment identity register EIR

Base transceiver station BTS (=BS)

BTS

BTS

Base station controller BSC

Mobile station MS

Mobile switching center MSC

Public switched telephone network

PSTN

Network switching subsystem NSS

MSC

MSC

Page 5: Network Security:  GSM and 3G Security

8

UMTS architectureUMTS terrestrial radio network (UTRAN)

Home location register HLR / Authentication center AuC

Base station BS = Node B

BS

BS

Terminal

Public switched telephone network

PSTN

CS domain

MSC

MSC

Serving GPRS support node (SGRN)

Internet

Radio network controller RNC

Mobile switching center MSC /

Visitor location register VLR

Core network

PS domain

IMS domain etc.

Page 6: Network Security:  GSM and 3G Security

9

Threats against cellular networksDiscussion: What the threats?Charging fraud, unauthorized use Charging disputesHandset cloning (impersonation attack)

→ multiple handsets on one subscription→ let someone else pay for your calls

Voice interception → casual eavesdropping and industrial espionageLocation trackingHandset theftHandset unlocking (locked to a specific operator)Network service disruption (DoS)What about integrity?

Page 7: Network Security:  GSM and 3G Security

GSM security

Page 8: Network Security:  GSM and 3G Security

GSM security architectureHome location register (HLR) keeps track of the mobile’s locationVisitor location register (VLR) keeps track of roaming mobiles at each networkShared key Ki between SIM and authentication center (HRL/AuC) at the home networkVLR of the visited network obtains authentication triplets from AuC of the mobile’s home network and authenticates the mobileEncryption between mobile and the base station

Page 9: Network Security:  GSM and 3G Security

12

GSM authentication

Encryption with Kc

HLR/AuCMSC/VLRMS =

ME + SIM

IMSI

Challenge: RAND

Response: RES

RES = SRES ?

KiKi

SRES = A3 (Ki, RAND)Kc = A8 (Ki, RAND)

On or more authentication triplets:

< RAND, SRES, Kc >

IMSI or TMSI

RES = A3 (Ki, RAND)Kc = A8 (Ki, RAND)

BS

Kc

TMSI

Page 10: Network Security:  GSM and 3G Security

13

GSM authenticationAlice-and-Bob notation:1. Network → MS: RAND2. MS → Network: A3 (Ki, RAND)Ki = shared master keyKc = A8 (Ki, RAND) = session keyAfter authentication, BS asks mobile to turn on encryption. A5 cipher with the key Kc

Page 11: Network Security:  GSM and 3G Security

14

GSM securityMobile authenticated → prevents charging fraudEncryption on the air interface

→ No casual sniffing→ Encryption of signalling gives some integrity protection

TMSI → not easy to track mobile with a passive radioAlgorithms A3, A8 can be replaced by home operator

AuC and SIM must use the same algorithms

Non-protocol features:Subscriber identity module (SIM) is separate from the handset → Flexibility → Thiefs and phone unlockers don’t even try to break the SIM International mobile equipment identity (IMEI) to track stolen devices

Page 12: Network Security:  GSM and 3G Security

15

GSM security weaknessesOnly the mobile is authenticated, network notBS decides when to turn on encryption; mobiles have no indicator→ Possible to set up a fake BS that uses no encryptionIntegrity protection depends on encryption but some networks do not use encryptionDecryption at BS, but BS may be at a hard-to-monitor location and compromisedEarly encryption algorithms based on COMP128, which has been broken. A5 cannot be upgraded without replacing the handsetAuthentication triplets transferred over the SS7 signalling network, which can be accessed by thousands of operatorsNo non-repudiation → no protection against false charges from dishonest operatorsIMSI sent when requested by BS → IMSI catchers to track mobilesIMEI not authenticated → can be changed to prevent the tracking of stolen mobiles

Page 13: Network Security:  GSM and 3G Security

16

UMTS improvements over GSMRAN separate from CN

Roles of radio-network operator and service operator separated

Encryption endpoint moved from BS to RNCMutual authentication protocol AKASupport for multiple service domains

Circuit-switched, packet-switched, multimedia, WLAN

Protection of core-network signallingSecurity indicator to user (e.g. encryption off)

Page 14: Network Security:  GSM and 3G Security

Counters

Page 15: Network Security:  GSM and 3G Security

18

Using counters for freshnessSimple shared-key authentication with nonces:1. A → B: NA

2. B → A: NB, MACK(Tag2, A, B, NA, NB)3. A → B: MACK(Tag3, A, B, NA, NB)K = master key shared between A and BSK = h(K, NA, NB)Using counters can save one message or roundtrip:1. A → B:2. B → A: NB, SQN, MACK(Tag2, A, B, SQN, NB)3. A → B: MACK(Tag3, A, B, SQN, NB)SK = h(K, SQN, NB)Another benefit: B can pre-compute message 2A must check that the counter always increases

Page 16: Network Security:  GSM and 3G Security

19

Using countersCounters must be monotonically increasing

Never accept previously used valuesPersistent state storage needed

Recovering from lost synchronization:Verifier can maintain a window of acceptable values to recover from message loss or reorderingProtocol for resynchronization if badly off

Values must not be exhaustedLimit the rate at which values can be consumedBut support bursts of activityLong enough counter to last equipment or key lifetime

Page 17: Network Security:  GSM and 3G Security

UMTS authentication and key agreement (AKA)

Page 18: Network Security:  GSM and 3G Security

21

UMTS AKAAKA = authentication and key agreementBased on GSM authenticationMutual authenticationSequence number for freshness to mobile → saves one roundtrip to AuC→ authentication vectors can be retrieved early, several at a time

Why is this so important? Why not just use a client nonce?

Page 19: Network Security:  GSM and 3G Security

22

UMTS AKA (simplified)

Encryption and integrity protection with CK, IK

Network

Phone

RAND, AUTN [SQN, MAC]

RES

RES= XRES?

MAC = XMAC?

XMAC = f1 (K, RAND,SQN)RES = f2 (K, RAND)CK = f3 (K, RAND)IK = f4 (K, RAND)

K, SQN

K, SQN

MAC = f1 (K, RAND,SQN)XRES = f2 (K, RAND)CK = f3 (K, RAND)IK = f4 (K, RAND)

Page 20: Network Security:  GSM and 3G Security

23

UMTS AKA (simplified)

Encryption and integrity protection with CK, IK

MSC/VLR AuCRNCPhone

IMSI

RAND, AUTN [SQN, MAC], XRES, CK, IK

RAND, AUTN [SQN, MAC]

RES

RES= XRES?

MAC = XMAC?

MAC = f1 (K, RAND,SQN)XRES = f2 (K, RAND)CK = f3 (K, RAND)IK = f4 (K, RAND)

K, SQN

K, SQN

CK, IK

MAC = f1 (K, RAND,SQN)XRES = f2 (K, RAND)CK = f3 (K, RAND)IK = f4 (K, RAND)

Page 21: Network Security:  GSM and 3G Security

24

UMTS AKA

Encryption and integrity protection CK, IK

NetworkUE =

ME + USIM

RAND, AUTN [SQN⊕AK, AMF, MAC]

RES

RES= XRES?

MAC = XMAC?

MAC = f1 (K, RAND,SQN,AMF)XRES = f2 (K, RAND)CK = f3 (K, RAND)IK = f4 (K, RAND)AK = f5 (K, RAND)

K, SQN

K, SQN

MAC = f1 (K, RAND,SQN,AMF)XRES = f2 (K, RAND)CK = f3 (K, RAND)IK = f4 (K, RAND)AK = f5 (K, RAND)

Page 22: Network Security:  GSM and 3G Security

26

Encryption and integrity protection with CK, IK

MSC/VLR AuCRNCUE =

ME + USIM

MAP authentication data request: IMSI

User authentication request:RAND, AUTN [SQN⊕AK, AMF, MAC]

User authentication response: RES

RES= XRES?

MAC = XMAC?

MAC = f1 (K, RAND,SQN,AMF)XRES = f2 (K, RAND)CK = f3 (K, RAND)IK = f4 (K, RAND)AK = f5 (K, RAND)

K, SQN

K, SQN

RANAP security mode command: CK, IK

RRC security mode command

MAC = f1 (K, RAND,SQN,AMF)XRES = f2 (K, RAND)CK = f3 (K, RAND)IK = f4 (K, RAND)AK = f5 (K, RAND)

MAP authentication data response: one of more

authentication vectors<RAND, AUTN [SQN⊕AK, AMF,

MAC], XRES, CK, IK, AK>

UMTS AKA

Page 23: Network Security:  GSM and 3G Security

28

Sequence number SQNImplementation can be changed in USIM and AuC

Length is fixed to 48 bits

One suggested implementation:

SEQ2 — time counter, 224 seconds = 194 days, individual mobilemay run ahead of the global time but can never be left behind(Note: the clock is local to AuC; mobile has no secure clock!)SEQ1 — per-mobile epoch counter, incremented when SEQ2 wraps, or appears to wrapIND — partitions the SQN space to independent sequences; highest used SEQ1|SEQ2 stored independently for each IND value 0..31

IND enables creation of multiple simultaneously valid authentication vectors

Enables buffering of unused authentication vectors in VLREnables parallel authentication in CS, PS, IMS and WLAN domains

IND (5 bits)SEQ1 (19 bits) SEQ2 (24 bits)

Page 24: Network Security:  GSM and 3G Security

30

RSQ Resynchronization

MSC/VLR AuCUE =

ME + USIM

IMSI

RAND, AUTN [SQN⊕AK, AMF, MAC], XRES, CK,IK,AK

RAND, AUTN [SQN⊕AK, AMF, MAC]

AUTS [ SQN⊕AK, MAC-S ]

MAC = XMAC?

MAC = f1 (K, RAND,SQN,AMF)AK = f5 (K, RAND)

K, SQN

K, SQN

SQN too high!MAC-S = f1* (K, RAND,SQN,AMF)

RAND, AUTS [ SQN⊕AK, MAC-S ]

Update stored SQN

Page 25: Network Security:  GSM and 3G Security

35

UMTS security weaknessesIMSI may still be sent in clearIMEI still not authenticatedNon-repudiation for roaming charges is still based on server logs. No public-key signaturesStill no end-to-end security

Thousands of legitimate radio network operators Any government or big business gain control of one and intercept calls at RNC

Page 26: Network Security:  GSM and 3G Security

36

Backward compatibility3G users may roam in GSM networks:

Challenge RAND = c1(RAND)Response SRES = c2(RES)Encryption key Kc = c3 (CK, IK)

Possible because the keys and algorithms are shared between SIM and AuC only, not by the mobile equipment or radio network

Page 27: Network Security:  GSM and 3G Security

37

Puzzle of the day

Direction Protocol Src IP addr Src port Dst IP addr Dst port Action

Outbound TCP 1.2.3.0/24 * * 80 Allow

Inbound TCP * 80 1.2.3.0/24 * Allow

Any * * * * * Block

What weakness is there in this stateless firewall filtering policy? (1.2.3.0/24 = local addresses)

Page 28: Network Security:  GSM and 3G Security

38

ExercisesWho could create false location traces in the GSM HLR and how? Is this possible in UMTS?Consider replacing the counter with a client nonce in AKA. What would you lose?Try to design a protocol where the IMSI is never sent over the air interface, i.e. the subscriber identity is never sent in clear. Remember that the terminal may have just landed from an intercontinental flight, and the terminal does not know whether it has or notFind the current cost of an IMSI catcher and fake GSM/3G base station for intercepting calls

Page 29: Network Security:  GSM and 3G Security

39

Related readingGollmann, Computer security, 3rd ed. chaptes 19.2–19.3