DEV Community

Cover image for CANBUSconfidenceid - A Helper for CAN Bus Reverse Engineering
v. Splicer
v. Splicer

Posted on

CANBUSconfidenceid - A Helper for CAN Bus Reverse Engineering

DEV Weekend Challenge: Community

This is a late submission / follow-up share inspired by the DEV Weekend Challenge: Community. The official window closed, but I wanted to put this out there anyway because it serves a niche community I care about deeply.

The Community

The hardware hacking and CAN bus reverse engineering community. This includes car hackers, automotive security researchers, embedded systems tinkerers, right-to-repair advocates, and folks building custom integrations for their vehicles (think: aftermarket ECUs, infotainment mods, telemetry projects, or just figuring out what those mystery CAN messages actually do).

These builders often spend countless hours with tools like Wireshark + SocketCAN, SavvyCAN, cantact, or c0f, capturing traces, decoding signals, fighting endianness issues, hunting for counters/multiplexers, and slowly building DBC files from scratch. It's rewarding but tedious and error-prone work.

What I Built

CANBUSconfidenceid is a small, focused Python tool that helps increase confidence when guessing/assigning signal meanings during CAN reverse engineering.

Repo: https://github.com/numbpill3d/CANBUSconfidenceid

Core idea: It analyzes a set of CAN traces (from your .log, .asc, or candump files) and computes simple statistical "confidence" scores for potential signal placements in a candidate DBC structure.

Features include:

  • Quick statistical checks (min/max/mean/stddev over time windows, correlation between candidate signals, change frequency detection)
  • Basic counter/multiplexer hunting (detect monotonic increasing fields that reset)
  • SNR-like estimates for analog-ish signals (how "clean" the value changes are vs noise)
  • Export suggestions to refine your partial DBC file
  • CLI-first for fast iteration during live captures or offline analysis

It is not a full auto-reverse tool (those exist but are often overkill or inaccurate). Instead, it acts as a second brain to validate your hypotheses faster so you waste less time on bad guesses.

Demo

(You can add a short GIF or screenshot here of running it on sample data, or link to a demo video if you record one.)

Example usage:

pip install -r requirements.txt  # mostly pandas, numpy, cantools
python confidenceid.py --dbc candidate.dbc --log capture.log --signal EngineRPM
Enter fullscreen mode Exit fullscreen mode

It outputs something like:

Signal: EngineRPM (bytes 2-3, little-endian, factor 0.25)
- Observed range: 800.0 - 3200.0 (plausible)
- Stddev over idle periods: 12.4 (low noise, good)
- Correlation with Speed: 0.87 (strong, expected)
- Counter-like behavior: None detected
- Confidence score: 0.92 (high)
Enter fullscreen mode Exit fullscreen mode

How I Built It

  • Python (what else for quick data crunching)
  • cantools for DBC parsing and message decoding
  • pandas + numpy for trace analysis and stats
  • argparse for a simple CLI
  • Kept it lightweight: no GUI, no heavy ML (yet?), just pragmatic stats that help during real sessions

Built over a weekend (with some polish after), mostly because I was tired of manually eyeballing the same patterns in CSV exports.

Why It Helps the Community

Reverse engineering vehicle CAN networks is still largely manual, and small confidence checks can save hours (or days) of blind trial-and-error. Sharing this as open source means anyone can extend it for their car/platform quirks (add Ford-specific quirks, EV battery signal heuristics, etc.).

If you're in the car hacking space, try it on your next trace and let me know what signals it helped confirm (or missed). Contributions/PRs welcome!

Happy reversing, stay safe on the bench, and don't brick your ECU.


Top comments (0)