← All analyses

CAN bus

Theft through the headlight: anatomy of a CAN injection

In 2023, Ian Tabor and Ken Tindell trace the theft of their RAV4 back to a headlight wire. Behind it, an attack that needs neither key nor OBD port: forcing the CAN bus to believe a forged frame while silencing the genuine node. We break down the mechanism, the toolkit and the defences.

The theft that documented it all

Ian Tabor's RAV4 is first vandalized (bumper torn off, headlight connector unplugged), then stolen a few days later. Before the theft, the car logged fault codes reporting a loss of communication with the headlight controller and with the CAN network. With Ken Tindell, chief technology officer of Canis Automotive Labs, Tabor traces the thread back to the front headlight harness, and uncovers a method that has become a small industry.

The target: a chatty bus, zero authentication

A car does not have a single CAN bus but several, linked by a central gateway. The key receiver's messages travel on the control bus. The front headlight is wired to that same bus: reaching its connector means reaching the bus that carries the authorization to start. The root problem: on a CAN, no message is signed, and the gateway copies certain frames from one bus to another without verifying them.

The headlight shares the control bus with the key receiver; the gateway relays to the engine.
CONTROL BUS key receiver front headlight doors gateway POWERTRAIN BUS engine + immobilizer injector tapped onto the harness relays without checking ->

What the network assumes

  • Only factory controllers talk on the bus.
  • A well-formed frame necessarily comes from a legitimate node.
  • The gateway relays what is useful between domains.

What the attacker exploits

  • Any node placed on the wire can transmit.
  • Nothing distinguishes a forged frame from a real one.
  • So the gateway relays the forged frame too.

CAN injection, the real tour de force

The subtle point: the genuine key controller keeps emitting its legitimate message ("no key present"). So it is not enough to add a frame, you have to impose yours and silence the genuine one.

CAN arbitrates bit by bit: a dominant bit (0) overrides a recessive bit (1), and the lowest identifier wins. But winning arbitration is not enough: a receiver that detects an inconsistency can destroy the frame by raising an error flag. So the injector must neutralize that mechanism too.

The trick is hardware. The box first emits a wake frame in a loop, until it sees a frame from an already-awake controller go by. It then enables a modified transceiver that holds the bus in the recessive state, which "blocks the other CAN nodes from transmitting". The legitimate controllers that try fail, enter error recovery and back off. Above all, this override also blocks the error signalling that would let a receiver destroy the forged frame.

The injector holds the bus recessive, forces the genuine node to back off, then imposes its frame.
time -> Key receiver "no key" fails backs off, silent (error recovery) Injector holds the bus recessive (blocks the others) sends "key valid" What the network reads "key valid" x20 / s

The 20 Hz burst and the gateway

Why repeat the frame about twenty times a second? Because the gateway is fragile: when it can no longer communicate (during the override), its CAN controller resets, and it misses frames. By hammering the burst at around 20 Hz, the injector makes sure at least one gets through when the gateway starts listening again. It then relays the "key valid" message to the engine network, and the immobilizer deactivates.

Teaching illustration: the forged burst (in red) amid normal traffic. Identifiers are fictional.
0x120  engine        820 rpm                  normal frame
0x043  key receiver  'no key present'         normal frame
0x043  INJECTED      'key valid'    x20 / s     forged burst
gateway  relays 0x043 to the engine network, unchecked
immobilizer deactivated, engine allowed to start

The exploitation chain, step by step

  1. Force the bumper or the headlight to expose the harness wires.
  2. Tap onto the two bus wires, CAN-H and CAN-L.
  3. Emit a wake frame in a loop until the network responds.
  4. Enable the override: hold the bus recessive to silence the legitimate nodes and block error detection.
  5. Emit the burst (about twenty times a second) impersonating the key receiver: the 'key valid' message.
  6. The immobilizer, believing the key present, deactivates.
  7. The gateway relays the frame to the engine network, without verifying it.
  8. A second message, triggered by the box's button, commands the doors to unlock.
  9. The thief gets in and drives off: the car is gone in about a minute, without the key.

How to observe and replay it on a bench

You do not need a real car to understand the method. On a virtual bus or a two-controller bench, the approach is always the same: trigger an action, observe the frame that changes, then replay it. That is exactly what this site's Workshop offers. The commands below work on a test interface (vcan0), never on a vehicle.

Observe, isolate, replay (on a test bench).
# listen to all traffic on the test bus
candump vcan0

# spot the frame that moves when you act (diff before / after)
cansniffer vcan0

# replay a spotted frame (identifier#data, example values)
cansend vcan0 043#01

The toolkit, on both sides

The thief's box costs about ten dollars; the analysis is done with public tools.
ItemSideWhat it is for
PIC18F microcontroller with CANThiefGenerates and paces the forged frames; firmware locked against readout.
Modified transceiver + override circuitThiefHolds the bus recessive: silences the other nodes and blocks error signalling.
Fake Bluetooth speakerThiefCase, battery and button: camouflages the injector, powers it and triggers it.
CAN interface (CANable, CANtact...)AnalystConnect a PC to the bus to read and emit.
can-utils (candump, cansniffer, cansend)AnalystCapture, filter and replay frames.
SavvyCANAnalystVisualize and compare captures, find the useful signal.

What went wrong

  • CAN authenticates no message: a node able to place bits is taken at its word.
  • The gateway copies frames between domains without verifying their origin.
  • The immobilizer bases a security decision on a mere assertion from the bus.
  • A non-critical peripheral (the headlight) gives access to a critical bus.
  • Error detection itself can be neutralized by the override: a naive safeguard is not enough.

The defence, and where to test it here

A quick but fragile defence: the gateway relays a key frame only if its own recent transmissions succeeded and no dominant-to-recessive error occurred just before. Tindell sums it up with Fleming's maxim: once is happenstance, twice is coincidence, three times is enemy action. An attacker who adapts the box can get around it.

The real answer is message authentication. SecOC (AUTOSAR) adds to each frame an authentication code (MAC) and a freshness counter: a forged or replayed frame is rejected. Canis pushes the same idea with CryptoCAN (a pair of encrypted frames carries one plaintext frame). A security module emulated in software (SHE) fits in about 3 KB of code, 200 bytes of RAM and 40 microseconds per message: within reach of a small controller.

With SecOC, the MAC and the freshness counter reject the forged frame.
AUTHENTICATED FRAME (SecOC) 0x043 identifier data "key valid" MAC authentication code counter freshness (anti-replay) FRAME FORGED BY THE INJECTOR 0x043 data invalid MAC (no key) -> frame rejected

Segmentation helps as a complement, by keeping a front-network node from talking directly to the engine controller. Careful: detection alone is not enough here. Devices like NXP Stinger or Canis CAN-HG destroy a forged frame with a CAN error, but the override is precisely what prevents any node from signalling that error.

These two defences, SecOC and segmentation, are switches you can turn on in the Explorer to watch the attack path get blocked. And the trigger, observe, replay method can be handled in the Workshop, on a virtual bus.

Going further

To understand in depth the network this attack subverts, and the defences that neutralise it:

Frequently asked questions

What is the CAN injection attack?
It is a theft technique that consists of tapping into a car's CAN bus, often through the wiring of a headlight, to inject a forged frame that commands the doors to unlock and the car to start. Because the network does not authenticate its messages, the ECU obeys as if the command came from a legitimate component.
Which cars are affected by CAN injection theft?
The case documented by Ken Tindell concerned models where a poorly protected CAN bus linked an exposed component, the headlight, to the unlock and start functions. The problem is not a specific brand but an architecture: a bus without authentication reachable from an outside point.
Why go through the headlight?
The headlight is reachable from outside with minimal disassembly, and on some architectures its connector leads straight onto a CAN bus tied to critical functions. It is the most discreet entry point into the internal network.
How do you protect against CAN injection?
The real defence is message authentication: SecOC adds a code and a freshness counter to each frame, so any forged or replayed frame is rejected. Segmentation by a gateway limits what an exposed point can reach. Error detection alone is not enough, because the attack precisely prevents the error from being signalled.
Is CAN injection still possible today?
On an older vehicle with an unauthenticated bus, yes. Manufacturers are gradually rolling out SecOC and better segmentation, and the UNECE R155 regulation now requires this risk to be addressed. But the existing fleet stays exposed until it is updated.

Sources