K1two2's Geek Hub


NEET
Independent Researcher
GnuRadio Hacking②:使用SDR嗅探北欧芯片无线键盘鼠标数据包

0×00 前言

上半年的时候安全公司Bastille Networks(巴士底狱)安全研究员发现大多数无线鼠标和接收器之间的通信信号是不加密的,黑客可对一两百米范围内存在漏洞的无线键鼠进行嗅探甚至劫持,从而控制受害者电脑,向计算机中输入任何指令!

相关阅读:Mousejack Hacking : 如何利用MouseJack进行物理攻击

该漏洞在于通信数据不加密,导致数据可被嗅探、劫持。今天的分享不再使用Crazyradio 2.4Ghz nRF24LU1+ USB radio dongle,我们来试着使用gr-nordic开源项目+SDR硬件嗅探nordic 北欧公司的RF无线芯片数据。

0×01 系统安装

下载Ubuntu 16.04

0×02 搭建SDR开发环境

安装pip和pybombs

apt-get update
apt-get install git
apt-get install python-pip
pip install --upgrade pip
pip install git+https://github.com/gnuradio/pybombs.git

获取GnuRadio的安装库

pybombs recipes add gr-recipes git+https://github.com/gnuradio/gr-recipes.git  
pybombs recipes add gr-etcetera git+https://github.com/gnuradio/gr-etcetera.git

安装SDR常用软件

pybombs install osmo-sdr rtl-sdr gnuradio hackrf airspy gr-iqbal libosmo-dsp gr-osmosdr gqrx

使用pybombs安装bladeRF会报错,这里选择源码编译:

git clone https://github.com/Nuand/bladeRF
cd bladeRF/host
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig

0×03 编译gr-nordic

gr-nordic:GNU Radio module and Wireshark dissector for the Nordic Semiconductor nRF24L Enhanced Shockburst protocol.

git clone https://github.com/BastilleResearch/gr-nordic/
cd gr-nordic/
mkdir build
cd build/
cmake ../
make
sudo make install
sudo ldconfig

0×04 安装WireShark

apt-get install wireshark

Ubuntu系统中,访问网络端口需要root权限,而wireshark的只是/usr/share/dumpcap的一个UI,/usr/share/dumpcap需要root权限,所以没法non-root用户无法读取网卡列表。解决办法使用sudo wireshark启动抓包,但使用root权限启动wireshark就不能使用lua脚本: 解决方案:

sudo -s  
groupadd wireshark  
usermod -a -G wireshark $你的用户名  
chgrp wireshark /usr/bin/dumpcap  
chmod 750 /usr/bin/dumpcap 

setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap
getcap /usr/bin/dumpcap

当输出为:

/usr/bin/dumpcap = cap_net_admin,cap_net_raw+eip

即为设置生效。注销登录状态或者重启系统启用配置。

0×05 数据包捕获

gr-nordic项目中include里边包含了nordic的tx、rx、API头文件,lib文件夹则是该项目依赖的一些库文件,example文件包含了Microsoft鼠标以及扫描、嗅探使用Nordic北欧芯片键鼠的利用脚本,wireshark文件夹中则是对扫描、嗅探到的数据包进行分析所需的lua脚本。

gr-nordic$ wireshark -X lua_script:wireshark/nordic_dissector.lua -i lo -k -f udp

gr-nordic$cd example 
gr-nordic/example$./nordic_sniffer_scanner.py

0×06 演示视频

0×07 Thanks & refer

gr-nordic: GNU Radio module and Wireshark dissector for the Nordic Semiconductor nRF24L Enhanced Shockburst protocol.

孤独小白:GNU Radio教程(一)

Sniffing with Wireshark as a Non-Root User

Bastille 巴士底狱安全研究员:Marc NewlinBalint Seeber

原文地址:http://www.freebuf.com/articles/wireless/115440.html

posted on 2016-10-13 15:24  K1two2  阅读(1912)  评论(0编辑  收藏  举报

版权声明:如果网站侵犯了您的合法著作权宜,请发送邮件至我,经核实后,我会在24小时内删除该资源!