Mobile telephony Joeri de Ruiter Agenda Introducton 2G / 3G / 4G - - PowerPoint PPT Presentation

mobile telephony
SMART_READER_LITE
LIVE PREVIEW

Mobile telephony Joeri de Ruiter Agenda Introducton 2G / 3G / 4G - - PowerPoint PPT Presentation

Advanced Network Security Mobile telephony Joeri de Ruiter Agenda Introducton 2G / 3G / 4G Security Authentcaton Cryptography Eavesdropping Privacy Tracking A solutonn PPNSI 2 Telephony security


slide-1
SLIDE 1

Advanced Network Security

Mobile telephony

Joeri de Ruiter

slide-2
SLIDE 2

2

Agenda

  • Introducton
  • 2G / 3G / 4G
  • Security

Authentcaton

Cryptography

  • Eavesdropping
  • Privacy
  • Tracking
  • A solutonn PPNSI
slide-3
SLIDE 3

3

Telephony security

Sourcen htpn/ /sites.psu.edu/thedeepweb/2015/09/17/captain-crunch-and-his-toy-whistle/

slide-4
SLIDE 4

4

Introducton

  • Standards by ETSI and 3GPP
  • 2Gn GSPN (Global System for PNobile Communicaton)
  • 2.5Gn GPRS (General Packet Radio Service)
  • 3Gn UPNTS (Universal PNobile Telecommunicatons System)
  • 4Gn LTE (Long Term Evoluton)
  • 5G
  • About 8.5 billion connectons and 5 billion subscribers
slide-5
SLIDE 5

5

2G (GSPN)

  • 1G was analogue without any encrypton in place
  • 2G deployed in 1990s
  • 2G is digital and provides authentcaton and encrypton
  • Stll relevant for ICS/SCADA systems (e.g. ERTPNS)
slide-6
SLIDE 6

6

GSPN-R

  • Part of ERTPNS (European Rail Trafc PNanagement System)
  • Used for communicaton between personnel as well as trains and track-side

equipment

  • Used, for example, to grant trains permission to drive on parts of the tracks

and to provide speed limits

slide-7
SLIDE 7

7

Identiers

IPNEI (Internatonal PNobile Subscriber Identty) IPNSI (Internatonal PNobile Subscriber Identty)

  • Home country
  • Home network
  • User
slide-8
SLIDE 8

8

2G - Architecture

SIPN (Subscriber Identty PNodule) PNE (PNobile Equipment) MS (Mobile Staton) Access Network BTS (Base Transceiver Staton) BTS (Base Transceiver Staton) BSC (Base Staton Controller) PNSC (PNobile Switching Center) AuC (Authentcaton Center) VLR (Visitor Locaton Register) HLR (Home Locaton Register) Gateways PSTN and Internet Core Network

slide-9
SLIDE 9

9

2G - Architecture

  • Visitor Locaton Register (VLR) keeps track of phones present in its area
  • PNapping between IPNSI and TPNSI
  • Home Locaton Register (HLR) stores permanent informaton about

subscribers

  • Authentcaton Center (AuC) stores long-term shared secrets with SIPNs
slide-10
SLIDE 10

10

2G - Authentcaton

  • Authentcaton and Key Agreement (AKA)
  • Shared symmetric key K between SIPN and home network
  • Two algorithms, A3 and A8
  • Can be determined by the provider
slide-11
SLIDE 11

11

2G - Authentcaton

Identty request Identty response, IMSI IMSI RAND, XRES, CK Retrieve K for IPNSI RAND ← {0,1}128 XRES ← A3(K, RAND) CK ← A8(K, RAND) Authenticton request, RAND Authenticton response, SRES SRES ← A3(K, RAND) CK ← A8(K, RAND) Verify XRES = SRES Dctc enirypted with CK

slide-12
SLIDE 12

12

Roaming

  • Phone can use a network diferent than its providers network
  • Visited Network (VN) or Serving Network
  • Home Network (HN)
  • Visitng Network requests authentcaton informaton from Home Network
  • Authentcaton informaton provided by Home Network
  • Visited Network performs authentcaton
  • Visited Network reports presence of phone
  • Home Network informs previous network that phone lef
  • Home Network keeps track of the current locaton of its subscribers
  • Necessary for, e.g., incoming calls
slide-13
SLIDE 13

13

2G - Encrypton algorithms

  • A5/0
  • No encrypton
  • A5/1
  • Proprietary stream cipher
  • A5/2
  • Weaker cipher for export
  • A5/3
  • KASUPNI, a block cipher based on PNISTY

– Used with 64 bit keys

slide-14
SLIDE 14

14

3G (UPNTS)

  • 3G (UPNTS) introduced in 2001
  • Algorithms used for encrypton and PNACs
  • KASUPNI (128 bit key)
  • SNOW 3G, stream cipher by Lund University
  • PNutual authentcaton
slide-15
SLIDE 15

15

3G - Architecture

USIPN (Universal Subscriber Identty PNodule) PNE (PNobile Equipment) MS (Mobile Staton) Access Network Node B Node B RNC (Radio Network Controller) PNSC (PNobile Switching Center) AuC (Authentcaton Center) VLR (Visitor Locaton Register) HLR (Home Locaton Register) Gateways PSTN and Internet Core Network

slide-16
SLIDE 16

16

3G - Authentcaton

Identty request Identty response, IMSI IMSI RAND, AUTN, XRES, CK, IK

Retrieve K and SQN for IPNSI RAND ← {0,1}128 PNAC ← f1(K,SQN,APNF,RAND) XRES ← f2(K,RAND) CK ← f3(K,RAND) IK ← f4(K,RAND) AK ← f5(K,RAND) AUTN ← (SQN XOR AK,APNF,PNAC) Update SQN ← SQN + 1

Authenticton request, RAND, AUTN Authenticton response, SRES

AK ← f5(K,RAND) XSQN ← (SQN XOR AK) XOR AK XPNAC ← f1(K,XSQN,APNF,RAND) Verify XPNAC = PNAC Verify SQN <= XSQN <= SQN + range Update SQN ← XSQN SRES ← f2(K,RAND) CK ← f3(K,RAND) IK ← f4(K,RAND) Verify XRES = SRES

Dctc enirypted with CK cnd cuthenticted with IK

slide-17
SLIDE 17

17

3G - Authentcaton

  • Functons f1 to f5 not standardised
  • Only used by SIPN card and provider’s authentcaton server
  • Recommendaton for f1 to f5 is to use Rijndael
slide-18
SLIDE 18

18

4G (LTE)

  • 4G (LTE) introduced in 2010
  • Almost 90% coverage reported by Open Signal in February 2018
  • Algorithms used for encrypton and PNACs
  • SNOW 3G
  • AES
  • Cell towers are assumed to be smarter
  • Separaton between signal and data channel
  • Signal channel encrypted between phone and core network
  • Data channel encrypted between phone and cell tower
  • Possible to perform handover directly between cell towers
slide-19
SLIDE 19

19

4G - Authentcaton

  • Authentcaton protocol the same as 3G
  • PNore elaborate key hierarchy
  • Reduce tmes necessary to execute (slow) AKA protocol
  • Cell towers get their own keys
  • PNechanisms to protect against compromise of cell towers
slide-20
SLIDE 20

20 Cell tower

4G – Key hierarchy

K CK, IK

AKA

KASPNE ID of Visitng Network KeNB Signal data keys User data keys

Home network Visitnn network

slide-21
SLIDE 21

21

4G - Handover

  • Handover between cell towers can be done without interference of backend
  • Key update mechanisms to provide forward and backward security
  • Only involving cell towers provides backward security
  • Involving backend also provides forward security
  • SIPN and backend generate the Next-hop parameter (NH)
  • Based on a shared secret and counter
slide-22
SLIDE 22

22

4G – Key derivaton

KeNB KASPNE NH KeNB NH KeNB KeNB

Cell info Cell info

KeNB KeNB KeNB

Cell info Cell info Cell info

KeNB KeNB KeNB

Cell info Cell info Cell info

NCC = 1 NCC = 2

slide-23
SLIDE 23

23

Authentcaton comparison

Sourcen PNobile communicaton security, Fabian van den Broek, 2016

slide-24
SLIDE 24

24

Eavesdropping

  • Diferent approaches
  • Passive
  • Actve (i.e. with a man-in-the-middle)
  • Works mainly well with 2G
  • Only authentcaton of the phone
  • Weak or no encrypton supported
  • Ofen fallback to 2G is possible
slide-25
SLIDE 25

25

Run your own network

  • Possible using a Sofware Deined Radio (SDR) and open source sofware (e.g.

OpenBTS)

  • Pretend to be your victms network and get them to connect to you
  • E.g. by jamming or providing a stronger signal
slide-26
SLIDE 26

26

PNan-in-the-middle (2G)

Identty request Identty response, IMSI Authenticton request, RAND Authenticton response, SRES SRES ← A3(K, RAND) CK ← A8(K, RAND) Unenirypted dctc VoIP

  • Use A5/0 (no encrypton)
  • Forward calls via VoIP
  • No incoming calls
slide-27
SLIDE 27

27

PNan-in-the-middle (2G)

Identty request Identty response, IMSI Authenticton request, RAND Authenticton response, SRES SRES ← A3(K, RAND) CK ← A8(K, RAND) Dummy dctc (A5/2) Retrieve key CK Authenticton response, SRES Dctc (A5/3) Dctc (A5/2) Identty request Identty response, IMSI Authenticton request, RAND

Instant Ciphertext-Only Cryptanalysis of GSPN Encrypted Communicaton, Barkan et al., 2010

slide-28
SLIDE 28

28

Eavesdropping

  • Complete solutons available for governmental organisatons
slide-29
SLIDE 29

29

Interceptng signals

  • Again using Sofware Deined Radios (SDR) and open source sofware (e.g.

AirProbe)

slide-30
SLIDE 30

30

Interceptng signals

  • Problemn channel hopping
  • Solutonn multple or more powerful radios
slide-31
SLIDE 31

31

Cracking A5/1

  • Weak algorithm
  • First atack publicly described by Anderson in 1994
  • PNany more research since then
  • A5/1 is a stream cipher, so if you have known plaintext you have part of the

keystream

slide-32
SLIDE 32

32

Cracking A5/1

  • Rainbow tables available to quickly retrieve used key
  • Known as Berlin tables
  • Released in 2010
  • Around 2TB
  • Probabilistc
  • Limited amount of known plaintext necessary
  • Shortly aferwards the tool Kraken was released that could use these tables

to crack GSPN trafc

slide-33
SLIDE 33

33

Cracking A5/2

  • A5/2 was purposefully weak for export
  • Can be cracked in seconds
  • Barkan et al., 2010
  • No longer allowed in new phones since 2007
slide-34
SLIDE 34

34

Cracking A5/3

  • Atack published Dunkelman et al. in 2010
  • Theoretcal atack that might not be practcal
  • KASUPNI weaker than PNISTY on which it is based
slide-35
SLIDE 35

35

SS7

  • Signaling System 7
  • Used in the core network and to communicate between providers
  • For example, used to exchange authentcaton requests, send locaton

updates and deliver SPNS messages

  • From an era where providers trusted each other...
  • Originally when sending an SPNS
  • Ask Home Network current network of phone (i.e. country and provider)
  • Send SPNS directly to the phone’s current network
  • Fixed when using Home Routng
  • Home Network delivers the SPNS
  • PNight enable interceptng for 3G
slide-36
SLIDE 36

36

slide-37
SLIDE 37

37

Privacy

  • IPNSI catchers (a.k.a. StngRay) can be used to
  • Track users
  • PNonitor locatons
  • Link identtes to devices
  • Can pretend to be a base staton to get to

phones to connect and learn the IPNSI

Sourcen U.S. Patent and Trademark Ofce / AP Photo

slide-38
SLIDE 38

38

Privacy

  • IPNSI is always provided upon request
  • No protecton provided by mutual authentcaton
  • TPNSI introduced to provide some anonymity
  • Temporary PNobile Subscriber Identty
  • Can be used instead of IPNSI
  • Provided by the visited network to the phone under encrypton
  • Should only be used for one locaton
  • Can we stll trace users?
slide-39
SLIDE 39

39

Allocaton of TPNSI

Eni(CK, TMSI Reclloicton, newTMSI) Eni(CK, TMSI Reclloicton iompleted)

Discard oldTPNSI Start using newTPNSI Discard oldTPNSI Start using newTPNSI

slide-40
SLIDE 40

40

TPNSI reallocaton atack

Eni(CK, TMSI Reclloicton, newTMSI) Eni(CK, TMSI Reclloicton iompleted) Discard oldTPNSI Start using newTPNSI Discard oldTPNSI Start using newTPNSI Record TPNSI Reallocaton command Eni(CK, TMSI Reclloicton, newTMSI) Replay TPNSI Reallocaton command Eni(CK, TMSI Reclloicton iompleted)

New session with same keys

slide-41
SLIDE 41

41

TPNSI reallocaton atack

  • Atack presented by Arapinis et al.
  • Atacker records an encrypted TPNSI allocaton command
  • Replay the recorded command later to distnguish victm’s phone from others
  • As long as the same keys (CK and, optonally, IK) are used
  • Only victm’s phone will respond to the encrypted command
  • Other phones will ignore it as decrypton fails
  • PNainly a theoretcal atack
slide-42
SLIDE 42

42

3G linkability atack

  • Atack presented by Arapinis et al.
  • Atack on 3G’s AKA protocol
  • Uses the fact that diferent error messages are used for
  • PNAC failure
  • Invalid sequence number
slide-43
SLIDE 43

43

3G linkability atack

Identty request Identty response, IMSI Authenticton request, RAND, AUTN Authenticton response, SRES

Record RAND, AUTN

Authenticton request, RAND, AUTN Error, Syni_Fcil Error, MAC_Fcil

  • r

Same phone Diferent phone

slide-44
SLIDE 44

44

Defeatng IPNSI catchers

  • TPNSI does not provide enough protecton
  • IPNSI can be requested without authentcaton or encrypton
  • Visited network always learns the IPNSI
  • IPNSI is needed to determine the provider and retrieve the shared key
  • How can we protect against the intercepton of IPNSIs?
  • Introduce a new identiern a temporary pseudonym PPNSI

– Provided by the home network

  • Works with minimal modiicaton to the current standards

– IPNSI catching stll possible, but less interestng

  • Additonal beneitn mutual authentcaton for 2G
  • Considered for inclusion in one of the 5G proposals
slide-45
SLIDE 45

45

Defeatng IPNSI catchers

  • PPNSI is shared between the SIPN and provider
  • Same structure as IPNSI
  • First part identies the country and provider
  • Last part identies the user
  • PPNSI is used instead of IPNSI and is regularly updated
  • How do we get the PPNSI to the SIPN?
  • Hijack the RAND variable
slide-46
SLIDE 46

46

3G / 4G - Authentcaton

Identty request Identty response, IMSI IMSI RAND, AUTN, XRES, CK, IK

Retrieve K and SQN for IPNSI RAND ← {0,1}128 PNAC ← f1(K,SQN,APNF,RAND) XRES ← f2(K,RAND) CK ← f3(K,RAND) IK ← f4(K,RAND) AK ← f5(K,RAND) AUTN ← (SQN XOR AK,APNF,PNAC) Update SQN ← SQN + 1

Authenticton request, RAND, AUTN Authenticton response, SRES

AK ← f5(K,RAND) XSQN ← (SQN XOR AK) XOR AK XPNAC ← f1(K,XSQN,APNF,RAND) Verify XPNAC = PNAC Verify SQN <= XSQN <= SQN + range Update SQN ← XSQN SRES ← f2(K,RAND) CK ← f3(K,RAND) IK ← f4(K,RAND) Verify XRES = SRES

Dctc enirypted with CK And cuthenticted with IK

slide-47
SLIDE 47

47

3G / 4G - PPNSI (simpliied)

Identty request Identty response, PMSI PMSI RAND, AUTN, XRES, CK, IK

Retrieve K, KP and SQN for PMSI PMSI’ ← {0,9}10 RAND ← F(KP,PMSI’,SQN) ...

Authenticton request, RAND, AUTN Authenticton response, SRES

… PMSI’, SQN’ ← F-1(KP,RAND) Verify SQN’ = XSQN Update PMSI ← PMSI’ Verify XRES = SRES

Dctc enirypted with CK And cuthenticted with IK

slide-48
SLIDE 48

48

2G - Authentcaton

Identty request Identty response, IMSI IMSI RAND, XRES, CK Retrieve K for IPNSI RAND ← {0,1}128 XRES ← A3(K, RAND) CK ← A8(K, RAND) Authenticton request, RAND Authenticton response, SRES SRES ← A3(K, RAND) CK ← A8(K, RAND) Verify XRES = SRES Dctc enirypted with CK

slide-49
SLIDE 49

49

2G – PPNSI (simpliied)

Identty request Identty response, PMS MSI PMS MSI RAND, XRES, CK

Retrieve K. KP, SQN for PMSI PMSI’ ← {0,9}10 M ← MAC(KP,PMSI’, SQN) RAND ← F(KP,PMSI’,SQN,M) Update SQN ← SQN + 1 ...

Authenticton request, RAND Authenticton response, SRES

PMSI’, SQN’, M’ ← F-1(KP,RAND) M ← MAC(KP,PMSI’,SQN’) Verify M = M’ Verify SQN < SQN’ Update SQN ← SQN’ PMSI ← PMSI’ ... Verify XRES = SRES

Dctc enirypted with CK

slide-50
SLIDE 50

50

Defeatng IPNSI catchers

  • All values it within current lengths of used variables
  • No modiicaton of messages needed
  • Can be implemented by a single provider
  • Only changes needed in SIPN and authentcaton server
  • Actually two PPNSIs stored in SIPN and at provider
  • Current PPNSI
  • Next PPNSI

– Once used promoted to current PPNSI and fresh next PPNSI generated

  • PNAC prevents desynchronisaton atacks in 2G soluton
slide-51
SLIDE 51

51

Further actvites

  • Read chapters 2 and 3 ofn

PNobile communicaton security

Fabian van den Broek PhD thesis, 2016

  • Optonal readingn

Defeatng IPNSI Catchers

Fabian van den Broek, Roel Verdult and Joeri de Ruiter 22nd ACPN SIGSAC Conference on Computer and Communicatons Security (CCS'15), ACPN, 2015

Analysis of privacy in mobile telephony systems

Myrto Arapinis, Loreta Ilaria Mancini, Eike RiterMark D. Ryan Internatonal Journal of Informaton Security, October 2017