Anda di halaman 1dari 30

Car Hacker's Handbook

Reversing the CAN Bus

Craig Smith

@OpenGarages
Vehicle Communications
Vehicle Protocols and Buses
LIN
Header Response
SYNC ID Data (0-8 Bytes) CRC
CAN Hardware
Arduino / Raspberry PI
CANtact
USB2CAN
Carberry
Komodo (Python)
ValueCAN/NeoFire (Vehicle Spy Bad Linux
Support)
Ethernet
SocketCAN
Linux CAN Interfaces
Vcan Virtual CAN
CAN Raw CAN
SLCan Serial Link CAN
CAN Bus and Speeds

LS 125K
MS 250K
HS 500K
CAN-Util Commands
Candump
Cansniffer
Cansend
...
CAN Packets

Interface ID DLC
can0 666 [8] 01 02 03 04 05 06 07 08

Data
CAN Bus Demos
$ candump slcan0
slcan0 388 [2] 01 10
slcan0 110 [8] 00 00 00 00 00 00 00 00
slcan0 120 [8] F2 89 63 20 03 20 03 20
slcan0 320 [8] 20 04 00 00 00 00 00 00
slcan0 128 [3] A1 00 02
slcan0 7DF [3] 02 09 02
slcan0 7E8 [8] 10 14 49 02 01 31 47 31
slcan0 110 [8] 00 00 00 00 00 00 00 00
slcan0 120 [8] F2 89 63 20 03 20 03 20
slcan0 410 [8] 20 00 00 00 00 00 00 00
slcan0 128 [3] A2 00 01
slcan0 380 [8] 02 02 00 00 E0 00 7E 0E
slcan0 388 [2] 01 10
slcan0 128 [3] A3 00 00
slcan0 110 [8] 00 00 00 00 00 00 00 00
slcan0 120 [8] F2 89 63 20 03 20 03 20
slcan0 520 [8] 00 00 04 00 00 00 00 00
slcan0 128 [3] A0 00 03
Unique per
Vehicle
Kayak
Savvy CAN
Reversing Methodologies
IC
Simulator

Github.com/zombieCraig/ICSim
Challenge 1
Send a CAN packet to unlock exactly 3 doors
simultaneously
Challenge 2
Blink the turn signals simultaneously, simulating
hazard lights
Challenge 3
Keep the speedometer at 120/mph
Bonus
Challenge

Super Tux Kart!


Diagnostic
Communications
ISO-TP / UDS
ISO-TP

can0 7DF [4] 03 22 F1 A1


can0 7E8 [8] 10 0E 62 F1 A1 41 41 41
can0 7DF [3] 30 00 00
can0 7E8 [8] 21 41 41 41 41 41 41 41
can0 7E8 [8] 22 41 AA AA AA AA AA AA
7DF = Our Packets
7E8 = Response from ECU
UDS
can0 7DF [4] 03 22 F1 A1
can0 7E8 [8] 10 0E 62 F1 A1 41 41 41
can0 7DF [3] 30 00 00
can0 7E8 [8] 21 41 41 41 41 41 41 41
can0 7E8 [8] 22 41 AA AA AA AA AA AA
0x22 = ReadById
0xF1 0xA1 = ID to read from Memory
0x62 = Positive Response
Scan Tools and PIDs

Mode 1 or 2
0x00 PIDs supported (0x01..0x20)
0x01 MIL Lamp
0x05 Engine coolant
0x0C RPM
0x0D Vehicle Speed
Mode 9
0x00 PIDs supported (0x01..0x20)
0x02 VIN
0x04 Calibration ID
0x06 Calibration Verification
Numbers (CVN)
DTCs, MIL, Data Recordings
Demo

Pull VIN via command line


UDS Sim
Q&A
craig@theialabs.com
OpenGarages.org
@OpenGarages

Anda mungkin juga menyukai