Keykeriki v2 Cansec v1.1
Keykeriki v2 Cansec v1.1
Keykeriki v2 Cansec v1.1
of
Modern Wireless Devices
Thorsten Schroeder
[email protected]
Max Moser
[email protected]
Warning!
Verifying the security of someone else's data
transmission or injecting stuff without permission
could send you (or the other guy) to jail in most
countries :-)
What is this talk all about?
Brief History
Nordic Semiconductor Radio
Practical Exploitation of…
… other Mobile Devices
Demo & Release – Remote Code Execution
History
Evolution
Infrared (Not part of this talk)
27 MHz Radio
Bluetooth 2.4 GHz Radio
Proprietary 2.4 GHz Radio
What is it?
27 MHz frequency band (Citizen Band)
Miller encoded radio signal
Proprietary protocols
Approx. 90 cm guaranteed max. working distance
Low cost
Battery demanding
What is wrong?
Pure one way communication
“Encryption” absent or only optionally available
No protection against replay attacks
No (Message) Authentication
Logitech Packets (27MHz)
a(down)
000000100 10001001001 0000011110 1 00000
Keyb 1
a(down)
000000100 100111001111 0000011110 1 0001000
Keyb 2
a(up)
000000100 10001001001 0000011110 0 00000
Keyb 1
a(up)
000000100 100111001111 0000011110 0 0001000
Keyb 2
b(down)
000000100 10001001001 0000000101 1 0101
Keyb 1
b(down)
000000100 100111001111 0000000101 1 0100000
Keyb 2
b(up)
000000100 10001001001 0000000101 0 0101
Keyb 1
b(up)
000000100 100111001111 0000000101 0 0100000
Keyb 2
Packet
CRC
Preamble Address Control Payload
Field
1-2
1 Byte 3-5 Byte 0-32 Byte
Byte
9 bit
Etc
0a 38 6 1 df 88 8 d2
Keystrokes "a b
0a 38 6 1 df 88 8 d2
0a 38 6 1 df 88 8 d2
<space>"
0a 38 6 1 df 88 8 d2
0a 38 6 1 df 88 8 d2
0a 78 6 1 DE 88 4b 0a c0 CD 88 8 0a c0 cd 52
Recognizable Patterns 0a 78 6 1 D9 88 4b 0a c0 C8 88 8 0a c0 cd 50
0a
38
38
6
6
1
1
d9
d9
88
88
8
8
d4
d4
Device Class ID
0a 38 6 1 d9 88 8 d4
0a 38 6 1 d9 88 8 d4
Packet Type ID
0a 38 6 1 d9 88 8 d4
0a 78 6 1 D8 88 4b 0a c0 CD 88 8 0a c0 cd 54
Model ID 0a 78 6 1 DB 88 4b 0a c0 E1 88 8 0a c0 cd 7B
0a 38 6 1 dB 88 8 d6
0a 38 6 1 dB 88 8 d6
Sequence ID / Counter
0a 38 6 1 dB 88 8 d6
Metakey Flags / Bitfield
0a 38 6 1 dB 88 8 d6
HID code 0a 78 6 1 DA 88 4b 0a c0 CD 88 8 0a c0 cd 56
Checksum
Microsoft Payload Encryption
C 0A 78 06 01 C2 98 76 0A C0 C8 98 35 0A C0 CD 5B
K CD 98 35 0A C0 CD 98 35 0A C0 CD
P 0A 78 06 01 0F 00 43 00 00 05 00 00 00 00 00
Device type
Packet type
Sequence ID
Flags/Meta
HID Code
Checksum
Model
for(i=0;i<4;i++) {
ctx->c_down[i] = ctx->p_down[i];
cksum ^= ctx->p_down[i];
}
for(i=4;i<15;i++) {
cksum ^= ctx->p_down[i];
ctx->c_down[i] = ctx->p_down[i] ^ ctx->secret[i % 5];
}
ctx->c_down[15] = cksum;
Microsoft Mouse
Data (x/y) is not encrypted
Mouse button press/idle/releases are also simply
HID codes
Mouse has Device Class ID 0x08
Limited to Keyboards?
Obviously
Apartment Whispering?
Election / Voting?
Sports / Health
Dragos, see the issue?
What is going through your mind,
when you see terms like…
Identification Keypad Module
In/Out Module
GSM Module
Driver Identification Module
Engine Blocking Module
… all interconnected within cars, using proprietary
2.4GHz techniques..
Security / Safety
More targets…
Just have a look at the Nordic Semiconductor „Press
Releases“ Webpage
How many of the vendors, using the NRF24xxx
based transceivers in their devices, might implement
crypto in a proper way? Message authentication?
How many of the vendors might use the NRF24xxx
crypto hardware in a proper way?
Back to the keyboard topic
Logitech Hardware
Logitech Payload Patterns
500us
X X X X
Time
Logitech AES Key Derivation
128 bit AES cipher needs block sizes of 16 Byte
Only 8 Bytes are seemingly random or encrypted
We assume, that AES128 is used in a mode, to
generate random data for an arbitrary stream-
cipher initialization.
Even when pressing the same key again and again,
the 8 Byte ciphertext block differs completely
More Logitech…
Keyboard Multimedia Keys are not encrypted
Mouse data is not encrypted
Keykeriki V2 - DEMO
1. Scanning channels for valid
Enhanced Shockburst frames
2. Setup sniffer & NRF module
3. Perform Remote Command
Execution:
<WINMETA-R>
cmd.exe<return>
calc.exe<return>
46/2=
Risk & Impact
Malware infection
Remote key- and command injection (Drive-by
shooting)
About 75 meters with default antenna
Interception / Identity theft
Where lies the burden of proof.....?
Whats Next?
Fall 2010 2.4 GHz software defined radio
Can support different protocols
Can support different channels
Write us:
[email protected]
[email protected]