CAN fuzzing is a way to test the security of a vehicle's Controller Area Network (CAN) by sending random or incorrect data to see how the system reacts. This process helps identify weaknesses in the network that attackers could exploit.
Linux CAN-utils is a valuable set of tools for working with the CAN bus. It allows you to send random messages to different car components (called ECUs) and check if they behave unexpectedly or crash. For example, tools like cansend
(used for sending messages) and candump
(used for monitoring traffic) make this process simpler.
- Install Can-Utils
- Setup Virtual CAN
- Generate Random CAN Traffic
- Save CAN Data to Logfile
- Format to User-Friendly Version (Logfile)
- Replay Logfile Data to CAN
- Sniff CAN Traffic for Results
> sudo apt-get install can-utils -y
> sudo modprobe can
> sudo modprobe vcan
> sudo ip link add dev vcan0 type vcan
> sudo ip link set up vcan0
> cangen vcan0 -v
> candump -l vcan0
> log2asc -I candump.log vcan0
> canplayer -I candump.log
> canplayer vcan0=can1 -v -I candump.log
> cansniffer vcan0
-
SocketCAN Tools for Linux (https://github.com/linux-can/can-utils)
-
Car Hacker's Handbook by Craig Smith (http://opengarages.org/handbook/)
-
Instrument Cluster Simulator (https://github.com/zombieCraig/ICSim)
-
CaringCaribou: Friendly Car Security Exploration Tool (https://github.com/CaringCaribou/caringcaribou)
-
Controller Area Network Support for Python (https://python-can.readthedocs.io/en/master/)
-
WireShark: Open Source Network Traffic Analyzer (https://gitlab.com/wireshark/wireshark)