有关 MouseJack 漏洞的信息,请访问 mousejack.com。
在 Ubuntu 上安装依赖:
sudo apt-get install sdcc binutils python python-pip
sudo pip install -U pip
sudo pip install -U -I pyusb
sudo pip install -U platformio
以下硬件已经过测试并确认可用。
git submodule init
git submodule update
cd nrf-research-firmware
make
nRF24LU1+ 芯片带有出厂预编程的引导加载程序,占用闪存最顶部的 2KB 空间。CrazyRadio 固件和 RFStorm 研究固件支持通过 USB 命令进入 Nordic 引导加载程序。
如果适配器和分线板运行以下任一固件,则可以通过 USB 进行编程:
通过 USB 刷写固件:
cd nrf-research-firmware
sudo make install
最常见的 Unifying 适配器基于 nRF24LU1+,但有些使用 Texas Instruments 的芯片。 此固件仅支持型号为 C-U0007 的 nRF24LU1+ 版本。刷写 脚本会自动检测插入的适配器类型,并且只会尝试刷写 nRF24LU1+ 版本。
通过 USB 将固件刷写到 Logitech Unifying 适配器:
cd nrf-research-firmware
sudo make logitech_install
下载并解压 Logitech 固件镜像,其文件名类似 RQR_012_005_00028.hex。然后,运行以下命令将 Logitech 固件刷写到适配器:
cd nrf-research-firmware
sudo ./prog/usb-flasher/logitech-usb-restore.py [path-to-firmware.hex]
如果您的适配器或分线板变砖了,您也可以使用 Teensy 通过 SPI 对其进行编程。
此方法仅在 Teensy 3.1/3.2 上测试过,但很可能也适用于其他 Arduino 变体。
cd nrf-research-firmware/prog
platformio run --project-dir teensy-flasher --target upload
cd nrf-research-firmware
sudo make spi_install
伪混杂模式设备发现工具,它会扫描一系列信道并打印解码后的 Enhanced Shockburst 数据包。
usage: ./nrf24-scanner.py [-h] [-c N [N ...]] [-v] [-l] [-p PREFIX] [-d DWELL]
optional arguments:
-h, --help show this help message and exit
-c N [N ...], --channels N [N ...] RF channels
-v, --verbose Enable verbose output
-l, --lna Enable the LNA (for CrazyRadio PA dongles)
-p PREFIX, --prefix PREFIX Promiscuous mode address prefix
-d DWELL, --dwell DWELL Dwell time per channel, in milliseconds
扫描信道 1-5 上的设备
./nrf24-scanner.py -c {1..5}
在所有信道上扫描地址以 0xA9 开头的设备
cd nrf-research-firmware
./nrf24-scanner.py -p A9
设备跟踪嗅探器,它会跟随特定的 nRF24 设备进行跳频,并打印从该设备解码出的 Enhanced Shockburst 数据包。
usage: ./nrf24-sniffer.py [-h] [-c N [N ...]] [-v] [-l] -a ADDRESS [-t TIMEOUT] [-k ACK_TIMEOUT] [-r RETRIES]
optional arguments:
-h, --help show this help message and exit
-c N [N ...], --channels N [N ...] RF channels
-v, --verbose Enable verbose output
-l, --lna Enable the LNA (for CrazyRadio PA dongles)
-a ADDRESS, --address ADDRESS Address to sniff, following as it changes channels
-t TIMEOUT, --timeout TIMEOUT Channel timeout, in milliseconds
-k ACK_TIMEOUT, --ack_timeout ACK_TIMEOUT ACK timeout in microseconds, accepts [250,4000], step 250
-r RETRIES, --retries RETRIES Auto retry limit, accepts [0,15]
在所有信道上嗅探来自地址 61:49:66:82:03 的数据包
cd nrf-research-firmware
./nrf24-sniffer.py -a 61:49:66:82:03
星型网络映射器,它通过更改给定地址中的最后一个字节,并尝试在信道列表中的每个信道上 ping 256 个可能的地址,来发现星型网络中的活动地址。
usage: ./nrf24-network-mapper.py [-h] [-c N [N ...]] [-v] [-l] -a ADDRESS [-p PASSES] [-k ACK_TIMEOUT] [-r RETRIES]
optional arguments:
-h, --help show this help message and exit
-c N [N ...], --channels N [N ...] RF channels
-v, --verbose Enable verbose output
-l, --lna Enable the LNA (for CrazyRadio PA dongles)
-a ADDRESS, --address ADDRESS Known address
-p PASSES, --passes PASSES Number of passes (default 2)
-k ACK_TIMEOUT, --ack_timeout ACK_TIMEOUT ACK timeout in microseconds, accepts [250,4000], step 250
-r RETRIES, --retries RETRIES Auto retry limit, accepts [0,15]
映射地址 61:49:66:82:03 所属的星型网络
cd nrf-research-firmware
./nrf24-network-mapper.py -a 61:49:66:82:03
nRF24LU1+ 芯片包含一种测试机制,可以发射连续音调,如果您有 SDR,则可以验证其频率。设备之间的频率偏移可能会导致意外行为。例如,测试过的一个 SparkFun 分线板存在约 300kHz 的频率偏移,导致它在两个相邻信道上接收数据包。
此脚本将使收发器在传入的第一个信道上发射音调。
usage: ./nrf24-continuous-tone-test.py [-h] [-c N [N ...]] [-v] [-l]
optional arguments:
-h, --help show this help message and exit
-c N [N ...], --channels N [N ...] RF channels
-v, --verbose Enable verbose output
-l, --lna Enable the LNA (for CrazyRadio PA dongles)
在 2405MHz 发射连续音调
cd nrf-research-firmware
./nrf24-continuous-tone-test.py -c 5
| Teensy | CrazyRadio PA | Sparkfun nRF24LU1+ Breakout |
|---|
| GND | 9 | GND |
| 8 | 3 | RESET |
| 9 | 2 | PROG |
| 10 | 10 | P0.3 |
| 11 | 6 | P0.1 |
| 12 | 8 | P0.2 |
| 13 | 4 | P0.0 |
| 3.3V | 5 | VIN |