News for hackers. Stuff that matters.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by LeonM on Tuesday May 17, 2022 @07:13AM (#31408731)
These kinds of "sensation" vulnerabilities have been making great headlines every for the past 15 years. However, there is nothing new about this.

- Relay attacks are nothing new, and not unique to Tesla.

- Every contactless unlock technique is vulnerable to relay attacks.

- No amount of encryption prevents relay attacks.

- Short range/near field wireless standards (such as NFC) are also vulnerable, though requires close proximity of the attacker to the NFC token (phone/card/keyfob).

Even HN often falls victim to these kind of sensational headlines. No, we can't solve this. No, car manufacturers won't go back to physical keys. Yes, 99.9% of consumers really like keyless entry and don't care too much about the potential of theft. For most, that is what insurance is for.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by yc-kraln on Tuesday May 17, 2022 @07:17AM (#31408776)
> Every contactless unlock technique is vulnerable to relay attacks. > - No amount of encryption prevents relay attacks.

This isn't true, and I have the patent(s) to show it.

I developed (along with some truly talented security professionals and cryptographers) the active RFID security system for KIWI, a residential access control system here in Germany. One of the requirements, aside from not keeping a central log of access, was that the system should not work if you were further than 10 meters from the door you were trying to open. Things like measuring signal strength, etc. were not an option, as you might imagine repeaters render that moot.

Ultimately, it comes down to fairly tight timings, the speed of light and the rules of physics, but we could restrict things such that the cryptographic handshake would fail if you were more than about 30 meters away, corresponding to a timing window of about 0.0000001 seconds.

We offered to license the technology to car companies, but they weren't interested.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by lloeki on Tuesday May 17, 2022 @07:49AM (#31409074)
> I have the patent(s) to show it.

> I developed

> Ultimately, it comes down to fairly tight timings, the speed of light and the rules of physics, but we could restrict things such that the cryptographic handshake would fail if you were more than about 30 meters away, corresponding to a timing window of about 0.0000001 seconds.

Prior art! ;)

https://web.mit.edu/jemorris/humor/500-miles

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by yc-kraln on Tuesday May 17, 2022 @08:46AM (#31409718)
(Yes, I realize your comment was tongue-in-cheek)

There are actually a lot of patented ways to prevent relay attacks, mine is only one of them. And most of them are patented by NXP :)

Ultimately, this is a failure of prioritization on behalf of the car companies, or a sacrifice of security for usability, or both.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by excuses_ on Tuesday May 17, 2022 @08:05AM (#31409237)
I was trying to learn more about the problem as two of my colleagues were victims of relay attacks, allegedly. Stolen cars were Mazda and Kia. I found claims that only Jaguars and Land Rovers have been resistant to that kind of attack thanks to precise time measurement - similar solution to your description.

I don't have any links and found only [1] this one quickly.

[1] https://teamtalk.jaguarlandrover.com/news/jaguar-land-rover-...

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by moduspol on Tuesday May 17, 2022 @08:01AM (#31409185)
IIRC this is how the Apple Watch's feature that unlocks your Mac works. It's not vulnerable to repeaters and only works within ~3 feet of the watch and the Mac.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by eric_h on Tuesday May 17, 2022 @12:42PM (#31413237)
I’ve found the range for unlocking your phone with the watch is even tighter. When I’m on the subway it’s less than six inches, presumably because of local radio noise.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by moduspol on Tuesday May 17, 2022 @01:14PM (#31413661)
Yep. The reference I saw actually says ~3 meters, but even in seemingly ideal conditions, I don't see it reliably work except within probably just one.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by oblio on Tuesday May 17, 2022 @07:20AM (#31408800)
> We offered to license the technology to car companies, but they weren't interested.

Well, I'm sorry for your tech, but you're kind of making OP's point:

> Yes, 99.9% of consumers really like keyless entry and don't care too much about the potential of theft. For most, that is what insurance is for.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by sodality2 on Tuesday May 17, 2022 @09:27AM (#31410243)
It refutes the part where they said: "No, we can't solve this"
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by rekoil on Tuesday May 17, 2022 @09:24AM (#31410192)
I think the point is we can have both, but it requires more expensive hardware to be able to do the handshake fast enough that it doesn't cause accidental failures and ultimately irritation for the user.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by gentleman11 on Tuesday May 17, 2022 @09:57AM (#31410721)
Try selling it to insurance companies? Manufacturers who refuse to use it could have their drivers paying higher insurance rates
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by jart on Tuesday May 17, 2022 @07:43AM (#31409014)
I agreed with the GP but you certainly made them sound like a bag of hot air. What a pleasant reminder that security can be bona fide engineering. It's too bad we live in a world that doesn't always want problems solved.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by pbronez on Tuesday May 17, 2022 @07:57AM (#31409153)
Where can I learn more about this technology and explore licensing opportunities?
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by yc-kraln on Tuesday May 17, 2022 @08:44AM (#31409697)
I am no longer involved in the company. Here is one of the related patents: DE102012104955A1; send me a message/email and I could potentially make a connection.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by tlb on Tuesday May 17, 2022 @10:03AM (#31410824)
How hard is it to integrate the key into phones? If it uses a separate UWB radio it must add some cost and power drain.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by superjan on Tuesday May 17, 2022 @07:28AM (#31408878)
I heard the argument before that relay attacks can’t be solved because it is too hard to measure distance/time of flight. Except that the NASA Apollo missions were able to do so, on a 2ghz signal with 1.5 meter accuracy all the way to the moon. It used complex equipment back then, but not by today’s standards. It’s not impossible, it is just too expensive.

https://www.righto.com/2022/04/the-digital-ranging-system-th...

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by moduspol on Tuesday May 17, 2022 @08:16AM (#31409367)
Apparently the Apple Watch does it when using the "unlock your Mac" feature.

https://networkingnerd.net/2016/09/21/apple-watch-unlock-802...

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by theshrike79 on Wednesday May 18, 2022 @03:39AM (#31420186)
It also notifies the user with a haptic and audio notification when the Watch has been used to unlock a Mac.

In an open plan office it works around 2 meters away at maximum.

There seems to be some kind of heuristic when it allows it too, the first login for the day requires a password or TouchID to be used, but the ones after that work via the Watch.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by jimmaswell on Tuesday May 17, 2022 @10:12AM (#31410948)
> No amount of encryption prevents relay attacks

Identity verification and public/private keys are a solved problem, how is it at all impossible to prevent relay attacks?

Key: I want to unlock the door.

Car: Here's a random number encrypted with my key, which only the real fob should have the pair key to.

Fob: Here's the number encrypted with another key, which only the car should have the pair key for.

Car: This matches, opening the door.

Blindly repeating these bits won't work and it should be impossible to eavesdrop without an NSA cluster of supercomputers. What am I missing?

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by LeonM on Tuesday May 17, 2022 @12:37PM (#31413150)
The attack in the article is a relay attack, not a replay attack. One letter difference.

Every keyless/wireless car key already uses a challenge-response scheme, just like you described, to prevent replay attacks. However, that will not work against relay attacks. Cryptography does not prevent relaying.

Fun fact: Even most physical car keys produced >1990 have a small RFID based transponder in the key head (the plastic part that you hold). This transponder responds to a challenge transmitted by the ignition barrel. Without a correct response, the ECU will refuse to start the engine. This is mainly done to prevent 'Hollywood' style theft where you connect 2 wires from the ignition barrel together to start a car.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by jimmaswell on Tuesday May 17, 2022 @12:45PM (#31413280)
This has caused me a lot of grief on my 1999 Jeep Grand Cherokee Limited. The reader is known to go bad and refuse to let the thing start. Took a long time to find the solution somewhere online to take the steering column cover off and reconnect/jiggle the thing. Probably just some bad solder joints. Personally considering sending in my ecu to be reprogrammed and taking the reader out permanently.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by Vespasian on Tuesday May 17, 2022 @10:17AM (#31411036)
This is not what they did.

They used a relay attack which means that they tunneled the actual keyfob signal over the internet (or a direct connection).

Tesla and others try to mitigate that by making sure that the latency of the signal is not too high.

<Everything you described> Car: your encrypted authentication looks right but you took 200ms to send it. You are probably not within BLE range.

The researchers contribution was to show that despite that a relay attack is still possible.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by jimmaswell on Tuesday May 17, 2022 @10:29AM (#31411221)
So they could add a power switch to the fob or make it need a button press. Maybe people don't think it's worth it. Could also keep your fob in a radio frequency blocking bag.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by Vespasian on Tuesday May 17, 2022 @11:35AM (#31412249)
It's usually working without a dedicated fob and uses the users phone to open and start the car.

I believe they have an option where you need a pin to start the engine at least however I'm not an owner

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by brewdad on Tuesday May 17, 2022 @12:46PM (#31413288)
Wait. Does this mean thieves are downloading a car?

What a world!

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by oofbey on Tuesday May 17, 2022 @10:27AM (#31411190)
Blindly repeating the bits actually works just fine. The relay doesn't need to know anything about the content of the conversation - it just needs to boost the signal enough that the car and key can talk to each other when they're far away. Neither key nor car are the wiser, as long as the latency is low enough.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by jimmaswell on Tuesday May 17, 2022 @10:31AM (#31411257)
I was unfamiliar with this buttonless setup. Seems silly.

The attack is defeated by keeping your fob in something that blocks radio frequencies I guess. Same idea as those metal wallets but this time for an actual threat.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by oofbey on Tuesday May 17, 2022 @10:36AM (#31411318)
"Buttonless" is also critical. If you make people press a button on their key to open the car, it's secure.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by oofbey on Tuesday May 17, 2022 @10:18AM (#31411046)
I appreciate and agree with your main point, but I want to push back on the "impossible to solve" assertion because solving hard problems is fun.

Using latency seems intrinsically expensive because there's no lower limit to how fast a network switch or relay can operate, meaning speed of light is the only real limit. And then the latency bounds get extremely tight, which probably means expensive components. Probably too expensive for a dedicated key fob, but maybe possible with a phone.

But position is actually the thing we care about. If the key knows its position, say with GPS, then we could do it. The key could securely sign its location (plus timestamp or nonce to avoid replay attacks) and then the car could explicitly verify the signature and that the key is within range. AFAICT this is totally secure and reasonable, if a bit expensive, to implement. In fact it seems like it would almost just work today for phone-based keys.

Putting GPS into a dedicated key fob is probably not even too expensive - car key fobs regularly cost hundreds of dollars to replace, even if their BOM is trivial, and a cheap GPS watch is approaching $100. The biggest barrier I see here is battery life on the key - neither phones nor watches like to be constantly tracking GPS because of the power draw.

I wonder what else could work. Quantum communication protocols can detect or resist relays. These are WAAY out of reach though - mostly theoretical, but IIRC the Chinese actually built a satellite to do relay-resistant quantum key distribution.

I'm not arguing that these options are things car companies are going to do any time soon. But it's fun to think about. And I don't think it's impossibly far off.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by callesgg on Tuesday May 17, 2022 @10:22AM (#31411114)
I bought a cheap gps clock for 70 usd 3 years ago. The price should be even lower today :)
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by eric_h on Tuesday May 17, 2022 @12:56PM (#31413433)
My car is parked underground in a building made of steel and concrete, effectively a faraday cage. GPS does not work at all in the garage…
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by dzhiurgis on Tuesday May 17, 2022 @07:51AM (#31409085)
> don't care too much about the potential of theft

stealing internet connected smart car is incredibly dumb

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by tsimionescu on Tuesday May 17, 2022 @07:27AM (#31408864)
> No amount of encryption prevents relay attacks.

Encryption + timestamp + message that expires after MAX_DISTANCE/c seems like it would be pretty foolproof. There are of course some challenges in having enough precision in the clocks, though.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by LeonM on Tuesday May 17, 2022 @07:43AM (#31409011)
So the encryption is not solving it then. But I may need to add to my original post:

- Relay attacks can theoretically be solved with high precision clocks, but will affect price and reliability in a negative way

This obviously depends a bit on the situation, but most relay attacks happen within reasonable proximity. Most attacks happen to a car parked in front of a house, since the attacker knows that the keyfob is likely to be within the house. The distance here is often less than 20m. To get reasonably reliable relay detection on these kinds of distances, you'll need very precise clocks, which will make the keyfobs expensive and still increases the risk of false positives on relay detection.

What's the point (to the customer) if the expensive ULTRA SECURE (tm) keyless entry system is 10x the price, and still less reliable than the keyless entry system om their 20 year old Toyota?

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by zormino on Tuesday May 17, 2022 @08:57AM (#31409832)
For lots of modern cars, the users phone is a key, and the car itself is connected, so you could also theoretically share and compare gps location during the unlock attempt.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by drcongo on Tuesday May 17, 2022 @09:52AM (#31410645)
I'm no expert, but I'm pretty sure GPS isn't going to have the accuracy needed to prevent a relay attack.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by Merad on Tuesday May 17, 2022 @10:37AM (#31411329)
I think the accuracy should be fine, cell phones typically have a GPS accuracy of 5-10 m. The problem is that you won't be able to rely on it. You probably won't have any GPS signal at all in an underground parking garage, and even in an above ground parking deck you will likely have poor or no signal due to being surrounded by steel and concrete.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by drcongo on Thursday May 19, 2022 @09:11AM (#31434172)
It takes a pretty sustained period of polling to get to 5-10m accuracy though right?
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by the8472 on Tuesday May 17, 2022 @07:39AM (#31408981)
Even without measuring the distance you could require periodic re-authentication after entry to keep the car driving. If the attacker did a one-time relay to open the car and start it and then drives away they'd lose contact and thus fail the next challenge-response authentication cycle.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by LeonM on Tuesday May 17, 2022 @07:48AM (#31409056)
None of the keyless start systems do this, on purpose. Because this may lead to very dangerous situations.

Imagine your engine shutting off on the highway, and your steering wheel locks, just because the car briefly looses response from the keyfob...

Also, just about every keyless entry systems have a physical backup key, to start and drive the car in case the battery in the keyfob is empty. A periodical re-authentication would make this impossible.

Stuck in the middle of the desert with a perfectly good car, but an empty keyfob battery? Well, sucks to be you, you'll likely die, but at least your car won't be vulnerable to relay attacks!

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by the8472 on Tuesday May 17, 2022 @07:52AM (#31409096)
That doesn't mean it's impossible to prevent relay attacks, it's just that people choose not to.

Additionally, the highway scenario could also be mitigated with a warning and a grace period. The desert scenario can be mitigated with having a fallback such as having the contactless system double as a smartcard you can put into a reader or by wireless power transfer. Plus, if your contactless system fails in the desert you're screwed anyway as soon as you turn off the engine once.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by IgorPartola on Tuesday May 17, 2022 @08:10AM (#31409295)
Please don’t. Imagine I am driving and suddenly the car in front of me fails to reauth and suddenly stops in the middle of an intersection. That would be unnecessarily unsafe.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by privacyking on Tuesday May 17, 2022 @09:39AM (#31410407)
It could just only deactivate the car if the car is stationary. Problem solved.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by LeonM on Tuesday May 17, 2022 @10:03AM (#31410814)
> It could just only deactivate the car if the car is stationary.

Right, stop once for a traffic jam, car loses sync with keyfob, and you'll become a stationary target on a highway.

Better swap out those batteries in your keyfob real quick before that 18-wheeler smashes into your car with kids in the backseat!

But hey, at least your car won't be stolen!

> Problem solved.

I guess this proves my point I was trying to make in my original post. Every xx months a sensation article like this comes out, and suddenly everyone, even on HN, becomes an expert that will 'just' solve the issue with a naive solution.

Car manufacturers, hire smart engineers. If the solution was simple, they would have fixed it already. Cars are always a trade-off between safety, security, reliability, affordability and practicality.

Great that your solution makes car theft resistant, but if also kills people, it's not such a great sell...

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by cjrp on Tuesday May 17, 2022 @08:10AM (#31409301)
What about making the key only broadcast the unlock signal when it's been moved within the last {X} mins? Sitting in a drawer, not broadcasting and not vulnerable to relay attack. Walking to the car, key activates, driver unlocks like normal.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by mbreese on Tuesday May 17, 2022 @08:16AM (#31409378)
You have to be able to support “dumb” key fobs/RFID cards as well as phones.

I doubt Tesla would want to include a motion sensor on the dumb card that fits in a wallet.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by HL33tibCe7 on Tuesday May 17, 2022 @07:53AM (#31409107)
I imagine that MAX_DISTANCE/c would be tiny compared to the amount of noise involved, to the point where this would be functionally impossible.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by mbreese on Tuesday May 17, 2022 @08:14AM (#31409352)
I wonder if it would be possible to have a crystal oscillator be that precise and still be robust enough to survive in a car. This method should work. But, if the system can’t survive the external vibration, temperature changes, and weather, it won’t help a car manufacturer.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by cycomanic on Tuesday May 17, 2022 @09:43AM (#31410478)
I thought most keyfobs have a button you need to press to unlock the car? Wouldn't that prevent almost all relay attacks, because the thief typically does not have physical access to the key?
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by taeric on Tuesday May 17, 2022 @10:33AM (#31411281)
You are thinking of older types of keys. Modern ones, you just have to be near the car with the key and it will unlock if you try a handle. It is ridiculously convenient.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by msh on Tuesday May 17, 2022 @08:56AM (#31409823)
Also how big is the risk of theft?

Its not like a normal IT security problem where attackers can be anywhere on earth.

I dont know the numbers for the US, but in my country it seems 0,9% of cars gets reported stolen a year, which includes stupid stuff like leaving the car idling outside your view. Thats a risk I can live with and don't want to have bothersome security to avoid.

Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by jliptzin on Tuesday May 17, 2022 @09:13AM (#31410034)
That seems pretty high to me. 1 in 100 cars get stolen every year? That’s about 50x the US rate.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by eric_h on Tuesday May 17, 2022 @12:36PM (#31413145)
I drive a 2013 mini that has a keyless entry system (and push button start as long as the key is in the car). I’m certain my car could be stolen with a relay attack, but confident that won’t happen because I park it 5 floors down in a building made of concrete and steel.
Re:Bluetooth relay attacks allow Tesla Model 3 / Y to be unl... by iso1210 on Tuesday May 17, 2022 @09:00AM (#31409876)
I bought a new skoda last October, it has a real key.