Assignment 5: Cars and Key Fobs (2021)

web.stanford.edu

234 points by Pikamander2 15 days ago


sorenjan - 15 days ago

BMW has a page describing the use of UWB (Ultra Wide Bandwidth) radio in key fobs and how it helps against relay attacks. In short it's because the wide bandwidth allows for very short pulses which lets them measure the distance between the car and the key, and using a relay will inevitably add distance and therefore time between the signal is sent and the reply is received.

https://www.bmw.com/en/innovation/bmw-digital-key-plus-ultra...

myself248 - 15 days ago

For the time being, I just store my keys in a little cast iron dutch oven, sitting on top of the fridge.

It's extremely effective as a shield for the 125kHz LF wake-up signal, and I've been unable to elicit a response when they're in there, even with a relay setup that reliably wakes them up from several feet away otherwise.

mrinterweb - 15 days ago

I have a 2021 Toyota that I lost one of two key fobs. Toyota has a strict policy that only Toyota dealerships can program key fobs for their newer cars, so buying a key fob replacement from a 3rd party was not an option. Total out of pocket expense for getting new key fob, programming that key fob to the car, and making sure the other fob still worked; cost about $550. I feel that is an absurd amount of money to spend because of a lost fob. I appreciate people looking into and exposing weaknesses of car fobs because it might expose ways to circumvent the monopolistic costs associated with replacements. Wish there was a way to retrofit my car to use Ultra Wide Bandwidth as a key.

madphilosopher - 15 days ago

Vulnerabilities like this lead to car thefts. Some models of cars are more susceptible than others, and the manufacturers seem unwilling to fix the problem. The insurance companies know which models are more trouble for them, and so they set higher rates for these, which punishes the driver/owner for something outside of their control.

My solution? Require the manufacturers of vulnerable models to pay the insurance on behalf of the driver/owner as long as the vulnerabilities go unfixed.

H8crilA - 15 days ago

BTW, car keys (physical keys) are notoriously weak, generally susceptible to simple raking attacks. You can learn how to rake a lock in a few minutes, and the rake+tensioner itself costs around $5. And all cars include a physical key as a backup entry method. This was partially solved by adding another device that cuts off the engine, the immobilizer, which still allows the attacker to get in, but not to drive off.

DebtDeflation - 15 days ago

The current gold standard for vehicle theft protection is:

IGLA system to block the CAN bus, LIN bus, and ODBII port. It also protects against key fob cloning/relay attacks.

+

A hidden physical kill switch that cuts off the fuel pump relay (the company 41.22 makes a drop in that doesn't require wire splicing).

+

A hidden GPS tracker with an onboard backup battery in the event the car battery is disconnected.

None of this stops someone with a flatbed from simply towing your vehicle away, but at least the GPS tracker will give you a window to locate them.

ta1243 - 15 days ago

I have a physical key which I physically put in a hole in the steering column. This means I know exactly where it is when I come to parking the car, and you need to physically have it in contact to drive the car away.

I don't get the appeal of keyless ignition.

trishmapow2 - 15 days ago

Did a high school project on the jam and replay attack mentioned here: https://github.com/trishmapow/rf-jam-replay. Low cost SDRs have been a real game changer in letting the average Joe get started in this space. Good to see that more unis have courses with this type of hands on experimentation.

gadders - 15 days ago

So many Range Rovers are being stolen in the UK that the manufacturer has started contributing towards insurance costs: https://www.whatcar.com/news/range-rover-insurance-owners-to...

Ballas - 15 days ago

Code-hopping remotes have existed for a very long time, and I am really surprised that it's not the case here. I have had cars that were made in the 90's that used keeloq, a technology from the mid 80's.

In fact, all of my door openers and car remotes have some form of code-hopping and it's certainly not because they were specifically chosen for that aspect.

Sure, there are attacks for code-hopping systems as well, but it's a completely different league.

mppm - 15 days ago

I'm confused why this is still an unsolved problem. A simple cryptographic challenge with pre-shared keys + button press ought to make key fobs perfectly secure for all practical purposes. Is there something I'm missing here?

zero_k - 15 days ago

Broke a few of these for my old work -- HiTag2 and Megamos, some of the code&knowledge used for the attack is online&published, but neither can be used to actually break the ciphers as-is [1][2]. The issue used to be that the cipher employed needed to be low-power, fast, and reliable. With current technology, one could easily use AES, and no serious auto maker should be using HiTag2/Megamos. They were hand-rolled ciphers. The way AES is used (i.e. the protocol itself) could still be wrong, of course, e.g. allowing for replay attacks, etc.

[1] Doesn't have some features which you need to use to actually attack HiTag2: https://github.com/msoos/grainofsalt

[2] Used for various pre-processing that is useful (but not neccessary) to break Megamos, but _far_ from the actual attack: https://github.com/meelgroup/bosphorus/

neogodless - 15 days ago

This is both very relevant and a bit off topic, but for me, quite timely.

Today my Polestar app wasn't updating properly. Some things were, but the widget was stuck on manual refresh, and the odometer and location in the app were from the previous location I'd been, not including the trip home.

I stupidly deleted the cache and data for the app. Then tried to reconnect to the car.

This process requires putting all of the fobs (for me, two) in the car, and then getting to the right step in the car as well as the app.

But... here the car claims it cannot find both fobs. While in other parts of the car software, it indicates it can find both fobs. Because of this, I cannot pair the phone and car, and have any of the app features working again.

I would, naturally, factory reset, but this also requires both fobs, and also claims it cannot find them. (I've tested each fob and they both fully work otherwise - just in these two instances, the car acts as if it cannot find them.)

crustycoder - 15 days ago

This is an old article and whilst there are undoubtedly still vulnerable vehicles, with the advent of UWB it seems to be a solved problem.

My car has UWB, there's a LED on the fob that blinks when it is in range and if it's stationary for a short time, it inactivates as well. Some experimentation suggests you need to be within about 5m of the car to open the doors.

The localisation seems to be very accurate, even if you can open the car from a distance it won't start unless the fob is physically within it. If I sit in the driver seat the fob has to be less than 10mm away from the outside of driver's window, otherwise it refuses to start.

1970-01-01 - 15 days ago

I HATE to say it, but 'enter your password to unlock your car' is the only reasonable alternative when 'something you have' is pseudo-secure.

bufferoverflow - 15 days ago

Why can't it be very simple and secure. Car and fob share a secret key.

When you click on the open button on the fob, you send

SHA256(key)

Car responds with a random challenge

RND

Fob sends

SHA256(key XOR RND)

Car does the same calculation and compares.

relaxing - 15 days ago

Only two lecture slide decks?

Did the professor get tired of uploading the material for students to review post lecture?

quailfarmer - 14 days ago

This was a great class when I took it! Hope you’re doing well Dr. Pauly!

- 15 days ago
[deleted]
stewx - 15 days ago

We should just GPS track the cars and arrest the thieves.

throw0101d - 15 days ago

For a good modern day automobile security system, at least in the US, get a car with a manual transmission.

techlatest_net - 15 days ago

[dead]

spacebanana7 - 15 days ago

One thing I would’ve liked about an Apple car is the security. Imagine FaceID, secure enclaves and MFA. An iPhone on wheels would be immune to most, if not all, of these attacks.