CarHacking 101 Rev2
CarHacking 101 Rev2
@ZuluAlphaFoxTwo
WHAT IS CAR HACKING?
ITS KINDA LIKE OTHER HACKING, BUT WITH CARS….
SO WHERE TO START
THERE ARE MULTIPLE PROTOCOLS GOING ON IN THE CAR AT ANY GIVEN TIME
A GOOD PLACE TO START IS THE CANBUS
THE CAN BUS
SO WHAT IS CAN?
Notes:
Arb Id’s run from 000-7FF
Data is sent in hex code so a single data bit length is 00 while two bit length is 00 00
with a maximim of 8 bits for standard frames you will have 16 digits. 00 00 00 00 00 00 00 00 00 00 00
TYPES OF CAN FRAMES
Notes:
• Extended Packets All of these protocols run on the can bus,
We wont be digging into any of these till later sessions,
• The ISO-TP Protocol But just note, that the canbus is just a carrier for multiple protocols.
• The CANopen Protocol There are also much more than this list.
• SocketCan (CanUtils)
• Set of open source CAN drivers and a networking stack contributed by Volkswagen
Research to the Linux kernel. Formerly known as Low Level CAN Framework (LLCF).
• ICSim
• Instrument Cluster Simulator: A virtual cluster simulator by OpenGarages Craig, form
about 4 years ago or so.
LETS GET INTO IT
• candump
• Dumps can bus to a file
• cangen
• Generate can frames based on inputs
• canplayer
• Replays candump files
CANDUMP
• Once you have a change on the icsim virtual cluster, stop the dump, and stop
the can gen
• Run cangen –I i –d 0000 –L 2 –g 5 vcan0
• This will ‘clear the board’ and potentially reset the changes. Alternate is you can stop icsim
and restart it with the same seed number
• Gedit (if you have a mouse) the can dump file and we use the rule of 50% to
start the RE
RULE OF 50%
• Rule of 50% is take any problem and find a logical middle point, then cut in
in half from there.
• Is the issue external or internal? Cut there and test. Is the issue system or user level? Cut
there and test. So on and so forth.
• General engineering technique to problem solve.
• So in this instance we will look at line count and cut (yes cut) about half off.
• Pick about half, ctrl+X then Ctrl+S
CAN PLAYER TO THE RECUE!
• This is the process you will now follow until you whittle down the arb id to the
single known value.
ARB ID OBTAINED!
• So the controller it brings up gives you the ability to play parts of the car
• Capture RE and replay, all the same idea just much more convoluted.
SO THAT’S WHERE I’LL LEAVE YOU
• Macchina.cc
• Great forums with plenty of help
• Carhackingvillage.com
• Has the car hackers handbook available and good resources (also on the OVF to
accompany slides)
• https://github.com/zombieCraig/ICSim
• Icsim github page