Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CAN bus plugins

CAN (Controller Area Network) is a robust serial bus protocol developed by Bosch in 1986. It is the dominant communication standard in automotive electronics and is widely deployed in industrial automation, medical devices, aerospace systems and building controls.

The protocol was designed for reliability in electrically noisy environments. It has no built-in authentication, encryption, or access control. Any node connected to the bus can read all traffic and inject arbitrary frames without restriction.

Frame formats

CAN supports two frame formats distinguished by the identifier length:

FormatID bitsRangeCommon use
SFF (Standard Frame Format)11 bits0x000-0x7FFCANopen, OBD-II
EFF (Extended Frame Format)29 bits0x00000000-0x1FFFFFFFJ1939, proprietary

Common higher-layer protocols

ProtocolID rangeDomain
CANopen0x001-0x77F (SFF)Industrial automation, medical
OBD-II (ISO 15765-4)0x7DF, 0x7E0-0x7EF (SFF)Automotive diagnostics
J1939EFF, PGN-encodedHeavy vehicles (trucks, buses)
CANaerospaceSFFAvionics

Setup

All CAN plugins require a Linux SocketCAN interface. Bring one up before running any plugin. Make can-utils available on your system.

USB CAN adapters using the gs_usb kernel module (CANable, CANtact, PEAK PCAN-USB in GS-USB mode):

sudo ip link set can0 up type can bitrate 500000

SLCAN-based adapters (older USB-to-CAN bridges):

sudo slcand -o -c -s6 /dev/ttyACM0 can0
sudo ip link set can0 up

Virtual CAN (for local testing or replay):

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

To verify the interface is up:

ip link show type can
18: can0: <NOARP,UP,LOWER_UP> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
    link/can

Plugins

PluginCommandMode
dumpiottack can dumpPassive capture and traffic analysis
scaniottack can scanPassive ID enumeration
sendiottack can sendActive: transmit arbitrary frames
enumerateiottack can enumerateActive device discovery (OBD-II & CANopen)

Severity model

SeverityCondition
HighOBD-II diagnostic IDs observed or responding (0x7DF, 0x7E0-0x7EF)
HighCANopen node found and device type identified via SDO
MediumCANopen node found (heartbeat or node guarding)
MediumCANopen SDO, PDO, or NMT management IDs observed
LowCAN error frames detected
InfoGeneral traffic statistics, no active traffic, or interface error