Lion Cipher Lab

Speak an ECU's language: UDS diagnostics over CAN (ISO-TP), the diagnostic session, and brute-forcing Security Access — automotive, Part 3

Why it matters

Raw CAN injection (Parts 1 and 2) moves gauges, but the interesting, high-value functions of a car — reading VINs and fault codes, flashing firmware, unlocking a coding session, resetting an ECU — live one layer up, in the DIAGNOSTIC protocol every modern vehicle speaks: UDS over ISO-TP. That is the layer a mechanic's scan tool uses, and it is the layer an attacker abuses to reach privileged operations. The gatekeeper for those operations is UDS SecurityAccess, a challenge-response 'seed-key' unlock — and it is famous for being weak: real ECUs have shipped with 16-bit or even constant seeds…

What you'll learn

Steps in this lab

  1. Read this first — the one rule, same as Parts 1 and 2
  2. Recap and the big picture: from raw frames up to a diagnostic conversation
  3. Why ISO-TP exists — and load the can-isotp kernel module
  4. Bring up the virtual bus (vcan0)
  5. Install the diagnostic tooling: python-can and CaringCaribou
  6. Start the simulated ECU (your safe target)
  7. Discover which arbitration IDs answer diagnostics
  8. Enter an extended diagnostic session (SID 0x10) — and read a positive vs negative response
  9. Read data by identifier (SID 0x22) and reset the ECU (SID 0x11)
  10. Reach SecurityAccess (SID 0x27): request the seed and see the seed-key challenge
  11. Demonstrate the brute force — and understand exactly when it's feasible
  12. Do it better: entropy, lockout, and the truth about UDS 'security'
  13. What you did, and why it matters

Open the full interactive lab →