Home Learning Paths ECU Lab Assessments Interview Preparation Arena Pricing Log In Sign Up

Miller & Valasek 2015: Jeep Cherokee Remote Exploit

Jeep Cherokee Attack Chain
  Internet (attacker)
       │ Sprint cellular network
       ▼
  Uconnect Head Unit (WinCE, port 6667 open on cellular interface)
       │ D-Bus service reflash via open network port
       ▼
  D-Bus service compromise → arbitrary code execution on head unit
       │ Internal vehicle Ethernet / CAN gateway
       ▼
  Chassis CAN bus injection:
  • 0x3B4 — Steering torque command
  • 0x2B0 — Brake pressure command
  Result: Remote arbitrary CAN injection from internet, no physical access
Attack StepTechnical DetailRoot Cause
Entry: Sprint cellularPort 6667 (IRC-like) open on cellular interfaceNo firewall between cellular modem and head unit OS
Code executionD-Bus service had no input validation; buffer overflow achievableNo ASLR/NX on WinCE platform; no code signing
CAN injectionHead unit had direct CAN bus access without gateway isolationNo CAN firewall; head unit treated as trusted node
FixOTA patch closed port 6667; added network isolation between head unit and CANTook 10 minutes to deploy OTA — demonstrated VSOC value

Tesla Model S OTA Chain Exploit (2016)

Tesla Multi-Stage Attack Chain
  Attacker WiFi AP (attacker controls)
       │ Driver connects vehicle to rogue WiFi
       ▼
  Web browser (heap overflow via crafted HTML5)
       │ Renderer exploit → sandbox escape via kernel 0-day
       ▼
  Application processor (code execution)
       │ Internal Ethernet (head unit → gateway)
       ▼
  Gateway ECU
       │ CAN injection to vehicle buses
       ▼
  Arbitrary vehicle control (braking, steering)
  → Patched via silent OTA within days of disclosure

💡 OTA as a Security Asset

Tesla's ability to deploy a silent OTA patch fleet-wide within days of vulnerability disclosure demonstrates that OTA update capability is not just a features tool — it is a critical cybersecurity response mechanism. UNECE R156 mandates that all new vehicles support OTA-equivalent update capability precisely because the Jeep and Tesla incidents proved that field-recalled hardware fixes are too slow for security response.

Key Fob Relay and RKE System Attacks

Attack TypeMechanismDefence
RKE Relay AttackTwo SDR relay boxes (433/868 MHz): one near owner amplifies signal, one near vehicle retransmits; latency ≤ 50 ms defeats rolling-code protectionUWB (Ultra-Wideband) Time-of-Flight distance bounding: key accepted only if measured distance ≤ 1 m
Megamos Crypto BreakVW/Audi transponder: 96-bit key, 3-phase challenge-response; recoverable in 30 min on standard PC (reverse-engineered algorithm)Replace with AES-128 or equivalent symmetric cipher; rotate immobiliser keys
Rolling Code CloningCapture two consecutive codes; predict next code using weak PRNGUse cryptographically secure PRNG (AES-CTR DRBG); reduce code window to 1
Pythonuwb_distance_bound.py
# UWB Time-of-Flight distance bounding (IEEE 802.15.4z)
# Attacker relay latency check: reject key if measured distance > threshold

SPEED_OF_LIGHT_M_NS = 0.3       # metres per nanosecond
MAX_ALLOWED_DISTANCE_M = 1.0    # 1 metre threshold for keyless entry

def check_uwb_ranging(tof_nanoseconds: float) -> bool:
    """
    tof_nanoseconds: measured round-trip time-of-flight
    Returns True if key is within allowed distance
    """
    # One-way distance = (round-trip ToF / 2) * speed of light
    distance_m = (tof_nanoseconds / 2.0) * SPEED_OF_LIGHT_M_NS
    allowed = distance_m <= MAX_ALLOWED_DISTANCE_M
    print(f"Measured distance: {distance_m:.2f} m — {'ALLOW' if allowed else 'REJECT (relay attack)'}")
    return allowed

# Legitimate key: 3.3 ns ToF = 0.5 m
check_uwb_ranging(3.3)    # → ALLOW

# Relay attack: 200 ns added latency = 30+ m apparent distance
check_uwb_ranging(200.0)  # → REJECT (relay attack)

BMW ConnectedDrive TLS Downgrade (2015)

Attack StepDetailFix Deployed
TLS downgradeAttacker injected TCP RST packets during TLS negotiation; BMW software fell back to HTTPDisable HTTP fallback; enforce TLS 1.2+ minimum
No certificate pinningServer certificate not pinned; attacker's MITM cert acceptedEmbed OEM root CA public key in firmware; reject certs not chaining to it
Crafted service requestOver HTTP, attacker sent crafted unlock-door request to BMW backendEnforce mTLS — backend requires client certificate from BMW app
ImpactRemote door unlock for any BMW ConnectedDrive vehicle without authenticationFull fleet OTA remediation; no recall required

⚠️ TLS Fallback Must Be Disabled

Any fallback from authenticated/encrypted to unauthenticated/plaintext transport is a critical vulnerability. Automotive telematics stacks must be configured to: (1) enforce TLS 1.2 or 1.3 minimum — reject negotiation to older versions; (2) disable HTTP fallback on TLS failure — fail closed, not open; (3) pin the OEM root CA — reject certificates from public CAs; (4) use mTLS for all service requests — backend validates the vehicle's client certificate before acting on any command.

Summary

All four case studies share a common pattern: an externally-reachable interface (cellular, WiFi, connected services) lacked proper authentication or isolation, allowing attackers to reach safety-critical vehicle functions. The consistent lessons are: segment networks so head units cannot directly inject CAN; disable all unauthenticated fallback paths; pin certificates; deploy OTA capability before you need it. UNECE R155 mandates addressing all of these attack categories in the TARA for every connected vehicle.

🔬 Deep Dive — Core Concepts Expanded

This section builds on the foundational concepts covered above with additional technical depth, edge cases, and configuration nuances that separate competent engineers from experts. When working on production ECU projects, the details covered here are the ones most commonly responsible for integration delays and late-phase defects.

Key principles to reinforce:

  • Configuration over coding: In AUTOSAR and automotive middleware environments, correctness is largely determined by ARXML configuration, not application code. A correctly implemented algorithm can produce wrong results due to a single misconfigured parameter.
  • Traceability as a first-class concern: Every configuration decision should be traceable to a requirement, safety goal, or architecture decision. Undocumented configuration choices are a common source of regression defects when ECUs are updated.
  • Cross-module dependencies: In tightly integrated automotive software stacks, changing one module's configuration often requires corresponding updates in dependent modules. Always perform a dependency impact analysis before submitting configuration changes.

🏭 How This Topic Appears in Production Projects

  • Project integration phase: The concepts covered in this lesson are most commonly encountered during ECU integration testing — when multiple software components from different teams are combined for the first time. Issues that were invisible in unit tests frequently surface at this stage.
  • Supplier/OEM interface: This is a topic that frequently appears in technical discussions between Tier-1 ECU suppliers and OEM system integrators. Engineers who can speak fluently about these details earn credibility and are often brought into critical design review meetings.
  • Automotive tool ecosystem: Vector CANoe/CANalyzer, dSPACE tools, and ETAS INCA are the standard tools used to validate and measure the correct behaviour of the systems described in this lesson. Familiarity with these tools alongside the conceptual knowledge dramatically accelerates debugging in real projects.

⚠️ Common Mistakes and How to Avoid Them

  1. Assuming default configuration is correct: Automotive software tools ship with default configurations that are designed to compile and link, not to meet project-specific requirements. Every configuration parameter needs to be consciously set. 'It compiled' is not the same as 'it is correctly configured'.
  2. Skipping documentation of configuration rationale: In a 3-year ECU project with team turnover, undocumented configuration choices become tribal knowledge that disappears when engineers leave. Document why a parameter is set to a specific value, not just what it is set to.
  3. Testing only the happy path: Automotive ECUs must behave correctly under fault conditions, voltage variations, and communication errors. Always test the error handling paths as rigorously as the nominal operation. Many production escapes originate in untested error branches.
  4. Version mismatches between teams: In a multi-team project, the BSW team, SWC team, and system integration team may use different versions of the same ARXML file. Version management of all ARXML files in a shared repository is mandatory, not optional.

📊 Industry Note

Engineers who master both the theoretical concepts and the practical toolchain skills covered in this course are among the most sought-after professionals in the automotive software industry. The combination of AUTOSAR standards knowledge, safety engineering understanding, and hands-on configuration experience commands premium salaries at OEMs and Tier-1 suppliers globally.

Next →ISO/SAE 21434 Framework Overview