CAN Injection: Keyless car theft(kentindell.github.io)
kentindell.github.io
CAN Injection: Keyless car theft
https://kentindell.github.io/2023/04/03/can-injection/
300 comments
Throwaway account. I have actually worked on this sort of stuff. These topics are well known in the industry and have been for a surprising amount of time (decades).
Some premium brands will have the immobilizer await proper crypto from the key reader. In this case the key reader is just there to read the key and pass on the message, there is no decision being made outside of the immobilizer.
Some premium brands will also have immobilizers in other places, like the gearbox. It too will await proper crypto to shift into gear.
Some premium brands will have signed CAN/FlexRay/Ethernet frames that will prevent message spoofing, though that isn't only for this situation.
Most of the time the Gateway module has a static firewall - basically fixed routing tables so only modules that need to will be allowed to talk to each other.
Finally some premium brands will have an HSM both in the key and in the immobilizers to keep the material safe.
There is a lot more to this topic obviously but the reason some brands don't have this (and other countermeasures) is simple: cost.
Some premium brands will have the immobilizer await proper crypto from the key reader. In this case the key reader is just there to read the key and pass on the message, there is no decision being made outside of the immobilizer.
Some premium brands will also have immobilizers in other places, like the gearbox. It too will await proper crypto to shift into gear.
Some premium brands will have signed CAN/FlexRay/Ethernet frames that will prevent message spoofing, though that isn't only for this situation.
Most of the time the Gateway module has a static firewall - basically fixed routing tables so only modules that need to will be allowed to talk to each other.
Finally some premium brands will have an HSM both in the key and in the immobilizers to keep the material safe.
There is a lot more to this topic obviously but the reason some brands don't have this (and other countermeasures) is simple: cost.
Reminds me of a former colleague of mine who got an alert from his phone (I believe he got a call from a BMW support center); there was an attempted break-in of his car. He had a BMW that had an air pressure sensor in the cabin, which was triggered because someone had broken the window.
No trace of course once he got to the car / once the police was around, just a broken window. But the would-be burglars made a mistake; they went into the frame of the car (between the driver and rear passenger doors) through the plastic to disconnect a bundle of cables, but didn't fit the plastic back properly.
This bundle of cables went to the antenna that was required for the phone home functionality; if he hadn't had that addressed, the thieves would have been back a day or a week later to get into the car, with the pressure sensor / phone home alarm not being able to contact BMW HQ.
Organized crime has enough money, time, opportunity and incentive to buy cars and take them apart to find weaknesses.
No trace of course once he got to the car / once the police was around, just a broken window. But the would-be burglars made a mistake; they went into the frame of the car (between the driver and rear passenger doors) through the plastic to disconnect a bundle of cables, but didn't fit the plastic back properly.
This bundle of cables went to the antenna that was required for the phone home functionality; if he hadn't had that addressed, the thieves would have been back a day or a week later to get into the car, with the pressure sensor / phone home alarm not being able to contact BMW HQ.
Organized crime has enough money, time, opportunity and incentive to buy cars and take them apart to find weaknesses.
For what it's worth, most European cars have much more robust immobilizer systems that use actual cryptographic primitives to both obfuscate and authenticate start-release messages.
This is for a variety of reasons - a legal and insurance company focus on immobilizer technology through companies like Thatcham Research as well as a more active threat model geopolitically.
There are, of course, weaknesses in these cryptosystems, but the documented attack describes an extremely poor system by modern standards.
This is for a variety of reasons - a legal and insurance company focus on immobilizer technology through companies like Thatcham Research as well as a more active threat model geopolitically.
There are, of course, weaknesses in these cryptosystems, but the documented attack describes an extremely poor system by modern standards.
I often dream of going back to a car without any electronics at all.
Of course, I've had those and they have their own problems. Carburetors and point ignition systems have their issues.
So I instead live in a world where even my chainsaw has a CAN bus.
Of course, I've had those and they have their own problems. Carburetors and point ignition systems have their issues.
So I instead live in a world where even my chainsaw has a CAN bus.
>Modern cars are protected against thefts by using a smart key that talks to the car and exchanges cryptographic messages so that the key proves to the car that it’s genuine. [...] The thieves found a simple way around this: they used a hand-held radio relay station that beams the car’s message into the home to where the keys are kept, and then relays the message from the keys back to the car. The car accepts the relayed message as valid because it is - the real keys were used to unlock the car. Now that people know how a relay attack works generally possible to defeat it: car owners keep their keys in a metal box
? The car talking to the key first? Can't the key just not talk to the car at all unless the button is pressed on the key fob or shortly thereafter?
? The car talking to the key first? Can't the key just not talk to the car at all unless the button is pressed on the key fob or shortly thereafter?
This title should be "CAN injection" in all capitals. It's not a verb, it's the acronym for the Controller Area Network. (And is used in all caps by the article itself)
Typical corporate answer: We regret to inform you that the reported vulnerability is not in fact deemed as serious as you describe. A hacker/thief having physical access to your car, thus able to inject messages into the CAN bus, is not consider a serious security threat. Thank you for contacting our security department and perhaps you’d be interested in a monthly subscription for running a remote security diagnostic of you car!
The thing that has always bothered me about stuff like this is that there must be some incredbly skilled software and hardware engineers out there who can put this sort of thing together, and they basically decide to use their skills to steal peoples cars(or well, enable others to do that). On one hand I get it, on the other I really don't. I would love to read an interview with any of them and see what drives them.
As someone who's designed a product that's legitimately meant to unlock cars over the CAN bus, I'll be sad when encrypted/authenticated CAN communications become the norm! Users should be able to connect to the CAN bus in their own car and remotely lock/unlock the vehicle. There are ways of making a car more secure (there are already several different CAN buses in modern cars - having a security-specific CAN bus inaccessible without physical access to the inside of the vehicle should be a minimum!)
To start the vehicle, other manufacturers have the key communicate with the ECU directly, bypassing the accessory CAN bus.
Something I'd like to see is a unique private RSA key given to car owners on a USB stick upon purchase of the vehicle to allow them to replicate their own keys.
To start the vehicle, other manufacturers have the key communicate with the ECU directly, bypassing the accessory CAN bus.
Something I'd like to see is a unique private RSA key given to car owners on a USB stick upon purchase of the vehicle to allow them to replicate their own keys.
Great article. But:
> And part of the problem is that this isn’t a vulnerability disclosure and so the processes that Toyota does have in place are not appropriate.
I didn't follow this part. I hear that the authors think their "you can use CAN fault injection followed by a spoofed unlock command to steal cars" technical writeup is not a vulnerability disclosure. But why not? (Other than because they said so.)
The fact that the vulnerability is exploited in the wild doesn't prevent it from being appropriate to report it as a vulnerability -- quite the opposite. They even provide several fix suggestions.
(I'm not personally arguing that it is wrong to disclose the vulnerability without coordination. I'm arguing that it's weird to make a choice like that while claiming you aren't making one.)
> And part of the problem is that this isn’t a vulnerability disclosure and so the processes that Toyota does have in place are not appropriate.
I didn't follow this part. I hear that the authors think their "you can use CAN fault injection followed by a spoofed unlock command to steal cars" technical writeup is not a vulnerability disclosure. But why not? (Other than because they said so.)
The fact that the vulnerability is exploited in the wild doesn't prevent it from being appropriate to report it as a vulnerability -- quite the opposite. They even provide several fix suggestions.
(I'm not personally arguing that it is wrong to disclose the vulnerability without coordination. I'm arguing that it's weird to make a choice like that while claiming you aren't making one.)
I worry that industry solutions involving more proprietary layers and/or encryption on buses will make our vehicles and appliances even less modifiable, diagnosable, and serviceable by anyone except factory authorized techs.
In keeping thieves out, we're locking ourselves out.
Steering wheel locks and primitive offline immobilizers had their advantages...
In keeping thieves out, we're locking ourselves out.
Steering wheel locks and primitive offline immobilizers had their advantages...
If you live in one of these high-theft areas, you can still use security via obscurity. Put a rag between your intake and air filter, or remove a critical relay (fuel pump, starter) or unclip a critical sensor (crank, cam, etc.) if it's easily accessible. Or do all 3. Each takes about one minute.
FYI, you can temporarily disable keyless entry on Toyotas fairly easily:
Hold down the lock button Hit the unlock button twice
Hold down the lock button Hit the unlock button twice
One look at the basic CAN architecture diagram and you see the problem. There's no reason for a secure key exchange to be on the same network path as every other device. Wrapping it in magic crypto sauce is not a permanent fix, because someone will just find a novel way to defeat the cryptosystem, like they always have.
If a thief wants to steal the car, make it harder. There should be one physical path from the key system to the ECU that allows key operations, and it should be protected by a really annoying and time-consuming process so that theft is so annoying that most people won't ever try it. After that is done, they can start sprinkling it with magic crypto sauce. (It's also very hard to get magic crypto sauce right; unless you hire the few really talented crypto people, whoever you hire to write crypto will make mistakes, and a hacker has unlimited time to find one)
Obviously existing car models won't be changed, but future ones should be. Car theft isn't just an inconvenience for the owner; it makes committing other crimes easier and harder to trace, results in more property damage, increases the black market for chopped cars, increases insurance premiums, etc.
If a thief wants to steal the car, make it harder. There should be one physical path from the key system to the ECU that allows key operations, and it should be protected by a really annoying and time-consuming process so that theft is so annoying that most people won't ever try it. After that is done, they can start sprinkling it with magic crypto sauce. (It's also very hard to get magic crypto sauce right; unless you hire the few really talented crypto people, whoever you hire to write crypto will make mistakes, and a hacker has unlimited time to find one)
Obviously existing car models won't be changed, but future ones should be. Car theft isn't just an inconvenience for the owner; it makes committing other crimes easier and harder to trace, results in more property damage, increases the black market for chopped cars, increases insurance premiums, etc.
If you have a vehicle that you don't want stolen, perhaps a kill switch for the fuel relay is needed. Easy to install and hide. Will prevent the fuel pump from coming on. Something else to consider is a steering lock although it can be defeated, just more work for the would be thief.
Sometimes simple hardware can be a good solution is for a software problem.
Sometimes simple hardware can be a good solution is for a software problem.
In the old days, before cars were computer systems, thieves could still steal cars by hotwiring them - as I understand, the key ignition was basically a lock where if you turn the key then wire A connects to wire B (and if you turn it even further into "starter" position then wire C is somehow involved too) and a competent thief could easily strip out the lock assembly and just connect the wires with a jumper cable. Plus ca change.
In said old days, my late grandfather had a steering wheel lock, basically a giant padlock with a metal bar attached and the whole thing painted yellow. I assume that would work just as well in today's electronic days.
In said old days, my late grandfather had a steering wheel lock, basically a giant padlock with a metal bar attached and the whole thing painted yellow. I assume that would work just as well in today's electronic days.
[deleted]
It surprised me the hacking toolkit came in a JBL speaker - I guess they reverse engineered that as well, flashed it with custom firmware, and it had most of the hardware needed for this hack?
At that point if you have a recent car you need a steering wheel lock.
Comma.ai is another great example of CANBUS hacking. I'm a bit worried there are a bunch of zero days sitting out there on CAN implementations. It's such a complicated system.
How about instead of keyless entry we just keep using keys.
You wouldn’t have a password being loudly screamed out of a speaker 24/7, so why would you design a car key to work that way?
You wouldn’t have a password being loudly screamed out of a speaker 24/7, so why would you design a car key to work that way?
[deleted]
Great post. One thing to add is most car door locks can be opened without much difficulty and without damage and usually not turning on the alarm. Open and plug device straight into the can bus. No need for headlight damage...
Is this the sort of thing that works on any CAN bus car, or are older cars immune to it since their ignition might not be on this same system?
Is my 11 year old car a little more "steal" proof to these elegant methods?
Is my 11 year old car a little more "steal" proof to these elegant methods?
So the device is using the controller on the JBL speaker with a modified firmware? And the grafted on components are to interface with the CAN bus?
Many (most?) vehicles have more than one CAN bus and messages for other networks are NOT bridged across them.
Are there any modern cars that have good modern mechanical parts but have no computers in them whatsoever?
"Open sesame" attack
Crazy that this attack developed in the wild. I'm impressed.
Here's the problem everyone needs to pay attention to: If you demand Encrypted OR Signed CAN Bus, you will ABSOLUTELY get it from the manufacturers in the name of security. They will _gladly_ lock out the CAN bus so no third party accessories or diagnostic tools can work with your car.
So be careful what you scream for. We already have enough un-repairable items.