HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

31
Wireless Attacks on Automotive Remote Keyless Entry Systems David Oswald 1 joint work with: Flavio D. Garcia 1 , Timo Kasper 2 and Pierre Pavlidès 1 1. University of Birmingham, UK 2. Kasper & Oswald GmbH, Germany

Transcript of HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Page 1: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Wireless Attacks on Automotive Remote Keyless Entry Systems

David Oswald1

joint work with: Flavio D. Garcia1, Timo Kasper2 and Pierre Pavlidès1

1. University of Birmingham, UK

2. Kasper & Oswald GmbH, Germany

Page 2: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

2

Page 3: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Remote Keyless Entry (RKE)

Active UHF transmitter (315 / 433 / 868 MHz)

Unidirectional Sometimes integrated

with immobilizer chip (“hybrid”), sometimes separate

Immobilizer (Immo)

Passive RFID at 125 kHz

Many broken systems(DST40, Hitag2, Megamos)

3

Page 4: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Fix codes

uid, btn

Eavesdropping and replay from 10 … 100 m

4

Page 5: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Examples forfix code systems

5

Page 6: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Rolling codes

uid, encK(ctr’, btn)

6

uid, encK(ctr’ + 1, btn)

uid, encK(ctr’ + 2, btn)

ctr

Decrypt ctr’

if (ctr < ctr’ < ctr + Δ)

ctr := ctr’ open / close

ctr + Δ

“validity window”

Page 7: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Rolling codes

ctr’ incremented on each button press, replay fails

uid, encK(ctr’, btn)

7

Page 8: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Previous attacks on RKE

• 2007: Cryptanalysis of KeeLoq garage door openers (216 plaintext/ciphertext pairs) by Biham et al.

• 2008: Side-channel attack on KeeLoq key diversification (Eisenbarth et al.)

• 2010: Relay attacks on passive keyless entry systems (Francillon et al.)

• 2015: “RollJam” by Spencerwhyte / Kamkar(had been proposed before)

8

Page 9: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Relay Attacks

9

Page 10: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Question:State of RKE security in 2016

(or: have we learnt from KeeLoq?)

Page 11: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Cryptographic attack surface

Option 1: Attack key management

Option 2: Attack crypto

uid, encK(ctr’, btn)

11

Page 12: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

The VW Group System

Page 13: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

VW Group RKE

• > 10% worldwide market share

• Immobilizer (Megamos) and RKE separate for most vehicles

• Proprietary RKE system, mostly 434.4 MHz

• We analyzed vehicles between ~2000 and today

• Four main schemes (VW-1 … VW-4) studied

13

Page 14: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

VW Group RKE: signals

Step 1: Eavesdropping & decoding

14

Page 15: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Analyzing ECUs

Step 2: Obtain ECUs for analysis (eBay) ...

15

Page 16: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Reverse engineering

Step 3: Reverse-engineering ECUs

16

Page 17: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Example: VW-3

• AUT64 is a proprietary block cipher, no trivial attacks known

• … but key K3 is the same in all VW-3 vehicles• VW-2: Same cipher, different (global) key • VW-4: Newer cipher, still a global key• VW-1: Weak crypto (LFSR)

17

AUT64K3(uid, ctr’, btn’), btn

Page 18: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

VW RKE demo

18

Page 19: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Affected vehicles

• Audi: A1, Q3, R8, S3, TT, other types of Audi cars (e.g. remote control 4D0 837 231)

• VW: Amarok, (New) Beetle, Bora, Caddy, Crafter, e-Up, Eos, Fox, Golf 4, Golf 5, Golf 6, Golf Plus, Jetta, Lupo, Passat, Polo, T4, T5, Scirocco, Sharan, Tiguan, Touran, Up

• Seat: Alhambra, Altea, Arosa, Cordoba, Ibiza, Leon, MII, Toledo

• Skoda: City Go, Roomster, Fabia 1, Fabia 2, Octavia, Superb, Yeti

• In summary: probably most VW group vehicles between 2000 and today not using Golf 7 (MQB) platform

19

Page 20: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Intermezzo

• Secure crypto ≠ secure system

• Reverse engineering ECU firmware yields a few worldwide keys

• Attack highly practical and scalable

• MQB allegedly protected

20

Page 21: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

The Hitag2 System

Page 22: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Previous work on Hitag2

• At Usenix Security ’12, Verdult et al. presented a secret key recovery attack against Hitag2 immobilizer requiring:

– Immobilizer transponder uid

– 136 authentication attempts from the car

– 5 minutes computation

• Note: This attack is not car-only due to the first requirement

22

Page 23: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

RKE protocol (simplified)

Diversified keys

id1 k1 ctr1

id2 k2 ctr2

id3 k3 ctr3

uid, btn, ctr, MACk, crc

ctr1

If (ctr1 < ctr’1 < ctr1 + Δ)then ctr1 := ctr’1 ; open

MACk is 32 bits of keystream

23

Page 24: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Our novel attack requires:

• ≈ 4 to 8 traces (key presses)

• $40 Arduino board can collect them

• Speeding up trace collection: Device also implements reactive jamming:

uid, btn, ctr, MACk, crc

24

Page 25: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Hitag2 RKE attack demo

25

Page 26: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Hitag2 RKE vehicles

Opel | Astra H | 2008

Opel | Corsa D | 2009

Fiat | Grande Punto | 2009 26

Page 27: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Countermeasures:What to do?

Page 28: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

28

Page 29: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Countermeasures

• For owners of affected vehicles:

– Stop using RKE (unrealistic)

– Hope for vendor upgrade (unrealistic)

– Do not leave valuables in car

– Multiple failed unlock attempts = suspicious

• For manufacturers (in general, not only RKE):

– Use secure key distribution and good crypto

– E.g. exchange keys via LF (immo) once and use AES for RKE

29

Page 30: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Conclusions

• We informed VW Group of our findings in back in Dec 2015 and NXP Semiconductors in Jan 2016.

• Weaknesses in the Hitag2 cipher known for many years but still used in new (2016) vehicles

• This research may explain several mysterious theft cases without signs of forced entry

• Unfortunately, poor crypto still common in vehicles (and other long-lifetime systems)

30

and still

Page 31: HIS 2017 David Oswald- Your car is not a safe box - breaking automotive keyless entry systems

Thanks for your attention!Questions?

[email protected]