A clean-room automotive cybersecurity portfolio project for analyzing synthetic UDS diagnostic traces, identifying security-relevant behavior, tracking diagnostic state, and exporting evidence-based findings.
This repository was created from scratch with a new Git history. It contains no OEM logs, VINs, customer records, proprietary software packages, internal URLs, or production vehicle data.
- UDS service and negative-response decoding
- Diagnostic-session and SecurityAccess state tracking
- Negative-path and programming-sequence validation
- Security-relevant finding classification
- Reproducible Markdown, JSON, and CSV reporting
- Command-line and Tkinter desktop interfaces
- Standard-library Python with automated tests and CI
0x10DiagnosticSessionControl0x11ECUReset0x22ReadDataByIdentifier0x27SecurityAccess0x2EWriteDataByIdentifier0x31RoutineControl0x34RequestDownload0x36TransferData0x37RequestTransferExit0x3ETesterPresent0x7FNegativeResponse
The analyzer recognizes common NRCs including securityAccessDenied, invalidKey, exceededNumberOfAttempts, requiredTimeDelayNotExpired, requestOutOfRange, generalProgrammingFailure, wrongBlockSequenceCounter, and responsePending.
Each line uses comma-separated key/value fields:
2026-07-12T12:00:00Z,module=BMS_SIM,direction=TX,payload=10 03,note=Enter extended session
2026-07-12T12:00:00Z,module=BMS_SIM,direction=RX,payload=50 03,note=Extended session accepted
Required fields:
moduledirectionwithTXfor tester request orRXfor ECU responsepayloadas hexadecimal bytes
All included examples are fictional and synthetic.
Install the package in editable mode:
python -m pip install -e .Analyze the bundled synthetic trace:
python -m autosec_analyzer.cli sample_data/synthetic_diagnostic_log.txt --output reportsGenerated outputs:
reports/analysis.md
reports/analysis.json
reports/findings.csv
Launch the desktop interface:
python -m autosec_analyzer.guiRun tests:
python -m unittest discover -s tests -vautosec_analyzer/
parser.py Trace ingestion and validation
uds.py Deterministic UDS decoding
analyzer.py State tracking and security rules
reporting.py Markdown, JSON, and CSV export
cli.py Command-line interface
gui.py Tkinter desktop interface
sample_data/
synthetic_diagnostic_log.txt
tests/
test_analyzer.py
The project demonstrates how diagnostic evidence can be transformed into repeatable verification findings. It focuses on protocol behavior, security preconditions, state transitions, and traceable reporting rather than presenting a simple byte decoder.
This project is a portfolio and learning artifact. It does not:
- reproduce any OEM diagnostic platform
- contain production diagnostic traces
- certify ISO/SAE 21434 compliance
- perform vehicle penetration testing
- communicate with a physical vehicle
- implement production cryptography or secure boot
See SECURITY.md for the repository data-handling policy.
MIT