r/CarHacking • u/hey-im-root • 14d ago
CAN Hijacking CAN frames on Honda
After digging into the firmware for my cars ECU, one of the things I found out is they have pretty simple validation for frames.
It has between 60ms and 3000ms for freshness (time a valid frame isn’t received) and up to 20 rejected frames in a row before causing a BUS ERROR/fault.
The only other validation is the checksum and counter. Checksum is simple enough to find (it’s online anyway), and the counter is even simpler. Frames are transmitted with a 4 bit incrementing counter, but only the first 2 bits are ever checked by any of the ECUs (supposedly, you’ll see what I mean later). Not only that, but it only checks for REPEATS, not counter increments. That means you can send 1,2,1,2 or 1,2,3,4 and those are all valid. 1,1,1,2 would only accept the first and last frame.
This allows us to do a little hijacking. When looking at a CAN log you can see the deviation the ECU has for the frame timing, it’s usually smaller than its sending rate unless you have really bad grounding. So a frame sent at 3hz (3 times a second) probably has a sub 10ms jitter. But that’s fine since there’s ~300ms between frames. The trick is to grab a frame and store its counter value, and that’s your initial counter from the REAL ECU. Now you can send your fake frame with the next counter the ECU is supposed to send. So if you got a counter value of 2, you want to send 3. You now have control over that frame! For 3hz, you’ll wanna send your frame around 50-100ms after the last real frame to stay in the middle.
Whatever values you put will be accepted by any ECU that uses it, and the next frame coming from the real ECU will be rejected, since you already sent a frame with the next valid counter. Realistically this should work on higher Hz frames, it just gets more difficult to time it.
For this example I’m using frame 0x465, which is the ECO ambient assist light frame on any Honda that has one. It’s sent by the PCM, and has an upper/lower threshold for RPM and throttle angle, which selects 3 modes. Mode 3 is green, 2 is light green, 1 is white. (Sport mode, speeds over 87mph, or MIL set mode 1). The PCM transmits this frame and the Gauge Control Module receives it. I tried to make a “shift light” that blinks after 3500rpm, but the gauge control has its fading LED built in so it can’t really “flash”. It’s just a demo anyway.
I was only able to guess that the gauge control module has the same frame validation, but since this worked with no problems, I can only assume it uses the same 20 count reject/1.5s freshness validation.
Let me know if you have questions, I’ve done a lot with this stuff so far!



