d2t1 - the grugq - attacking gsm basestations

77
Base Jumping Attacking the GSM baseband and base station [email protected] Thursday, 14 October 2010

Upload: hlias-alafogiannis

Post on 28-Apr-2015

58 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: D2T1 - The Grugq - Attacking GSM Basestations

Base Jumping

Attacking the GSM baseband and base station

[email protected]

Thursday, 14 October 2010

Page 2: D2T1 - The Grugq - Attacking GSM Basestations

Overview

❖GSM❖Base Station❖Base Band❖Conclusion

2

Thursday, 14 October 2010

Page 3: D2T1 - The Grugq - Attacking GSM Basestations

GSM: The Protocol

3

Thursday, 14 October 2010

Page 4: D2T1 - The Grugq - Attacking GSM Basestations

Documents

4

❖Dozens of docs❖Thousands of pages❖Important one (defines L3)

❖GSM 04 08

Thursday, 14 October 2010

Page 5: D2T1 - The Grugq - Attacking GSM Basestations

5

Thursday, 14 October 2010

Page 6: D2T1 - The Grugq - Attacking GSM Basestations

6

Thursday, 14 October 2010

Page 7: D2T1 - The Grugq - Attacking GSM Basestations

7

Logical Channels

Broadcast Channels (BCH)     Broadcast Control Channel (BCCH)     Frequency Correction Channel (FCCH)     Synchronization Channel (SCH)     Cell Broadcast Channel (CBCH)

Thursday, 14 October 2010

Page 8: D2T1 - The Grugq - Attacking GSM Basestations

Logical Channels, cont.❖ Common Control Channels (CCCH)     Paging Channel (PCH)     Random Access Channel (RACH)     Access Grant Channel (AGCH)

8

Thursday, 14 October 2010

Page 9: D2T1 - The Grugq - Attacking GSM Basestations

Logical Channels, cont.

Standalone Dedicated Control Channel (SDCCH)     Associated Control Channel (ACCH)     Fast Associated Control Channel (FACCH)     Slow Associated Control Channel (SACCH)

9

Thursday, 14 October 2010

Page 10: D2T1 - The Grugq - Attacking GSM Basestations

GSM Channels

10

❖Opening a channel is slow❖Can take seconds

❖Specific channels for specific uses

Thursday, 14 October 2010

Page 11: D2T1 - The Grugq - Attacking GSM Basestations

Opening a channel

11

Thursday, 14 October 2010

Page 12: D2T1 - The Grugq - Attacking GSM Basestations

12

Thursday, 14 October 2010

Page 13: D2T1 - The Grugq - Attacking GSM Basestations

12

RACH

Thursday, 14 October 2010

Page 14: D2T1 - The Grugq - Attacking GSM Basestations

12

RACH

AGCH

Thursday, 14 October 2010

Page 15: D2T1 - The Grugq - Attacking GSM Basestations

12

RACH

AGCH

LCH

Thursday, 14 October 2010

Page 16: D2T1 - The Grugq - Attacking GSM Basestations

13

Thursday, 14 October 2010

Page 17: D2T1 - The Grugq - Attacking GSM Basestations

13

PCH

Thursday, 14 October 2010

Page 18: D2T1 - The Grugq - Attacking GSM Basestations

13

RACH

PCH

Thursday, 14 October 2010

Page 19: D2T1 - The Grugq - Attacking GSM Basestations

13

RACH

PCH

AGCH

Thursday, 14 October 2010

Page 20: D2T1 - The Grugq - Attacking GSM Basestations

13

RACH

PCH

AGCH

LCH

Thursday, 14 October 2010

Page 21: D2T1 - The Grugq - Attacking GSM Basestations

14

MS

BTS

BTSBSCMSC

ARFCN

Thursday, 14 October 2010

Page 22: D2T1 - The Grugq - Attacking GSM Basestations

15

Base Transceiver StationBTS

Base StationController

BSC

Mobile StationController

MSC

Mobile StationMS

Base Station Sub-SystemBSS

Thursday, 14 October 2010

Page 23: D2T1 - The Grugq - Attacking GSM Basestations

16

MSBSSMSCHLR

VLR

Thursday, 14 October 2010

Page 24: D2T1 - The Grugq - Attacking GSM Basestations

Mobile Identifiers

17

Thursday, 14 October 2010

Page 25: D2T1 - The Grugq - Attacking GSM Basestations

18

Thursday, 14 October 2010

Page 26: D2T1 - The Grugq - Attacking GSM Basestations

18

IMSI

Thursday, 14 October 2010

Page 27: D2T1 - The Grugq - Attacking GSM Basestations

18

IMSI

IMEI

Thursday, 14 October 2010

Page 28: D2T1 - The Grugq - Attacking GSM Basestations

18

IMSI

IMEI

Thursday, 14 October 2010

Page 29: D2T1 - The Grugq - Attacking GSM Basestations

18

IMSI

IMEI

Thursday, 14 October 2010

Page 30: D2T1 - The Grugq - Attacking GSM Basestations

18

IMSI

IMEI

Thursday, 14 October 2010

Page 31: D2T1 - The Grugq - Attacking GSM Basestations

18

IMSI

IMEI

Thursday, 14 October 2010

Page 32: D2T1 - The Grugq - Attacking GSM Basestations

18

IMSI

IMEI

Thursday, 14 October 2010

Page 33: D2T1 - The Grugq - Attacking GSM Basestations

GSM Attacks

19

Thursday, 14 October 2010

Page 34: D2T1 - The Grugq - Attacking GSM Basestations

20

Thursday, 14 October 2010

Page 35: D2T1 - The Grugq - Attacking GSM Basestations

RACHell

21

❖Request channel allocation❖Flood the BSS with requests❖First announced by Dieter Spaar at DeepSec

❖Prevent everyone from using that cell

Thursday, 14 October 2010

Page 36: D2T1 - The Grugq - Attacking GSM Basestations

22

RACHell

Thursday, 14 October 2010

Page 37: D2T1 - The Grugq - Attacking GSM Basestations

22

RACHell

Thursday, 14 October 2010

Page 38: D2T1 - The Grugq - Attacking GSM Basestations

22

RACHell

Thursday, 14 October 2010

Page 39: D2T1 - The Grugq - Attacking GSM Basestations

22

RACHell

Thursday, 14 October 2010

Page 40: D2T1 - The Grugq - Attacking GSM Basestations

22

RACHell

Thursday, 14 October 2010

Page 41: D2T1 - The Grugq - Attacking GSM Basestations

22

RACHell

Thursday, 14 October 2010

Page 42: D2T1 - The Grugq - Attacking GSM Basestations

22

?

RACHell

Thursday, 14 October 2010

Page 43: D2T1 - The Grugq - Attacking GSM Basestations

23

Thursday, 14 October 2010

Page 44: D2T1 - The Grugq - Attacking GSM Basestations

23

Our Target

Thursday, 14 October 2010

Page 45: D2T1 - The Grugq - Attacking GSM Basestations

Demo - RACHell

24

Thursday, 14 October 2010

Page 46: D2T1 - The Grugq - Attacking GSM Basestations

IMSI Flood

❖Send IMSI ATTACH messages❖pre-authentication❖Overload the HLR/VLR infrastructure❖Prevent everyone using the network

25

Thursday, 14 October 2010

Page 47: D2T1 - The Grugq - Attacking GSM Basestations

26

IMSI Flood

Thursday, 14 October 2010

Page 48: D2T1 - The Grugq - Attacking GSM Basestations

26

IMSI Flood

Thursday, 14 October 2010

Page 49: D2T1 - The Grugq - Attacking GSM Basestations

26

IMSI Flood

Thursday, 14 October 2010

Page 50: D2T1 - The Grugq - Attacking GSM Basestations

26

IMSI Flood

Thursday, 14 October 2010

Page 51: D2T1 - The Grugq - Attacking GSM Basestations

26

IMSI Flood

Thursday, 14 October 2010

Page 52: D2T1 - The Grugq - Attacking GSM Basestations

26

IMSI Flood

Thursday, 14 October 2010

Page 53: D2T1 - The Grugq - Attacking GSM Basestations

26

IMSI Flood

Thursday, 14 October 2010

Page 54: D2T1 - The Grugq - Attacking GSM Basestations

IMSI DETACH

❖Send multiple Location Update Requests including a spoofed IMSI❖Unauthenticated

❖Prevent SIM from receiving calls and SMS

❖Discovered by Sylvain Munaut

27

Thursday, 14 October 2010

Page 55: D2T1 - The Grugq - Attacking GSM Basestations

28

IMSI DETACH

Thursday, 14 October 2010

Page 56: D2T1 - The Grugq - Attacking GSM Basestations

28

IMSI DETACH

Thursday, 14 October 2010

Page 57: D2T1 - The Grugq - Attacking GSM Basestations

28

IMSI DETACH

Thursday, 14 October 2010

Page 58: D2T1 - The Grugq - Attacking GSM Basestations

28

IMSI DETACH

Thursday, 14 October 2010

Page 59: D2T1 - The Grugq - Attacking GSM Basestations

28

IMSI DETACH

Thursday, 14 October 2010

Page 60: D2T1 - The Grugq - Attacking GSM Basestations

28

IMSI DETACH

Thursday, 14 October 2010

Page 61: D2T1 - The Grugq - Attacking GSM Basestations

28

IMSI DETACH

Thursday, 14 October 2010

Page 62: D2T1 - The Grugq - Attacking GSM Basestations

How hard to get an IMSI?

29

Thursday, 14 October 2010

Page 63: D2T1 - The Grugq - Attacking GSM Basestations

Baseband Fuzzing

30

Thursday, 14 October 2010

Page 64: D2T1 - The Grugq - Attacking GSM Basestations

31

=+

How to make a smartphone

Thursday, 14 October 2010

Page 65: D2T1 - The Grugq - Attacking GSM Basestations

32

Two separate computers

Thursday, 14 October 2010

Page 66: D2T1 - The Grugq - Attacking GSM Basestations

32

Two separate computers

Thursday, 14 October 2010

Page 67: D2T1 - The Grugq - Attacking GSM Basestations

33

Baseband

❖Controls the radio❖Separate CPU and code base❖RTOS❖Written in C❖Typically legacy code base (decades)

Thursday, 14 October 2010

Page 68: D2T1 - The Grugq - Attacking GSM Basestations

GSM Frame Delivery

❖OpenBTS + XML-RPC❖ lch_open(char * IMSI)❖ lch_send(int fd, char *buf, size_t len)❖ lch_recv(int fd, char *buf, size_t len)❖ lch_close(int fd)

34

Thursday, 14 October 2010

Page 69: D2T1 - The Grugq - Attacking GSM Basestations

GSM Fuzzing Framework

❖USRP + OpenBTS for delivery❖GSM900 band❖BugMine case generation & mutation❖No Instrumentation

❖Very bad visibility on bugs

35

Thursday, 14 October 2010

Page 70: D2T1 - The Grugq - Attacking GSM Basestations

Coseinc GSM FuzzFarm❖Targetting

❖ iPhone❖HTC (Android)❖Palm Pre❖Blackberry❖Nokia

36

Thursday, 14 October 2010

Page 71: D2T1 - The Grugq - Attacking GSM Basestations

37

Thursday, 14 October 2010

Page 72: D2T1 - The Grugq - Attacking GSM Basestations

38

Thursday, 14 October 2010

Page 73: D2T1 - The Grugq - Attacking GSM Basestations

Conclusion

39

Thursday, 14 October 2010

Page 74: D2T1 - The Grugq - Attacking GSM Basestations

GSM Trouble

40

❖GSM is no longer a walled garden❖GSM spec has security problems❖Expect many more issues as OSS reduces costs for entry

Thursday, 14 October 2010

Page 75: D2T1 - The Grugq - Attacking GSM Basestations

Future work

❖More GSM stack fuzzing❖Next gen protocol stacks

41

Thursday, 14 October 2010

Page 76: D2T1 - The Grugq - Attacking GSM Basestations

42

Thanks to

Harald Welte, Osmocom-bb & OpenBTS

Thursday, 14 October 2010

Page 77: D2T1 - The Grugq - Attacking GSM Basestations

Questions?

43

Thursday, 14 October 2010