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
    评论
lsposed是一种在Android系统上进行Xposed框架模块注入的工具,它可以让用户在不修改系统源码的情况下实现对系统应用或第三方应用的定制和修改。 对于lsposed的抓包功能,它主要用于截获应用程序与服务器之间的通信数据,以便进行分析和调试。使用lsposed进行抓包,可以帮助开发者或安全研究人员深入了解应用程序的通信协议和数据传输过程,发现潜在的安全风险和漏洞,从而进行安全加固或改进。 在使用lsposed进行抓包前,首先需要在手机上安装lsposed框架,并确保手机已经root。接下来,可以通过安装支持抓包的Xposed模块,如JustTrustMe,来实现对应用程序的数据抓包。安装完模块后,重启手机并启用JustTrustMe模块。 启用JustTrustMe后,当Android应用程序与服务器通信时,JustTrustMe会拦截通信请求,并生成一个自签名的证书来替代原本应用程序所使用的证书。这样,应用程序与服务器之间的通信数据就会经过JustTrustMe进行中间人攻击,并被抓包工具记录下来。 抓包工具可以将通信数据保存为文件或在客户端显示,并提供详细的请求和响应信息,如URL、参数、头部信息和响应内容。通过分析这些数据,可以了解应用程序的通信方式、数据传输的加密与解密过程,以及可能存在的漏洞和攻击路径。 但需要注意的是,使用lsposed进行抓包是一种针对个人学习和研究的行为,未经授权的非法使用可能会侵犯他人的隐私和安全。在进行抓包时,务必遵循法律法规和道德规范。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值