
재전송/전송 PoC를 포함한 무선 마우스/키보드 공격
이 코드는 mousejack 도구(https://github.com/RFStorm/mousejack)를 확장한 것입니다.
원래 도구에 재생/전송 도구가 추가되었습니다.
Logitech Wireless Combo MK220(K220 무선 키보드와 M150 무선 마우스로 구성) 기반의 POC 패킷이 logs 폴더에 포함되어 있습니다.
자세한 내용은 https://www.ckn.io/blog/2016/07/09/hijacking-wireless-mice-and-keyboards/ 에서 확인할 수 있습니다.
#사용법
의사(pseudo) 무차별 모드 장치 검색 도구로, 채널 목록을 스위핑하고 디코딩된 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로 시작하는 장치 스캔
./nrf24-scanner.py -p A9
장치 추적 스니퍼로, 특정 nRF24 장치가 채널을 변경하며 따라가며 디코딩된 Enhanced Shockburst 패킷을 출력합니다. 이 버전은 패킷을 로그 파일에 기록하도록 수정되었습니다.
usage: ./nrf24-sniffer.py [-h] [-c N [N ...]] [-v] [-l] -a ADDRESS -o OUTPUT [-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
-o OUTPUT, --output OUTPUT Output file to log the packets
-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]
모든 채널에서 주소 8C:D3:0F:3E:B4의 패킷을 스니핑하여 output.log에 저장
./nrf24-sniffer.py -a 8C:D3:0F:3E:B4 -o logs/output.log
캡처된 패킷을 재생하거나 생성된 패킷을 전송합니다. 특정 nRF24 장치가 채널을 변경하며 따라가며 로그 파일에서 패킷을 전송합니다.
usage: ./nrf24-replay.py [-h] [-c N [N ...]] [-v] [-l] -a ADDRESS -i INPUT_FILE [-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
-o INPUT_FILE, --input INPUT_FILE Input file that has the packets to sned
-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]
호핑 채널에서 주소 8C:D3:0F:3E:B4로 keystroke.log 파일의 패킷 전송
./nrf24-replay.py -a 8C:D3:0F:3E:B4 -i logs/keystroke.log
스타 네트워크 매퍼로, 주어진 주소의 마지막 바이트를 변경하고 채널 목록의 각 채널에서 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이 속한 스타 네트워크 매핑
./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에서 연속 톤 전송
./nrf24-continuous-tone-test.py -c 5
이 스크립트는 사전을 사용하여 키보드 입력을 해당 패킷에 매핑합니다. stdin 입력을 읽고 매핑된 패킷을 logs/keystrokes.log에 기록합니다. Ctrl+C가 눌릴 때까지 입력을 받습니다.
usage: ./keymapper.py
logs 폴더에는 다양한 키보드 작업에 대한 사전 저장된 패킷이 포함되어 있습니다.
Shell.log는 공격자 머신에 다시 연결되는 PowerShell 원 라이너를 실행하여 Windows 머신을 익스플로잇하는 데 사용됩니다.
keys.log 파일은 다양한 키 입력 및 조합이 해당 패킷에 매핑된 참조 자료입니다.
Windows 머신을 익스플로잇하는 데모는 여기 https://www.youtube.com/watch?v=YLzUeK1IvJs&feature=youtu.be 에서 확인할 수 있습니다.