CANToolz - Black-box CAN network analysis framework
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
CANToolz is a framework for analysing CAN networks and devices. It provides multiple modules that can be chained using CANToolz's
pipesystem and used by security researchers, automotive/OEM security testers in black-box analysis.
CANToolz can be used for ECU discovery, MitM testing, fuzzing, brute-forcing, scanning or R&D, testing and validation. More can easily be implemented with a new module.
Many tools are already available for CAN analysis, with Charlie Miller and Chris Valasek tools, UDS/CAN tools by Craig Smith and many more . Each of them is cool and useful but it can be tedious when trying to use several of them at once. One may need to have a working setup for each them, modify/hack some of their source code, implement new features to be specific to one's project, etc.
The CANToolz framework is an attempt to unify most (if not all) the tricks, tools and others things that one would need to do CAN analysis in one unique place. A single installation process and many modules already available. The more people we bring in, the more useful it will become! No stunt-hack to bring the people, just a practical and useful tool for anyone to use. Implementing new modules is fairly easy and can be merged with the framework is the community finds it useful.
The framework is really module-oriented, where one could use one, two, a couple of them as part of a testing process or to create more sophisticated simulation scenarios to work with CAN bus.
"I don't get why everyone releases new "car hacking tools" all the time. @nudehaberdasher and I released ours in 2013 and they work fine." - (c) Charlie Miller (@0xcharlie)
"Looking for our car hacking tools / data / scripts? http://illmatics.com/content.zip" - (c) Chris Valasek @nudehaberdasher
More details and use-case examples available on:
CANToolz supports the following hardware to communicate with CAN bus:
More hardware could be supported. Feel free to open a request.
Using manual installation (installing missing dependencies as well):
bash $ python setup.py install
The installation process will create a
cantoolzalias command in your bin/ folder. To start
cantoolz, simply run:
bash $ cantoolz -g w -c examples/can_sniff.py
Then go to CANToolz's web interface at http://localhost:4444
Help is available with:
bash $ cantoolz -h
Last stable release for Python 2.7: https://github.com/eik00d/CANToolz/tree/Python2.7last_release
VIRCar is a Virtual Car simulated using CANToolz's features and modules:
cantoolz -g w -p 5555 -c examples/car_config.py
Now, to start hacking your new virtual car, you can load the existing configuration example:
cantoolz -g w -c examples/car_hacker.pyto load and start the hacking session
car_hackerconfiguration, using TCP2CAN for I/O hardware and connected to VIRCar's OBD2 and CABIN buses, and ready to start playing around
|hwCANBusTriple||IO module for CANBus Triple HW|
|hwUSBtin||IO module for USBtin|
|hwCANSocket||IO module for CANSocket (Linux only)|
|hwTCP2CAN||client/server IO component for tunnelinc raw CAN traffic over TCP|
|hwCAN232||IO module for LAWICEL (USB to Serial) CAN devices (e.g. SeeedStudio CAN bus shield)|
|firewall||module for blocking CAN message by ID|
|fuzz||Simple 'Proxy' fuzzer (1 byte) Can be combined with ping/replay|
|modprintMessage||printing CAN messages|
|analyze||CAN messages statistic (with .csv file output) / Analysis option (c analyze a) will try to find UDS/ISO TP messages|
|ping||generating CAN messages with chosen IDs (ECU/Service discovery)|
|replay||save and replay packets|
We are working on supporting other types of I/O hardware and modules. Please join us! With your help, we can create modules that can be useful for all of us!
And many other possible scenarios. Some of them can be found in the example folder of this repository.
Just use modules as "needed":
As one can expect from hacker tools, CANToolz is very early-uber-alpha. It needs to be tested more; the code can be ugly some times; bugs remain to be found. We are working on that, step by step ;)
Therefore, use it as-is!