严正声明:该工具主要是为了让你们更好的了解GSM网络的工做原理而设计开发的,请不要用于恶意目的!css
IMSI-catcher是一个能够帮助你发现附近手机的IMSI号码,国家,品牌和运营商等信息的工具。html
一台PC电脑python
1个带有天线的USB DVB-T key(RTL2832U)(大概在15美圆之内),或是一部OsmocomBB手机一个HackRF设备。nginx
git clone https://github.com/Oros42/IMSI-catcher.git # or wget https://github.com/Oros42/IMSI-catcher/archive/master.zip && unzip -q master.zip sudo apt install python-numpy python-scipy python-scapy
对于Debian Testing (10) 和 Ubuntu 18.04+ gr-gsm 的安装,请参阅:https://osmocom.org/projects/gr-gsm/wiki/Installationgit
对于老版本的Debian 和 Ubuntu的安装命令以下 :github
sudo add-apt-repository -y ppa:ptrkrysik/gr-gsm
sudo apt update sudo apt install gr-gsm
若是gr-gsm设置失败,请参照:https://github.com/ptrkrysik/gr-gsm/wiki/Installation 进行设置。sql
Debian:https://tracker.debian.org/pkg/gr-gsmbootstrap
打开2个终端。ubuntu
在终端1中输入:bash
sudo python simple_IMSI-catcher.py --sniff
你能够添加-h参数显示可用选项。
在终端2中,搜索频率:
grgsm_scanner
使用grgsm_livemon命令嗅探你搜索到的频率:
grgsm_livemon -f <your_frequency>M
例如:
grgsm_livemon -f 938.2M
运行后应该会产生相似如下输出:
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 ...
你能够根据需求更换不一样的频率。
一样,打开2个终端。
在终端1中输入:
python simple_IMSI-catcher.py
你能够添加-h参数显示可用选项。
在终端2中输入:
python scan-and-livemon
这个过程可能须要几分钟的时间。由于,它须要运行grgsm_scanner来查找附近的基站,并请求grgsm_livemon_headless接收信号。
或是先找到附近基站的频率。
grgsm_scanner
接着,使用grgsm_livemon命令嗅探你搜索到的频率:
grgsm_livemon -f <your_frequency>M
例如:
grgsm_livemon -f 938.2M
运行后应该会产生相似如下输出:
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 ...
你能够根据需求更换不一样的频率。
完成以上操做后,下面咱们要作的就是等待结果。大概一分钟左右的时间,咱们就可以在终端1中看到IMSI号码。若是一分钟后没有出现任何内容,那么请更改你的频率。
相关文档:https://fr.wikipedia.org/wiki/Global_System_for_Mobile_Communications
例如法国的频率为:9.288e+08 Bouygues
查看捕获到的数据包:
sudo wireshark -k -Y '!icmp && gsmtap' -i lo
获取有关信号塔的信息:
sudo python find_cell_id.py
获取Immediate Assignment信令:
sudo python immediate_assignment_catcher.py
除了能够使用上面提到的grgsm_scanner来查找频率,你也能够使用像kalibrate-hackrf这样的工具来查找:
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
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
Gr-Gsm 设置:https://github.com/ptrkrysik/gr-gsm/wiki/Installation
频率:http://www.worldtimezone.com/gsm.html(https://fr.wikipedia.org/wiki/Global_System_for_Mobile_Communications)
MNC:https://en.wikipedia.org/wiki/Mobile_Network_Code
Scapy:http://secdev.org/projects/scapy/doc/usage.html
IMSI:https://fr.wikipedia.org/wiki/IMSI
Realtek RTL2832U:https://osmocom.org/projects/sdr/wiki/rtl-sdr(http://doc.ubuntu-fr.org/rtl2832u)http://doc.ubuntu-fr.org/rtl-sdr