Skip to content

adriancamaj/autosec101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

CAN Fuzzing Simplified

Requirements: Linux OS, Bash Shell

What is CAN Fuzzing?

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.

Steps:

  1. Install Can-Utils
  2. Setup Virtual CAN
  3. Generate Random CAN Traffic
  4. Save CAN Data to Logfile
  5. Format to User-Friendly Version (Logfile)
  6. Replay Logfile Data to CAN
  7. Sniff CAN Traffic for Results

CAN-Utils

  > sudo apt-get install can-utils -y

Virtual CAN Network

  > sudo modprobe can
  > sudo modprobe vcan
  > sudo ip link add dev vcan0 type vcan
  > sudo ip link set up vcan0

Random CAN Traffic

  > cangen vcan0 -v

Record CAN Data

  > candump -l vcan0

Format Log for Readibility

  > log2asc -I candump.log vcan0

Replay Recorded CAN Data

  > canplayer -I candump.log
  
  > canplayer vcan0=can1 -v -I candump.log

Results

  > cansniffer vcan0

Additional Information


Releases

No releases published

Packages

No packages published