How To Set-Up Kali Linux For Sniffing GSM Traffic

This guide outlines the steps to set up HackRF on Kali Linux, enabling effective sniffing of GSM traffic.

GSM, initially known as Groupe Spécial Mobile, is a standard developed by the European Telecommunications Standards Institute to underpin protocols for second-generation (2G) digital cellular networks used by mobile devices. Learn more about GSM on Wikipedia.

This tutorial focuses on setting up HackRF, a popular device for receiving GSM signals, on Kali Linux.

The first step involves installing necessary packages for setting up HackRF. Open a terminal window and execute the following commands to install GNU Radio and other related software. GNU Radio is a free toolkit for building software-defined radios.

1
sudo apt-get install gnuradio gnuradio-dev gr-osmosdr gr-osmosdr gqrx-sdr wireshark

Before cloning and installing the gr-gsm software, install additional dependencies required.

1
sudo apt-get install gnuradio-dev gr-osmosdr gr-osmosdr gqrx-sdr wireshark pkg-config libosmocore libosmocore-dev automake

Clone the gr-gsm repository and compile the software:

1
2
3
4
5
6
7
8
git clone https://github.com/ptrkrysik/gr-gsm.git
cd gr-gsm
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

Install gr-gsm software for sniffing GSM traffic on Kali Linux
Compile and Install gr-gsm

Next, create a config file ~/.gnuradio/config.conf and add the necessary configuration.

1
2
[grc]
local_blocks_path=/usr/local/share/gnuradio/grc/blocks

Clone and compile kalibrate-hackrf, a tool for calibrating HackRF devices to specific frequencies.

1
2
3
4
5
6
git clone https://github.com/scateu/kalibrate-hackrf.git
cd kalibrate-hackrf
./bootstrap
./configure
make
sudo make install

Install kalibrate-hackrf software for sniffing GSM traffic on Kali Linux
Compile and Install kalibrate-hackrf

Install HackRF and its libraries with the following command:

1
sudo apt-get install hackrf libhackrf-dev libhackrf0

Install packages for setting up HackRF on Kali Linux
Compile and Install HackRF

Verify the setup by checking if HackRF is correctly recognized by your system.

1
hackrf_info

Verify HackRF setup on Kali Linux
Test Connection