Using RTL-SDR to Open Car Doors (2016)
anthonys.io
anthonys.io
-Key asks car to unlock and sends public key for recognition,
-Car sends challenge encrypted with key Public key
-Key sends back private-key-encrypted challenge
Bing, authenticated.
The car most probably lacks the hardware to send at 315 MHz. Not that the key had the ability to receive either, but that means that you'd not only have to replace the key fobs but do a full recall campaign with new hardware in the car.
If someone tried to "replay" an older key, the car would reject it. However, what if the user accidentally presses the button while not in range of the car?
To account for this, the system will "partially accept" keys "ahead of schedule" for about half the keyspace. The car advances its pointer (let's say N+5), and waits for N+6 to unlock.
Since most older keyfobs are simply "one way transmitters", PKI is out of the question. Newer keyfobs are able to receive as well, and could preform a handshake. However, car manufacturers are notoriously bad at security.
All you need is to include a counter in the signal that is incremented for each button press. The car remembers the last counter value it receives and ignores any before that. Obviously the counter needs to be encrypted in some way but it's not exactly difficult.
I'm kind of amazed this still happens in 2016. Or maybe it doesn't. The cars could be old.
Thus, you have a broken keyfob if you ever press it outside the car's range (or require a "re-pairing" handshake to resynchronize the counters). Infeasible due to terrible usability.
Or you widen the window of accepted counters to avoid the above issus. Which is what this attack is preying on.
Or maybe a proof that it isn't possible?
It's certainly not complete solution to the problem but allows you to arbitrarily shrink the time window the attacker has to mount this attack.
Or is it that cheap to have ~5-10 yr accurate clocks implemented in hardware now? (Not that the margin on keyfobs seems exactly slim...)
RTC with common 32768Hz xtal is probably accuratte enough for this application given reasonably stable temperature (ie. key stored in room temperature or near human body) with few minute acceptance window.
The problem with battery life for such keyfob is that it also has relatively high powered RF transmitter and combining low permanent current consumption with high current bursts is not something that cheap primary lithium cells are optimized for (you have to pick one or the other)
Edit: also given the fact that there is only one receiver and that it usually also has second bidirectional channel (immobilizer/keyless start) you can compensate for some limited clock drift in software or even periodically resynchronize the clock.
Manual for Fabia III even describes procedure to "resynchronize" the keyless fob by using it as if it were ignition key, which probably does exactly this. But who knows, almost all post 2000 VWs have similar procedure for central locking remote which probably simply overwrites the counter in car with whatever next value from the keyfob as there cannot be any bidirectional communication (the old procedure involves lock in driver's door, no NFC antennas there and the imobilizer NFC chip in keyfob is completely separate from the RF part)
There is fundamentally no reason why there can't be full authenticated PKI for keyfobs. It certainly isn't going to happen as part of a recall of current models, though.
To say another way, it exploits the fact that you can be a hundred miles from your car and push the unlock button on your fob but then return next to your car, push the fob, and the car unlocks.
By jamming the the rx at the car it never gets code X+1 but the attacker does so the car never rolls ahead. Then, the attacker replays X+1 and the car unlocks.
This attack has been known for a quite a long time along with the TPMS hack (made famous but rutgers and U South Carolina http://www.sc.edu/news/newsarticle.php?nid=1202#.WRXDdVXythE)
https://www.theregister.co.uk/2010/09/21/car_jammer_vehicle_...
AFAIK, if you let the car read a code straight from the remote, it will sync forward again, making all your stored codes invalid.
And I'm reasonably sure that the algorithm is now published. It wouldn't be hard to get 3 or 4 button presses, and then exhaustive search the space for the right serial and then attack it.