Capturing GSM Traffic in Practice

Loading

A device called USRP can receive signals from the GSM radio spectrum. Then, using suitable software, you can capture the information carried by the signal. The following trick lets you decrypt the information and, after decoding the speech, hear the exact contents of the conversation.

Animal repellent with a loudspeaker and control unit

 

Equipment used:
Phoenix SIM-card reader
FBUS cable for Nokia 3310
Nokia 3310
USRP DBSRX

A PC with RS232 (for the FBUS cable and SIM-card reader) and a USB 2.0 connection (for USRP), running Linux and GNU Radio, with my GNU Radio block compiled, which you can download along with other software from Airprobe

Introduction

The USRP board receives the signal from a single GSM radio channel and sends it in digital form to the computer. GNU Radio is a software package for processing signals from hardware, working primarily with USRP. GNU Radio lets you create signal-processing streams by combining ready-made components. In my case, it handles tasks such as changing the sampling rate, filtering the signal and correcting frequency offset.

The process of generating the session key Sk, which encrypts the conversation, works as follows:
a random number RAND is received from the telephone network;
the phone sends this number to the SIM card together with a request to generate the key Sk;
using the Ki key stored on it and the RAND number, the SIM card generates Sk and returns the result to the phone.

The Nokia 3310 has many useful features. The most important ones in this experiment are:
an option to force the GSM Full Rate codec;
an enabled network monitor, which provides the phone’s channel; there is no frequency hopping, which makes receiving the signal difficult;
an option to force the phone to remain on a single radio channel;
a debugging mode in which the phone sends information about what it is doing over the serial cable—the interesting information here is the RAND number.

The Experiment

The FBUS cable remained connected to the Nokia 3310 throughout. Using the gamma program, we captured information sent by the phone in debugging mode to find the RAND number. During the call, we used USRP to capture the signal from the channel to which the Nokia 3310 was tuned, in the direction from the base station to the phone.

We then had to put the SIM card into the reader and use the RAND number to generate the session key Sk that had previously encrypted the conversation.

Advertisements

With the signal and the key, we could combine signal demodulation, decryption and speech decoding to obtain plaintext information. After decoding the speech, we could listen to the captured conversation.

Do It Yourself
Anyone can perform the final step—extracting speech from the captured signal—on their own computer. It does not require expensive or rather exotic hardware.

Compiling the GSM Receiver
The block I wrote is easiest to compile on Ubuntu 9.04. You can also compile it on any other recent GNU/Linux system with GNU Radio 3.2 and its headers installed. First, download the program using:

$ Git clone git: / / svn.berlin.ccc.de / airprobe

Further compilation instructions specific to Ubuntu are in the file airprobe / GSM-prijímač / install.

Running the Program

Download the input file here:

https: / / svn.berlin.ccc.de/projects/airprobe/attachment/wiki/DeModulation/piotr_downlink_first.tar.bz2 The archive contains the conversation.cfile signal recording. Copy it to the airprobe / GSM-prijímač / src / python directory belonging to my program project.
From this directory, run the command:$. / Gsm_receive.py conversation.cfile-I-d 112-k “AD C2 6A 3E 42 E4 B4 00”

Listen

Install tcat. In Ubuntu, it is packaged in libgsm-tools. Decode the speech.gsm file created in the previous step:

Advertisements

$ Tcat-s speech.gsm> speech.wav

Listen to the resulting speech.wav file in your favorite audio player.

Improvements

The same channel carries both the conversation and authentication information, so the RAND number can be read from the captured signal. In that case, an FBUS cable connected to the Nokia is unnecessary. I have now implemented this feature. You can skip using the reader if you have the Ki key from the SIM card. At present, the Ki key can only be extracted from old SIM cards that use the Comp128v1 algorithm, which is amazingly broken.

Comment

My personal view of GSM security is that its cryptographic algorithms are bad because they were intended to be weak. Their design had to take intelligence-service interests into account. To avoid making a completely unsupported statement, here are a few facts:

A well-known and widely used, but disapproved-of, way of maintaining security—Security through obscurity.

The session keys Sk are 64 bits long, but the algorithms that generate the keys reset the last 10 bits, shortening a brute-force attack by a factor of 1.024.

The telephone subscriber authenticates the GSM network, but the GSM network does not authenticate the user. This gap in the security architecture opens the door to a range of possible man-in-the-middle attacks. Online, you can find advertisements for devices called IMSI catchers, aimed at government services. An IMSI catcher exploits this gap to impersonate a base station and intercept calls from anyone who connects to that fake BTS.

Ross Anderson, the first person to reveal details of the design of the cryptographic algorithms A5 / 1 and A5 / 2 used in GSM, stated in 1994 that, during the 1980s, NATO countries were deeply divided over whether to use strong or weak encryption to protect conversations on digital mobile phones. According to Ross Anderson, the French proposal won and the idea of using strong cryptography was not adopted.

A number of theoretically verified security weaknesses in GSM cryptographic algorithms have been published. The weaker A5 / 2, intended for unpopular countries, can be broken in real time; the faster A5 / 1 also has many weaknesses.

I suspect that intelligence services in Western Europe and the USA have known how to break GSM security for a long time, and that a practical way of breaking A5 / 1 may soon become widely known.

 

PeterKrysik

Attachments:
Usrp_case.png (22.6 KB) – added by piotrk 13 months ago.
nokia33102.png (15.6 KB) – added by piotrk 13 months ago.
kabel_fbus.png (25.1 KB) – added by piotrk 13 months ago.
czytnik.jpg (3.8 KB) – added by piotrk 13 months ago.
przechwytywanie.png (60.2 KB) – added by piotrk 13 months ago.
odczyt_klucza.png (35.6 KB) – added by piotrk 13 months ago.
speech.ogg (54.6 KB) – added by piotrk 13 months ago.

USRP1 or USRP2
BURX tuning on any frequency 300 MHz to 4 GHz

Advertisements
AliExpress

Leave a Reply

Your email address will not be published. Required fields are marked *