Contents

Secure diagnostics and authenticated access

Why diagnostic access is one of the most powerful attack paths into a vehicle, and how modern authentication (UDS service 0x29, certificates, roles) replaces weak seed/key.

Why it matters

Diagnostics can reprogram ECUs, change configuration and actuate outputs. Historically protected by simple “seed/key” algorithms that were often reverse-engineered, diagnostic access became a favourite attack path.

What modern secure diagnostics looks like

  • Authentication with certificates or backend-issued tokens (UDS 0x29), tied to a person or tool.
  • Roles: workshops, OEM engineers and production have different rights.
  • Gateway enforcement: requests reach internal ECUs only after authentication.
  • Logging of privileged sessions.
Authentication before protected diagnostic access
Tester authenticatesUses a configured UDS 0x29 method
Verify authenticationECU checks credentials and required proof
Establish identityRecord authenticated state and associated rights
Request serviceTester requests a protected diagnostic operation
Check authorizationCheck rights and other service prerequisites
Allow serviceECU permits the requested operation

Example flow: authentication details depend on the configured method, and failed authentication or authorization prevents protected service access.

UDS 0x29 certificate authentication
TesterHolds certificate and private key
ECUVerifies identity and assigns rights
Send certificateRequest unidirectional certificate verification
Verify certificateCheck trust, validity and configured requirements
Send challengeFresh challenge for proof of ownership
Sign challengeUse private key corresponding to certificate
Prove ownershipSend signature using proofOfOwnership
Grant roleVerify signature, authenticate and apply configured rights

Example successful unidirectional certificate exchange: role mapping depends on configuration, and each protected service still requires authorization.

Best practices

  • Retire seed/key for sensitive services; keep it only where compatibility demands, with unique secrets.
  • Issue short-lived credentials from a backend.
  • Balance security with legitimate independent-repair access requirements.

Common pitfalls

  • One global secret for all vehicles of a model.

What it means for your discipline

  • Cybersecurity Core

    Defines access roles, authentication methods and which diagnostic services need which privileges.

  • Diagnostics & lifecycle Core

    Implements authenticated sessions in ECUs and tools, and the backend that issues credentials to workshops.

  • Base software Core

    Dcm configuration ties services to security levels and authentication states.

  • Networks & communication Partial

    Gateways must block diagnostic traffic until authentication succeeds.

  • Software update & OTA Partial

    Integrates authenticated diagnostic access into flashing workflows, including credentials and privileges for programming services. Handles authentication expiry and gateway access restrictions during update and recovery sessions.

No direct stake: E/E architecture · Functional safety · HPC & application software · Hardware & silicon

Where it sits in the software stack

Generic layered software of a central HPC (application processor with hypervisor, plus a safety island) and of a classic MCU-based ECU (AUTOSAR Classic). Highlighted modules matter for this topic. Click any module to open its page.

HPC · application processor (MPU) and safety island (MCU)
  • Diagnostics — Checks authenticated identity and privileges before allowing protected diagnostic operations, and logs privileged sessions.
  • Security services — Validates credentials and provides identity, role and cryptographic services for diagnostic access control.
MCU-based ECU · AUTOSAR Classic
  • Diagnostics — Dcm implements UDS authentication and gates diagnostic services by authentication state, permissions and session prerequisites.
  • Memory · crypto · WdgM — Provides cryptographic operations and protected credential storage for diagnostic authentication.
  • Flash bootloader · secure boot — Requires authenticated programming access and enforces permissions during flashing and recovery sessions.