zoukankan      html  css  js  c++  java
  • C118+OSMCOMBB嗅探短信

      ubuntu系统:12.04.4, 下载地址:http://cdimage.ubuntu.com/releases/12.04.4/release/

      编译环境下载 : http://pan.baidu.com/s/1skUvToD

      1:安装ubuntu系统

      系统安装完毕以后, 更新源:

    $ sudo apt-get update
    $ sudo apt-get upgrade

      2:安装相关依赖:

    $ sudo apt-get install libusb-0.1-4 libpcsclite1 libccid pcscd
    $ sudo apt-get install libtool shtool autoconf git-core pkg-config make gcc build-essential libgmp3-dev libmpfr-dev libx11-6 libx11-dev texinfo flex bison libncurses5 libncurses5-dbg libncurses5-dev libncursesw5 libncursesw5-dbg libncursesw5-dev zlibc zlib1g-dev libmpfr4 libmpc-dev libpcsclite-dev

      3:下载配置交叉编译环境

      编译环境下载 地址: http://pan.baidu.com/s/1skUvToD

      下载以后解压看到toolchain的目录

      目录下有gnu-arm-build.2.sh文件, src, build ,install三个目录

      进入src目录,分别执行 : 

    $ chmod +x gnu-arm-build.2.sh
    $ ./gnu-arm-build.2.sh

      漫长的等待....

      ....

      ....

      ....

      编译完毕以后, 在当前的install/bin文件夹下面会多出好几个文件

      添加编译的bin目录到全局:

    $ gedit ~/./.bashrc
    
    #最后一行加入一下代码,保存退出
    export PATH=$PATH:/home/chenqihao/softs/sms/osmocombb/install/bin
    
    $ source ~/.bashrc

      4:下载并编译osmocomBB

      安装talloc

    $ wget https://www.samba.org/ftp/talloc/talloc-2.1.7.tar.gz
    $ tar -zxvf talloc-2.1.7.tar.gz
    $ cd talloc-2.1.7/
    $ ./configure
    $ make
    $ sudo make install

      回到osmocombb目录下载osmocom

      安装libosmocore

    在客户端里输入
    
    sudo apt-get install build-esse ntial libtool libtalloc-dev shtool autoconf automake git-core pkg-config make gcc libpcsclite-dev
    
    #安装依赖库
    
    git clone git://git.osmocom.org/libosmocore.git
    
    #克隆 libosmocore 文件夹,如果已经从网盘下载了则跳过此步,取而代之的是解压到libosmocore,zip 文件,ubuntu 下右键就有解压选项
    
    cd libosmocore/
    
    #进入 libosmocore 文件夹 autoreconf -i
    
    #生成 configure 文件
    
    ./configure
    
    #检查环境进行配置
    
    make
    
    #编译
    
    sudo make install
    
    #安装 sudo ldconfig -i
    
    #更新动态链接库
    
    cd ..
    
    #回到上级目录
    
    #同样,可以从 configure 和编译过程看出来有没有问题,缺少什么包就安装

      安装osmcom-bb

    git clone git://git.osmocom.org/osmocom-bb.git
    
    #克隆文件夹,如果已经从网盘下载了则跳过此步,取而代之的是解压到
    
    osmocom-bb-luca-gsmmap,zip 文件,ubuntu 下右键就有解压选项 cd osmocom-bb
    
    #进入文件夹,或是进入解压的文件夹 osmocom-bb-luca-gsmmap git checkout --track origin/luca/gsmmap
    
    #切换到 luca/gsmmap 分支,如果已经从网盘下载了则跳过此步
    
    #如果要抓取上行数据,需要把 osmocom-bb/src/target/firmwire/下的 Makefile 中的
    
    CONFIG_TX_ENABLE 宏打开,可以直接在文件夹里打开这个文件编辑
    
    # Uncomment this line if you want to enable Tx (Transmit) Support.
    
    原来为:#CFLAGS +=-DCONFIG_TX_ENABLE
    
    去掉注释#号为:CFLAGS +=-DCONFIG_TX_ENABLE 然后保存关闭 cd src
    
    #进入 src 文件夹
    
    make
    
    #开始编译生成 bin 文件

      5:修改问题文件

      修改 osmocom-bb 文件夹内以下五个文件,可以直接从文件夹里打开编辑

    osmocom-bb/src/target/firmware/board/compal/highram.lds
    osmocom-bb/src/target/firmware/board/compal/ram.lds
    osmocom-bb/src/target/firmware/board/compal_e88/flash.lds
    osmocom-bb/src/target/firmware/board/compal_e88/loader.lds
    osmocom-bb/src/target/firmware/board/mediatek/ram.lds

      找到里面的这一串代码

      KEEP(*(SORT(.ctors)))

      在下面加入

      KEEP(*(SORT(.init_array)))

      保存即可,全部修改好,在进入osmocom-bb/src重新编译一下

    $ make -e CROSS_TOOL_PREFIX=arm-none-eabi-

      6:刷入C118固件

      把C118连上电脑

      命令行中进入osmocom-bb目录

    $ cd src/host/osmocon
    $ sudo ./osmocon -m c123xor -p /dev/ttyUSB0 ../../target/firmware/board/compal_e88/layer1.compalram.bin

      按一下C118的红色按钮, 开始写入固件

      7:查询附近基站

    $ cd src/host/layer23/src/misc
    $ sudo ./cell_log -O

      执行扫描出来的ARFCN:

    $ sudo ./ccch_scan -i 127.0.0.1 -a 59

      8:使用wireshark嗅探信息

    $ sudo apt-get install wireshark 
    $ sudo wireshark -k -i lo -f 'port 4729'

    作者: NONO
    出处:http://www.cnblogs.com/diligenceday/
    企业网站:http://www.idrwl.com/
    开源博客:http://www.github.com/sqqihao
    QQ:287101329
    微信:18101055830 

    厦门点燃未来网络科技有限公司, 是厦门最好的微信应用, 小程序, 微信网站, 公众号开发公司

  • 相关阅读:
    How to build Linux system from kernel to UI layer
    Writing USB driver for Android
    Xposed Framework for Android 8.x Oreo is released (in beta)
    Linux Smartphone Operating Systems You Can Install Today
    Librem 5 Leads New Wave of Open Source Mobile Linux Contenders
    GUADEC: porting GNOME to Android
    Librem 5 – A Security and Privacy Focused Phone
    GNOME and KDE Join Librem 5 Linux Smartphone Party
    Purism计划推出安全开源的Linux Librem 5智能手机
    国产系统之殇:你知道的这些系统都是国外的
  • 原文地址:https://www.cnblogs.com/diligenceday/p/7141981.html
Copyright © 2011-2022 走看看