OpenBTS编译与使用
https://github.com/Qmeimei10086/OpenBTS-gsm-mitm
本仓库来源自osmocom-bb的calypso-BTS项目,该项目致力于在c118上实现transceiver功能,从而使c118成为廉价的BTS设备
该仓库仅作为记录和保存文件方便使用
请确保你已经成功安装完编译osmocombb的环境,参考:https://github.com/Qmeimei10086/mobile-gsm-mitm
unzip osmocombb-sylvain
cd osmocom-bb/src
make firmware HOST_layer23_CONFARGS=--enable-transceiver
make osmocon HOST_layer23_CONFARGS=--enable-transceiver
make layer23 HOST_layer23_CONFARGS=--enable-transceiver
ps:
1.其实如果遇到编译firmware时出现bug,请在make后加上 -i 参数
2.其实可以直接 make HOST_layer23_CONFARGS=--enable-transceiver,但没必要
3.如果你是自己下载的osmocombb,把 osmocom-bb/src/target/firmware 下的 Makefile 中的DCONFIG_TX_ENABLE 宏打
开:
#Uncomment this line if you want to enable Tx (Transmit) Support.
#CFLAGS += -DCONFIG_TX_ENABLE
然后到 src 目录下编译,不过我已经帮你打开了捏(/ω\)
和之前一样,我发布了编译好的文件以及所需动态链接库,解压完以后
cd trx
cp *.so.* /usr/lib
chmod +x ./*
如果以上步骤没有问题,你就可以开始修改OpenBTS.db了,以下需要修改
GSM.Radio.NeedBSIC = 1
GSM.Radio.Band = 900
GSM.CellSelection.Neighbors =(留空)
GSM.RACH.MaxRetrans = 3
GSM.RACH.TxInteger = 8
GSM.Radio.C0 = 你的arfcn(注意不要和别的基站重叠了)
Control.LUR.OpenRegistration =.*
在OpenBTS目录下创建transceiver文件,并且用chmod +x transceiver为他赋予权限,内容为
#!/bin/bash
exec <你osmocombb的路径>/src/host/layer23/src/transceiver <你附近最强基站的arfcn>
什么,你不知道哪个基站最强?!
快用cell_log扫一下,TA最小的就是离你最近的基站
#刷入固件
cd osmocom-bb/src/host/osmocon
./osmocon -m c123xor -p /dev/ttyUSB0 ../../target/firmware/board/compal_e88/trx.comapalram.bin -s /tmp/trx
启动openbts
./sipauthserve
./OpenBTS
不出意外你的openbts已经成功运行起来了啦
ps:
我其实将transceiver的unix_socket路径修改为/tmp/trx,这是防止在gsm中间人攻击时和
mobile程序的unix_socket路径重叠
bilibili:https://space.bilibili.com/431312664?spm_id_from=333.1007.0.0
有问题来这里找我,本人已高三,可能不能及时回