# Automated CAN Payload Reverse Engineering

> Research Python and R scripts that automate reverse engineering of Controller Area Network (CAN) payloads recorded from passenger vehicles, implementing the pipeline from Brent Stone's AFIT dissertation. The Python pipeline pre-processes a CAN log into per-arbitration-ID data frames, pulls out public SAE J1979 diagnostic data, runs a lexical analysis that guesses individual signal time-series boundaries, then a semantic analysis that builds a correlation matrix and hierarchically clusters related signals, with plots and a dendrogram as output. A separate R script set applies the rEDM empirical dynamic modeling package to engine-RPM, brake-pressure and vehicle-speed time series to study causal relationships.

- Type: Tool
- Targets: Protocol
- Category: Protocol analysis tools
- Relationship: Foundation tool
- Sources reviewed: 2026-10-20
- Added to the catalog: 2026-11-02
- Original resource: <https://github.com/brent-stone/CAN_Reverse_Engineering>
- Primary source: <https://github.com/brent-stone/CAN_Reverse_Engineering/blob/096dfe828a54964a10d2967fc65bf7c6537761a0/README.md>
- Catalog page: <https://awesomerea.org/resources/can-reverse-engineering/>
- Record JSON: <https://awesomerea.org/resources/can-reverse-engineering/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/can-reverse-engineering/index.md)

## Requirements & limits

- Dissertation research code with no releases or tags; the reviewed commit dates to 2022-02-01. The README says the scripts were developed and tested on Python 3.6 and need NumPy, Pandas, scikit-learn and (for plotting) matplotlib listed in requirements.txt; the R scripts need R with the rEDM package. There is no packaging or install step, and the README says the scripts will not run immediately after cloning.
- Two Python folders implement the same concept: Pipeline is the basic single-file version driven from Main.py, and Pipeline_multi-file is the more complete batch version that the README says contains bug fixes not back-ported to Pipeline. Input is a CAN capture in the bundled loggerProgram0.log delta-time/ID/DLC/hex format; an April 2020 addition also reads the can-utils log format via a -c/--can-utils argument, and other formats require editing PreProcessor.py.
- The user supplies their own CAN capture. The repository bundles the author's own example data: the loggerProgram0.log vehicle capture, example pipeline output, an OBD2 PID table, and R-folder CSV time series of engine RPM, brake pressure and vehicle speed for different driving conditions, plus the author's dissertation PDF. The results are signal-boundary and clustering estimates that need analyst validation, not confirmed signal definitions.
- The repository includes a GPL-3.0 LICENSE file, while the README states the code is a work of the U.S. Government not subject to copyright protection in the United States, cleared for public release (case 88ABW-2019-0910). The scripts read passive logs and perform analysis only; no device interaction or frame transmission is described.

## Primary sources

1. <https://github.com/brent-stone/CAN_Reverse_Engineering/blob/096dfe828a54964a10d2967fc65bf7c6537761a0/README.md>
2. <https://github.com/brent-stone/CAN_Reverse_Engineering/blob/096dfe828a54964a10d2967fc65bf7c6537761a0/requirements.txt>
3. <https://github.com/brent-stone/CAN_Reverse_Engineering/tree/096dfe828a54964a10d2967fc65bf7c6537761a0/Pipeline>
4. <https://github.com/brent-stone/CAN_Reverse_Engineering/tree/096dfe828a54964a10d2967fc65bf7c6537761a0/Pipeline_multi-file>
5. <https://github.com/brent-stone/CAN_Reverse_Engineering/tree/096dfe828a54964a10d2967fc65bf7c6537761a0/R>
6. <https://github.com/brent-stone/CAN_Reverse_Engineering/blob/096dfe828a54964a10d2967fc65bf7c6537761a0/LICENSE>

## More in Protocols

- [Deluder](https://awesomerea.org/resources/deluder/index.md) · Tool
- [PiCCANTE](https://awesomerea.org/resources/piccante/index.md) · Tool
- [VanBus](https://awesomerea.org/resources/vanbus/index.md) · Tool
- [Apple Continuity Reverse Engineering Toolkit](https://awesomerea.org/resources/apple-continuity-tools/index.md) · Tool
- [Cabana (standalone openpilot-cabana)](https://awesomerea.org/resources/openpilot-cabana/index.md) · Tool
- [eCapture](https://awesomerea.org/resources/ecapture/index.md) · Tool

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
