安装依赖

  1. sudo apt install cmake libusb-1.0-0-dev make gcc g++ libbluetooth-dev wget \
  2. pkg-config python3-numpy python3-qtpy python3-distutils python3-setuptools

安装libbtbb

  1. wget https://github.com/greatscottgadgets/libbtbb/archive/2020-12-R1.tar.gz -O libbtbb-2020-12-R1.tar.gz
  2. tar -xf libbtbb-2020-12-R1.tar.gz
  3. cd libbtbb-2020-12-R1
  4. mkdir build
  5. cd build
  6. cmake ..
  7. make
  8. sudo make install
  9. sudo ldconfig

安装ubertooth tools

  1. wget https://github.com/greatscottgadgets/ubertooth/releases/download/2020-12-R1/ubertooth-2020-12-R1.tar.xz
  2. tar -xf ubertooth-2020-12-R1.tar.xz
  3. cd ubertooth-2020-12-R1/host
  4. mkdir build
  5. cd build
  6. cmake ..
  7. make
  8. sudo make install
  9. sudo ldconfig

给ubertooth升级固件

github 上找到 release 里面的的压缩包,在里面找到 bluetooth_rxtx.dfu 以后拷贝出来
image.png
运行命令就自动升级了,在虚拟机里面会断开连接,问题不大再连接就行了

  1. ubertooth-dfu -d bluetooth_rxtx.dfu -r

安装wireshark

sudo apt-get install wireshark wireshark-dev libwireshark-dev cmake

配置 BTBB 和 BREDR 插件

  1. cd libbtbb-2020-12-R1/wireshark/plugins/btbb
  2. mkdir build
  3. cd build
  4. cmake -DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu/wireshark/libwireshark3/plugins ..
  5. make
  6. sudo make install

回到之前的目录

  1. cd libbtbb-2020-12-R1/wireshark/plugins/btbredr
  2. mkdir build
  3. cd build
  4. cmake -DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu/wireshark/libwireshark3/plugins ..
  5. make
  6. sudo make install
  7. 【这里如果提示没有python使用先whereis python3然后再sudo ln -s /usr/bin/python3 /usr/bin/python】

安装BLE解密工具crackle

  1. git clone https://github.com/mikeryan/crackle.git
  2. cd crackle
  3. make
  4. make install

抓BLE流量

创建通信管道
mkfifo /tmp/pipe

在命令行输入 wireshark 打开 wireshark,然后点击 捕获 -> 选项
image.png

管理接口
image.png
新建一个管道 /tmp/pipe
image.png
点击开始抓包,新开一个终端,插入 ubertooth one 后输入 ubertooth-btle -f -c /tmp/pipe
就可以看到流量在终端里显示了,同时 wireshark 里也会捕获到流量

抓经典蓝牙流量

用这个 ubertooth-rx -r test.pcapng 是可以抓到少量经典蓝牙流量的,但是,没啥用展示的东西相当少,在 github 上项目贡献者说真想抓经典蓝牙还得是 Ellisys 或者 Frontline 这类专业工具
image.png