You are on page 1of 90

Hands-on GSM Analysis with GNU Radio and

AirProbe
GNU Radio Conference 2014

Nico Otterbach | September 15, 2014 | Washington, D.C.

A. Background

The Project

September 2014
1

A. Background

The Project

GSM emergency call handling

September 2014
1

A. Background

The Project

GSM emergency call handling

Creation of protocol traces

September 2014
1

A. Background

The Project

GSM emergency call handling

Creation of protocol traces


eCalls should be rejected (w/o SIM)

September 2014
1

A. Background

The Project

GSM emergency call handling

Creation of protocol traces


eCalls should be rejected (w/o SIM)
Source: rohde-schwarz.com

September 2014
1

A. Background

The Challenge

September 2014
2

A. Background

The Challenge
Technical Challenges
Connect to the network w/o SIM
Base station and channel assignment

September 2014
2

A. Background

The Challenge
Technical Challenges
Connect to the network w/o SIM
Base station and channel assignment

Legal Challenges
Calling 110/911 in a real network
Recording of real network traffic

September 2014
2

A. Background

The Challenge
Technical Challenges
Connect to the network w/o SIM
Base station and channel assignment

Legal Challenges
Calling 110/911 in a real network
Recording of real network traffic

Available open-source projects


GNU Radio
AirProbe
OsmocomBB

September 2014
2

A. Background

The Challenge
Technical Challenges
Connect to the network w/o SIM
Base station and channel assignment

Legal Challenges
Calling 110/911 in a real network
Recording of real network traffic

Available open-source projects


GNU Radio
AirProbe
OsmocomBB

Create required GSM protocol traces with open source tools!

September 2014
2

Outline

A. Background

B. GSM Basics
C. OsmocomBB
D. GNU Radio & AirProbe
E. Summary & Outlook

September 2014
3

B. GSM Basics

Basic GSM Terminology

September 2014
4

B. GSM Basics

Basic GSM Terminology

SIM (Subscriber Identity Module)

[uthmag.com]

September 2014
4

B. GSM Basics

Basic GSM Terminology

SIM (Subscriber Identity Module)


IMSI (International Mobile Subscriber Identity)

[uthmag.com]

September 2014
4

B. GSM Basics

Basic GSM Terminology

SIM (Subscriber Identity Module)


IMSI (International Mobile Subscriber Identity)

IMEI (International Mobile Equipment Identity)


[uthmag.com]

September 2014
4

B. GSM Basics

Basic GSM Terminology

SIM (Subscriber Identity Module)


IMSI (International Mobile Subscriber Identity)

IMEI (International Mobile Equipment Identity)


[uthmag.com]

ARFCN (Absoulte Radio Frequency Channel Number)


Logical GSM channels
Up- & Downlink separated by 45 MHz
(Frequency Hopping)


200

= + 200
September 2014
4

A.

GSM Basics

GSM Emergency Call Handling (w/o SIM)

September 2014
5

A.

GSM Basics

GSM Emergency Call Handling (w/o SIM)

No SIM, no IMSI!
IMEI used as quasi IMSI

[techmtaa.com]

September 2014
5

A.

GSM Basics

GSM Emergency Call Handling (w/o SIM)

No SIM, no IMSI!
IMEI used as quasi IMSI

eCall rejection without valid IMSI


Actually omitted redirection in base station
Optional in GSM standard (mandatory in EU)

[techmtaa.com]

To avoid malpractice

September 2014
5

A.

GSM Basics

GSM Emergency Call Handling (w/o SIM)

No SIM, no IMSI!
IMEI used as quasi IMSI

eCall rejection without valid IMSI


Actually omitted redirection in base station
Optional in GSM standard (mandatory in EU)

[techmtaa.com]

To avoid malpractice

Possible evidence of eCall rejection

September 2014
5

A.

GSM Basics

GSM Emergency Call Handling (w/o SIM)

No SIM, no IMSI!
IMEI used as quasi IMSI

eCall rejection without valid IMSI


Actually omitted redirection in base station
Optional in GSM standard (mandatory in EU)

[techmtaa.com]

To avoid malpractice

Possible evidence of eCall rejection


o Complete protocol trace
(including negotiation and rejection by the network)

September 2014
5

A.

GSM Basics

GSM Emergency Call Handling (w/o SIM)

No SIM, no IMSI!
IMEI used as quasi IMSI

eCall rejection without valid IMSI


Actually omitted redirection in base station
Optional in GSM standard (mandatory in EU)

[techmtaa.com]

To avoid malpractice

Possible evidence of eCall rejection


o Complete protocol trace
(including negotiation and rejection by the network)
o Ideally available in Wireshark

September 2014
5

A.

GSM Basics

GSM Emergency Call Handling (w/o SIM)

No SIM, no IMSI!
IMEI used as quasi IMSI

eCall rejection without valid IMSI


Actually omitted redirection in base station
Optional in GSM standard (mandatory in EU)

[techmtaa.com]

To avoid malpractice

Possible evidence of eCall rejection


o Complete protocol trace
(including negotiation and rejection by the network)
o Ideally available in Wireshark
o Ideally based on cheap hardware

September 2014
5

Outline

A. Background

B. GSM Basics
C. OsmocomBB
D. GNU Radio & AirProbe
E. Summary & Outlook

September 2014
6

C. OsmocomBB

Introducing OsmocomBB

September 2014
7

C. OsmocomBB

Introducing OsmocomBB

Open-source GSM baseband software


Layer 1 on phone, higher layers on host

September 2014
7

C. OsmocomBB

Introducing OsmocomBB

Open-source GSM baseband software


Layer 1 on phone, higher layers on host

Works with cheap hardware


Motorola phones (based on TI Calypso)

Serial adapter (~ 20-30 EUR)


Phones available on eBay (~ 10-20 EUR)

September 2014
7

C. OsmocomBB

Introducing OsmocomBB

Open-source GSM baseband software


Layer 1 on phone, higher layers on host

Works with cheap hardware


Motorola phones (based on TI Calypso)

Serial adapter (~ 20-30 EUR)


Phones available on eBay (~ 10-20 EUR)

September 2014
7

C. OsmocomBB

Introducing OsmocomBB

Open-source GSM baseband software


Layer 1 on phone, higher layers on host

Works with cheap hardware


Motorola phones (based on TI Calypso)

Serial adapter (~ 20-30 EUR)


Phones available on eBay (~ 10-20 EUR)

Provides Wireshark-Output

September 2014
7

C. OsmocomBB

Introducing OsmocomBB

Open-source GSM baseband software


Layer 1 on phone, higher layers on host

Works with cheap hardware


Motorola phones (based on TI Calypso)

Serial adapter (~ 20-30 EUR)


Phones available on eBay (~ 10-20 EUR)

Provides Wireshark-Output

Very promising approach that suits our needs!

September 2014
7

C. OsmocomBB

Utilizing OsmocomBB

September 2014
8

C. OsmocomBB

Utilizing OsmocomBB

September 2014
8

C. OsmocomBB

Utilizing OsmocomBB

Needed adjustments
Enable TX-support
Configuration w/o SIM

September 2014
8

C. OsmocomBB

Utilizing OsmocomBB

Needed adjustments
Enable TX-support
Configuration w/o SIM

Problems with OsmocomBB


Little documentation
Camp on base station
Segfault when trying to initiate an
eCall w/o SIM

September 2014
8

C. OsmocomBB

Utilizing OsmocomBB

Needed adjustments
Enable TX-support
Configuration w/o SIM

Problems with OsmocomBB


Little documentation
Camp on base station
Segfault when trying to initiate an
eCall w/o SIM

Great tool for GSM analysis, but problems w/o SIM!

September 2014
8

Outline

A. Background

B. GSM Basics
C. OsmocomBB
D. GNU Radio & AirProbe
E. Summary & Outlook

September 2014
9

D. GNU Radio & Airprobe

Whats next?

September 2014
10

D. GNU Radio & Airprobe

Whats next?

AirProbe GSM Sniffer


Open-source software
Acquisition based on GNU Radio (3.6)

RTL-SDR / Hack RF / USRP support


Complete DeModulation module
[rtl-sdr.com]

September 2014
10

D. GNU Radio & Airprobe

Whats next?

AirProbe GSM Sniffer


Open-source software
Acquisition based on GNU Radio (3.6)

RTL-SDR / Hack RF / USRP support


Complete DeModulation module

Challenges

[rtl-sdr.com]

AirProbe takes only one channel a time

Channel identification
Lacks Frequency Hopping support

September 2014
10

D. GNU Radio & Airprobe

Whats next?

AirProbe GSM Sniffer


Open-source software
Acquisition based on GNU Radio (3.6)

RTL-SDR / Hack RF / USRP support


Complete DeModulation module

Challenges

[rtl-sdr.com]

AirProbe takes only one channel a time

Channel identification
Lacks Frequency Hopping support

Record entire
band

Identify
ARFCN

Segment
channel(s)

Demodulation
with AirProbe

September 2014
10

D. GNU Radio & Airprobe

First approach: Use Available Hardware

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

September 2014
11

D. GNU Radio & Airprobe

First approach: Use Available Hardware

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

September 2014
11

D. GNU Radio & Airprobe

First approach: Use Available Hardware

Hack RF

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Terratec NOXON DAB (rev. 2)

GSM 900 & GSM 1800

Limited to GSM-900

High bandwidth

Low bandwidth

ARFCN identification (Uplink)

Parallel Downlink recording

September 2014
11

D. GNU Radio & Airprobe

First approach: Use Available Hardware

Hack RF

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Terratec NOXON DAB (rev. 2)

GSM 900 & GSM 1800

Limited to GSM-900

High bandwidth

Low bandwidth

ARFCN identification (Uplink)

Parallel Downlink recording

ARFCN must be known prior to measurement!


September 2014
11

D. GNU Radio & Airprobe

First approach ARFCN Identification

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

September 2014
12

D. GNU Radio & Airprobe

First approach ARFCN Identification

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Idea: Locate ARFCN in frequency domain

September 2014
12

D. GNU Radio & Airprobe

First approach ARFCN Identification

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Idea: Locate ARFCN in frequency domain

September 2014
12

D. GNU Radio & Airprobe

First approach ARFCN Identification

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Idea: Locate ARFCN in frequency domain

Use Peak-Hold to identify nearby Tx

September 2014
12

D. GNU Radio & Airprobe

First approach ARFCN Identification

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Idea: Locate ARFCN in frequency domain

Use Peak-Hold to identify nearby Tx


No real Short-Time Fourier-Transformation (windowing)!

September 2014
12

D. GNU Radio & Airprobe

First approach ARFCN Identification

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Idea: Locate ARFCN in frequency domain

Use Peak-Hold to identify nearby Tx


No real Short-Time Fourier-Transformation (windowing)!

Keep it simple and stupid!


September 2014
12

D. GNU Radio & Airprobe

First approach Results

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

September 2014
13

D. GNU Radio & Airprobe

First approach Results

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

September 2014
13

D. GNU Radio & Airprobe

First approach Results

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

# of possible ARFCNs reduced to 5 - 10

September 2014
13

D. GNU Radio & Airprobe

First approach Results

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

# of possible ARFCNs reduced to 5 - 10

No clear ARFCN identification possible (must be known prior to recording)

September 2014
13

D. GNU Radio & Airprobe

First approach Results

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

# of possible ARFCNs reduced to 5 - 10

No clear ARFCN identification possible (must be known prior to recording)

Doesnt suit our needs in this constellation!

September 2014
13

D. GNU Radio & Airprobe

Whats next?

September 2014
14

D. GNU Radio & Airprobe

Whats next?

Reduce # of possible ARFCNs


Rural area, ideally a secluded valley

September 2014
14

D. GNU Radio & Airprobe

Whats next?

Reduce # of possible ARFCNs


Rural area, ideally a secluded valley

September 2014
14

D. GNU Radio & Airprobe

Whats next?

Reduce # of possible ARFCNs


Rural area, ideally a secluded valley

OR

September 2014
14

D. GNU Radio & Airprobe

Whats next?

Reduce # of possible ARFCNs


Rural area, ideally a secluded valley

OR

Use of professional hardware

September 2014
14

D. GNU Radio & Airprobe

Whats next?

Reduce # of possible ARFCNs


Rural area, ideally a secluded valley

OR

Use of professional hardware

September 2014
14

D. GNU Radio & Airprobe

Second approach Professional Hardware

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

September 2014
15

D. GNU Radio & Airprobe

Second approach Professional Hardware

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

September 2014
15

D. GNU Radio & Airprobe

Second approach Professional Hardware

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

2 USRP B200 (up to 56 MHz real time bandwidth)

September 2014
15

D. GNU Radio & Airprobe

Second approach Professional Hardware

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

2 USRP B200 (up to 56 MHz real time bandwidth)


Simultaneous Up- & Downlink recording of (almost) entire band

September 2014
15

D. GNU Radio & Airprobe

Second approach Professional Hardware

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

2 USRP B200 (up to 56 MHz real time bandwidth)


Simultaneous Up- & Downlink recording of (almost) entire band

No a priori knowledge of ARFCN needed anymore!

September 2014
15

D. GNU Radio & Airprobe

Second approach Channel Segmentation

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

September 2014
16

D. GNU Radio & Airprobe

Second approach Channel Segmentation

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Offline Filtering of single ARFCN

September 2014
16

D. GNU Radio & Airprobe

Second approach Channel Segmentation

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Offline Filtering of single ARFCN

September 2014
16

D. GNU Radio & Airprobe

Second approach Channel Segmentation

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Offline Filtering of single ARFCN


ARFCN selection by chan_num

September 2014
16

D. GNU Radio & Airprobe

Second approach Channel Segmentation

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Offline Filtering of single ARFCN


ARFCN selection by chan_num

= chan_num 200 + 100 16

September 2014
16

D. GNU Radio & Airprobe

Second approach Channel Segmentation

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Offline Filtering of single ARFCN


ARFCN selection by chan_num

= chan_num 200 + 100 16

Automated execution from python script for all possible ARFCNs


September 2014
16

D. GNU Radio & Airprobe

Second approach Demodulation & Analysis

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

September 2014
17

D. GNU Radio & Airprobe

Second approach Demodulation & Analysis

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Automated demodulation with AirProbe

September 2014
17

D. GNU Radio & Airprobe

Second approach Demodulation & Analysis

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Automated demodulation with AirProbe


Multiple channels merged in Wireshark trace

September 2014
17

D. GNU Radio & Airprobe

Second approach Demodulation & Analysis

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Automated demodulation with AirProbe


Multiple channels merged in Wireshark trace

September 2014
17

D. GNU Radio & Airprobe

Second approach Demodulation & Analysis

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Automated demodulation with AirProbe


Multiple channels merged in Wireshark trace
Wireshark filter: gsm_a.ie.mobileid.type=2/3

September 2014
17

D. GNU Radio & Airprobe

Second approach Demodulation & Analysis

Record
entire band

Identify
ARFCN

Segment
channel(s)

Demodulati
on with
AirProbe

Automated demodulation with AirProbe


Multiple channels merged in Wireshark trace
Wireshark filter: gsm_a.ie.mobileid.type=2/3

Demodulation of uplink channels not possible!


September 2014
17

Outline

A. Background

B. GSM Basics
C. OsmocomBB
D. GNU Radio & AirProbe
E. Summary & Outlook

September 2014
18

E. Summary & Outlook

Summary & Outlook

September 2014
19

E. Summary & Outlook

Summary & Outlook

GNU Radio & python are great tools for offline data analysis

September 2014
19

E. Summary & Outlook

Summary & Outlook

GNU Radio & python are great tools for offline data analysis
GNU Radio can be used as a library of DSP algorithms

September 2014
19

E. Summary & Outlook

Summary & Outlook

GNU Radio & python are great tools for offline data analysis
GNU Radio can be used as a library of DSP algorithms
AirProbe out-dated (last commit in 2011)

September 2014
19

E. Summary & Outlook

Summary & Outlook

GNU Radio & python are great tools for offline data analysis
GNU Radio can be used as a library of DSP algorithms
AirProbe out-dated (last commit in 2011)

September 2014
19

E. Summary & Outlook

Summary & Outlook

+
GNU Radio & python are great tools for offline data analysis
GNU Radio can be used as a library of DSP algorithms
AirProbe out-dated (last commit in 2011)

September 2014
19

E. Summary & Outlook

Summary & Outlook

Source: rohde-schwarz.com

GNU Radio & python are great tools for offline data analysis
GNU Radio can be used as a library of DSP algorithms
AirProbe out-dated (last commit in 2011)

September 2014
19

E. Summary & Outlook

Summary & Outlook

Source: rohde-schwarz.com

GNU Radio & python are great tools for offline data analysis
GNU Radio can be used as a library of DSP algorithms
AirProbe out-dated (last commit in 2011)

September 2014
19

E. Summary & Outlook

Summary & Outlook

Source: rohde-schwarz.com

GNU Radio & python are great tools for offline data analysis
GNU Radio can be used as a library of DSP algorithms
AirProbe out-dated (last commit in 2011)

Low-cost, open source GSM protocol analyzer feasible,


but additional development effort needed!
September 2014
19

Questions?

Fennec Research UG (haftungsbeschrnkt)


Scheffelstrae 2
76135 Karlsruhe
Germany
info@fennec-research.com

www.fennec-research.com

September 2014

You might also like