IMSI-catcher/README.md

171 lines
3.9 KiB
Markdown
Raw Normal View History

2015-06-03 22:58:11 +02:00
# IMSI-catcher
2016-09-29 16:01:41 +02:00
This program shows you IMSI numbers, country, brand and operator of cellphones around you.
2015-06-03 23:03:49 +02:00
/!\ This program was made to understand how GSM network work. Not for bad hacking !
2015-06-04 10:11:56 +02:00
![screenshot0](capture_simple_IMSI-catcher.png)
2015-06-04 11:41:56 +02:00
2015-06-03 23:03:49 +02:00
What you need
=============
2016-09-29 16:01:41 +02:00
1 PC
2017-08-01 21:45:12 +02:00
1 [USB DVB-T key (RTL2832U)](https://osmocom.org/projects/sdr/wiki/rtl-sdr) with antenna (less than 15$) or a [OsmocomBB phone](https://osmocom.org/projects/baseband/wiki/Phones) or [HackRF](https://greatscottgadgets.com/hackrf/)
2015-06-03 23:03:49 +02:00
Setup
=====
```
2017-07-26 22:04:36 +02:00
sudo apt install python-numpy python-scipy python-scapy
2016-09-29 15:53:56 +02:00
sudo add-apt-repository -y ppa:ptrkrysik/gr-gsm
sudo apt update
2017-07-26 22:04:36 +02:00
sudo apt install gr-gsm
2015-06-03 23:03:49 +02:00
```
2017-07-26 22:04:36 +02:00
If gr-gsm failled to setup. Try this setup : https://github.com/ptrkrysik/gr-gsm/wiki/Installation
2017-12-13 00:09:34 +01:00
Debian : https://tracker.debian.org/pkg/gr-gsm
2015-06-03 23:03:49 +02:00
Run
===
2017-12-13 00:07:51 +01:00
With an old version of gr-gsm
-----------------------------
2016-09-29 16:01:41 +02:00
Open 2 terminals.
2017-12-13 00:07:51 +01:00
In terminal 1
2015-06-03 23:03:49 +02:00
```
2017-12-13 00:07:51 +01:00
sudo python simple_IMSI-catcher.py --sniff
2017-09-05 13:14:19 +02:00
```
2017-12-13 00:07:51 +01:00
You can add -h to display options.
In terminal 2, search a frequency to listen :
2017-09-05 13:14:19 +02:00
```
2017-12-13 00:07:51 +01:00
grgsm_scanner
```
Next, ask grgsm_livemon to use one of these frequencies:
```
grgsm_livemon -f 938.2M
```
It should start producing output like :
```
15 06 21 00 01 f0 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
25 06 21 00 05 f4 f8 68 03 26 23 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
49 06 1b 95 cc 02 f8 02 01 9c c8 03 1e 57 a5 01 79 00 00 1c 13 2b 2b
...
```
You can change the frequency if you want.
With version of gr-gsm >= 0.41.2-1
----------------------------------
Open 2 terminals.
In terminal 1
```
python simple_IMSI-catcher.py
```
You can add -h to display options.
2015-06-03 23:03:49 +02:00
2017-12-13 00:07:51 +01:00
In terminal 2
```
python scan-and-livemon
```
This step can take a few minutes to get started, as it first run
grgsm_scanner to find nearby base stations and ask
grgsm_livemon_headless to receive the signal from the strongest
signals.
Or first find the frequencies of the nearby base stations.
```
grgsm_scanner
2015-06-03 23:03:49 +02:00
```
Next, ask grgsm_livemon to use one of these frequencies:
2015-06-03 23:03:49 +02:00
```
grgsm_livemon -f 938.2M
```
It should start producing output like :
2015-06-03 23:03:49 +02:00
```
15 06 21 00 01 f0 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
25 06 21 00 05 f4 f8 68 03 26 23 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
49 06 1b 95 cc 02 f8 02 01 9c c8 03 1e 57 a5 01 79 00 00 1c 13 2b 2b
...
```
You can change the frequency if you want.
2017-12-13 00:07:51 +01:00
For all
-------
2015-06-11 21:03:07 +02:00
Now, watch terminal 1 and wait. IMSI numbers should appear :-)
If nothing appears after 1 min, change the frequency.
2015-06-03 23:03:49 +02:00
Doc : https://fr.wikipedia.org/wiki/Global_System_for_Mobile_Communications
2016-09-29 16:01:41 +02:00
Example of frequency in France : 9.288e+08 Bouygues
2015-06-03 23:03:49 +02:00
2016-09-29 16:01:41 +02:00
You can watch GSM packets with
2015-06-03 23:03:49 +02:00
```
sudo wireshark -k -Y '!icmp && gsmtap' -i lo
```
2017-02-22 21:02:15 +01:00
Optional
========
Information about the cell tower :
```
sudo python find_cell_id.py
```
Get immediate assignment :
```
sudo python immediate_assignment_catcher.py
```
2017-08-01 21:45:12 +02:00
Find frequencies
----------------
You can either use the grgsm_scanner program from gr-gsm mentioned
above, or fetch the kalibrate-hackrf tool like this:
2017-08-01 21:45:12 +02:00
```
sudo apt-get install automake autoconf libhackrf-dev
git clone https://github.com/scateu/kalibrate-hackrf
cd kalibrate-hackrf/
./bootstrap
./configure
make
sudo make install
```
Run
```
kal -s GSM900
```
```
kal: Scanning for GSM-900 base stations.
GSM-900:
chan: 14 (937.8MHz + 10.449kHz) power: 3327428.82
chan: 15 (938.0MHz + 4.662kHz) power: 3190712.41
...
```
2017-02-22 21:02:15 +01:00
2015-06-03 23:03:49 +02:00
Links
=====
2017-07-09 11:14:26 +02:00
Setup of Gr-Gsm : https://github.com/ptrkrysik/gr-gsm/wiki/Installation
2017-07-26 22:28:43 +02:00
Frequency : http://www.worldtimezone.com/gsm.html and https://fr.wikipedia.org/wiki/Global_System_for_Mobile_Communications
2016-10-05 16:46:01 +02:00
Mobile Network Code : https://en.wikipedia.org/wiki/Mobile_Network_Code
2015-06-03 23:03:49 +02:00
Scapy : http://secdev.org/projects/scapy/doc/usage.html
IMSI : https://fr.wikipedia.org/wiki/IMSI
2017-07-26 22:28:43 +02:00
Realtek RTL2832U : https://osmocom.org/projects/sdr/wiki/rtl-sdr and http://doc.ubuntu-fr.org/rtl2832u and http://doc.ubuntu-fr.org/rtl-sdr