BLE 抓包学习

环境准备

  • NRF52832 USB Dongle
  • Wireshark
  • nrf_sniffer_for_ble
  • Python3.x

nrf_sniffer_for_ble 安装

https://www.nordicsemi.com/Products/Development-tools/nrf-sniffer-for-bluetooth-le

nRF Sniffer for Bluetooth LE
The nRF Sniffer for Bluetooth® LE is a useful tool for learning about and debugging Bluetooth Low Energy applications. It provides a near real-time display of Bluetooth packets that are sent between a selected Bluetooth Low Energy device and the device it is communicating with, even when the link is encrypted.

  1. nrf_sniffer_for_ble 解压后的目录:
    在这里插入图片描述
  2. 切换目录到 extcap 下进行相关依赖安装,主要是安装 pyserial;
    在这里插入图片描述
pip3 install -r requirements.txt
  1. 打开Wireshark,帮助 –> 关于Wireshark –>文件夹,将下载好的nrf_sniffer_for_bluetooth_le_3.1.0_7cc811f\extcap 下的所有文件拷贝到 Global Extcap path 所示的文件夹内。在这里插入图片描述
    并检查拷贝进去的文件是否能够正常的运行,尝试运行 nrf_sniffer_ble.bat 脚本,因为这也关系到接下来使用 Wireshark 是否能够正常的调用相关文件,正常运行如下图所示。
PS C:\mine\mysoftware\wireshark\extcap> .\nrf_sniffer_ble.bat --extcap-interfaces
extcap {version=3.1.0}{display=nRF Sniffer for Bluetooth LE}{help=https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE}
interface {value=COM3}{display=nRF Sniffer for Bluetooth LE COM3}
control {number=0}{type=selector}{display=Device}{tooltip=Device list}
control {number=1}{type=string}{display=Passkey / OOB key}{tooltip=6 digit temporary key or 16 byte Out-of-band (OOB) key in hexadecimal starting with '0x', big endian format. If the entered key is shorter than 16 bytes, it will be zero-padded in front'}{validation=\b^(([0-9]{6})|(0x[0-9a-fA-F]{1,32}))$\b}
control {number=2}{type=string}{display=Adv Hop}{default=37,38,39}{tooltip=Advertising channel hop sequence. Change the order in which the siffer switches advertising channels. Valid channels are 37, 38 and 39 separated by comma.}{validation=^\s*((37|38|39)\s*,\s*){0,2}(37|38|39){1}\s*$}{required=true}
control {number=3}{type=button}{role=help}{display=Help}{tooltip=Access user guide (launches browser)}
control {number=4}{type=button}{role=restore}{display=Defaults}{tooltip=Resets the user interface and clears the log file}
control {number=5}{type=button}{role=logger}{display=Log}{tooltip=Log per interface}
value {control=0}{value= }{display=All advertising devices}{default=true}
  1. 接下来是在 Wireshark 导入 BLE 相关 profile,这样 Wireshark 才能够解析 BLE 的数据包。同样的也是打开配置文件夹将相关文件导入到个人配置所指示的文件夹中,将nrf_sniffer_for_bluetooth_le_3.1.0_7cc811f\Profile_nRF_Sniffer_Bluetooth_LE 文件夹拷贝到下述的个人配置路径的 profiles 文件夹即可。

在这里插入图片描述

  1. 刷新接口使能 nrf_sniffer tool;
    在这里插入图片描述

BLE 抓包

选择 nRF Sniffer Bluetooth LE 接口
在这里插入图片描述

在这里插入图片描述

参考链接:

https://blog.csdn.net/qq_33475105/article/details/115058045

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值