gsm security: fact and fiction - brucon...

73
GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud University Nijmegen Institute for Computing and Information Sciences (iCIS) 24 September 2010

Upload: others

Post on 25-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM SECURITY: FACT AND FICTION

BruCON 2010

Fabian van den Broek

Radboud University NijmegenInstitute for Computing and Information Sciences (iCIS)

24 September 2010

Page 2: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Some Numbers

Page 3: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Some Numbers

• $ 600 Billion

Page 4: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Some Numbers

• $ 600 Billion

• 90% of population has coverage

Page 5: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Some Numbers

• $ 600 Billion

• 90% of population has coverage

• 4.1 billion mobile users

Page 6: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Some Numbers

• $ 600 Billion

• 90% of population has coverage

• 4.1 billion mobile users

But has GSM been properly tested?

Page 7: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Outline of this talk

• GSM overview

• GSM security

• Attacks

• Conclusion

Page 8: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM overview

Page 9: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Cellular technology

Page 10: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Cellular technology

Page 11: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Cellular technology

Page 12: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Cellular technology

Page 13: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Cellular technology

Page 14: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Phone call routing

Page 15: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Phone call routing

Page 16: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Phone call routing

Page 17: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM system overview

Page 18: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM system overview

Page 19: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM system overview

Page 20: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Some important identifiers

• IMSI

• IMEI

• Phone number

• Secret key: Ki

Page 21: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM security

Page 22: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM security

• Authentication• A3• A8• COMP128

• Encryption• A5/0• A5/1• A5/2• A5/3

Page 23: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM security

• Authentication• A3• A8• COMP128

• Encryption• A5/0• A5/1• A5/2• A5/3

Page 24: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM security

• Authentication• A3• A8• COMP128

• Encryption• A5/0• A5/1• A5/2• A5/3

Page 25: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM authentication

Page 26: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM authentication

Page 27: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM authentication

Page 28: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM authentication

Page 29: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM authentication

Page 30: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM authentication

Page 31: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM authentication

Page 32: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM Encryption

Page 33: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM Encryption

Page 34: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

GSM Encryption

Page 35: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Attacks

Page 36: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Attack 1: Eavesdropping

Page 37: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Eavesdropping on GSM

1 Capture bursts

2 Decrypt captured bursts

3 Interpret decrypted bursts

Page 38: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

3: Interpret decrypted bursts

You have several options here:

• GSMDecode (AirProbe)

• WireShark

• OpenBTS / OpenBSC

Page 39: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

2: Decrypt captured bursts

Release the Kraken!

Page 40: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Breaking A5/1

• Reverse engineered in 1994

• Academic breaks

• Time-Memory-Trade-Off attacks• Currently:

• Berlin set & Kraken

Page 41: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Using Kraken

1 Capture a burst

2 “Guess” contents

3 Compute keystream

4 Look-up corresponding session key

Page 42: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

1: Capture burst

USRP + GNU Radio + AirProbe

Page 43: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

The Um interface

Page 44: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Frequency band

Page 45: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

An example cell

Page 46: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

No Frequency hopping

Page 47: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Frequency hopping

Page 48: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Frequency hopping

Page 49: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Message Sequence

Page 50: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Message Sequence

Page 51: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Message Sequence

Page 52: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Message Sequence

Page 53: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Message Sequence

Page 54: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Message Sequence

Page 55: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Message Sequence

Page 56: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Hopping Problem

Page 57: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Attack 2: the MITM attack

Page 58: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

The Man-In-The-Middle Attack

Page 59: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

The Man-In-The-Middle Attack

BTSPaging

Assign channel

Exchange

Ciphering started

Request channel

Info

Ciphering started

Start Ciphering A5/x

exchange info

Conversation

Ass. speech chn.

exchange info

Conversation

Ass. speech chn.

Start Ciphering A5/2

BTS

Page 60: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

The Man-In-The-Middle Attack

Ingredients:

• BTS: OpenBTS / OpenBSC

• Phone: OsmocomBB

Problems:

• Hopping problem

• Time window

• Detectable

Page 61: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

MITM the easy way

Just link OpenBTS to Asterisk

Downsides:

• No incoming calls

• Calling number obscured

Upside:

• It already works

Page 62: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

MITM the easy way

Just link OpenBTS to Asterisk

Downsides:

• No incoming calls

• Calling number obscured

Upside:

• It already works

Page 63: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Yet another way

A sort of hybrid attack between MITM and eavesdropping

1 Capture challenge

2 Capture conversation

3 Fake BTS attack with challenge

Page 64: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Some other attacks

Page 65: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Other attacks

• IMSI catchers

• Attacks on other parts of the network

• Nokia 1100

• Locations revealed

• DoS attacks

Page 66: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

There’s hope still

GSM was 2G

3G uses mutual authentication

4G might use AES

Page 67: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

What can you do now?

GSM will be around for a long time.

• Use solely 3G

• Use crypto solutions

Page 68: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Conclusions

Page 69: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Conclusion

• Eavesdropping, full-MITM and hybrid still need work

• Easy-MITM works

• Many other attacks are possible

Page 70: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

....Besides

The weakest link is probably your phone!

See The Monkey Steals the Berries

Page 71: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

....Besides

The weakest link is probably your phone!

See The Monkey Steals the Berries

Page 72: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

Questions

Page 73: GSM security: fact and fiction - BruCON 2010files.brucon.org/2010/brucon2010-GSM-Security-Fact-and-Fiction.pdf · GSM SECURITY: FACT AND FICTION BruCON 2010 Fabian van den Broek Radboud

References

USRP www.ettus.comGNU Radio http://gnuradio.org/OpenBTS http://openbts.sourceforge.net/OpenBSChttp://openbsc.osmocom.org/trac/wiki/OpenBSCAirProbehttps://svn.berlin.ccc.de/projects/airprobe/wikiA5/1, Kraken http://www.reflextor.com/trac/a51OsmocomBB http://bb.osmocom.org/trac/