Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station...

69
Base Jumping Attacking the GSM baseband and base station [email protected] Tuesday, 20 July 2010

Transcript of Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station...

Page 1: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

Base Jumping

Attacking the GSM baseband and base station

[email protected]

Tuesday, 20 July 2010

Page 2: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

Overview

❖GSM❖Base Station❖Base Band❖Conclusion

2

Tuesday, 20 July 2010

Page 3: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

GSM: The Protocol

3

Tuesday, 20 July 2010

Page 4: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

Documents

4

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

❖GSM 04 08

Tuesday, 20 July 2010

Page 5: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

5

Tuesday, 20 July 2010

Page 6: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

6

Tuesday, 20 July 2010

Page 7: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

7

Logical Channels

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

Tuesday, 20 July 2010

Page 8: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

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

8

Tuesday, 20 July 2010

Page 9: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

Logical Channels, cont.

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

9

Tuesday, 20 July 2010

Page 10: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

GSM Channels

10

❖Opening a channel is slow❖Can take seconds

❖Specific channels for specific uses

Tuesday, 20 July 2010

Page 11: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

Opening a channel

11

Tuesday, 20 July 2010

Page 12: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

12

Tuesday, 20 July 2010

Page 13: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

12

RACH

Tuesday, 20 July 2010

Page 14: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

12

RACH

AGCH

Tuesday, 20 July 2010

Page 15: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

12

RACH

AGCH

LCH

Tuesday, 20 July 2010

Page 16: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

13

Tuesday, 20 July 2010

Page 17: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

13

PCH

Tuesday, 20 July 2010

Page 18: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

13

RACH

PCH

Tuesday, 20 July 2010

Page 19: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

13

RACH

PCH

AGCH

Tuesday, 20 July 2010

Page 20: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

13

RACH

PCH

AGCH

LCH

Tuesday, 20 July 2010

Page 21: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

14

MS

BTS

BTSBSCMSC

ARFCN

Tuesday, 20 July 2010

Page 22: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

15

Base Transceiver StationBTS

Base StationController

BSC

Mobile StationController

MSC

Mobile StationMS

Base Station Sub-SystemBSS

Tuesday, 20 July 2010

Page 23: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

16

MSBSSMSCHLR

VLR

Tuesday, 20 July 2010

Page 24: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

Mobile Identifiers

17

Tuesday, 20 July 2010

Page 25: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

18

Tuesday, 20 July 2010

Page 26: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

18

IMSI

Tuesday, 20 July 2010

Page 27: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

18

IMSI

IMEI

Tuesday, 20 July 2010

Page 28: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

GSM Attacks

19

Tuesday, 20 July 2010

Page 29: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

20

Tuesday, 20 July 2010

Page 30: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

RACHell

21

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

❖Prevent everyone from using that cell

Tuesday, 20 July 2010

Page 31: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

22

RACHell

Tuesday, 20 July 2010

Page 32: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

22

RACHell

Tuesday, 20 July 2010

Page 33: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

22

RACHell

Tuesday, 20 July 2010

Page 34: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

22

RACHell

Tuesday, 20 July 2010

Page 35: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

22

RACHell

Tuesday, 20 July 2010

Page 36: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

22

RACHell

Tuesday, 20 July 2010

Page 37: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

22

?

RACHell

Tuesday, 20 July 2010

Page 38: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

23

Tuesday, 20 July 2010

Page 39: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

23

Our Target

Tuesday, 20 July 2010

Page 40: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

Demo - RACHell

24

Tuesday, 20 July 2010

Page 41: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

IMSI Flood

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

25

Tuesday, 20 July 2010

Page 42: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

26

IMSI Flood

Tuesday, 20 July 2010

Page 43: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

26

IMSI Flood

Tuesday, 20 July 2010

Page 44: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

26

IMSI Flood

Tuesday, 20 July 2010

Page 45: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

26

IMSI Flood

Tuesday, 20 July 2010

Page 46: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

26

IMSI Flood

Tuesday, 20 July 2010

Page 47: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

26

IMSI Flood

Tuesday, 20 July 2010

Page 48: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

26

IMSI Flood

Tuesday, 20 July 2010

Page 49: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

How hard to get an IMSI?

27

Tuesday, 20 July 2010

Page 50: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

IMSI DETACH

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

❖Prevent SIM from receiving calls and SMS

❖Discovered by Sylvain Munaut

28

Tuesday, 20 July 2010

Page 51: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

29

IMSI DETACH

Tuesday, 20 July 2010

Page 52: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

29

IMSI DETACH

Tuesday, 20 July 2010

Page 53: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

29

IMSI DETACH

Tuesday, 20 July 2010

Page 54: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

29

IMSI DETACH

Tuesday, 20 July 2010

Page 55: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

29

IMSI DETACH

Tuesday, 20 July 2010

Page 56: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

29

IMSI DETACH

Tuesday, 20 July 2010

Page 57: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

29

IMSI DETACH

Tuesday, 20 July 2010

Page 58: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

Baseband Fuzzing

30

Tuesday, 20 July 2010

Page 59: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

31

=+

How to make a smartphone

Tuesday, 20 July 2010

Page 60: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

32

Two separate computers

Tuesday, 20 July 2010

Page 61: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

32

Two separate computers

Tuesday, 20 July 2010

Page 62: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

33

Baseband

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

Tuesday, 20 July 2010

Page 63: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

Coseinc GSM FuzzFarm❖OpenBTS based fuzzer delivery engine

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

34

Tuesday, 20 July 2010

Page 64: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

35

Tuesday, 20 July 2010

Page 65: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

Conclusion

36

Tuesday, 20 July 2010

Page 66: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

GSM Trouble

37

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

Tuesday, 20 July 2010

Page 67: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

Future work

❖More GSM stack fuzzing❖Next gen protocol stacks

38

Tuesday, 20 July 2010

Page 68: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

39

Thanks to

Harald Walte, Osmocom-bb & OpenBTS

Tuesday, 20 July 2010

Page 69: Base Jumping - Black Hat Briefings · Base Jumping Attacking the GSM baseband and base station grugq@coseinc.com ... Base Transceiver Station BTS Base Station Controller BSC Mobile

Questions?

40

Tuesday, 20 July 2010