Kuboid
Open Luck·Kuboid.in

Compromising an Electronic Logging Device & Creating a Truck2Truck Worm

DEFCONConference444 views19:40over 1 year ago

This talk demonstrates a remote, wireless attack against Electronic Logging Devices (ELDs) used in commercial trucks, enabling unauthorized control over vehicle speed via CAN bus message injection. The researchers reverse-engineered the device firmware to identify hardcoded credentials, an insecure debug service, and a lack of firmware signing, which allowed for the deployment of malicious firmware. They further developed a proof-of-concept 'Truck2Truck' worm that leverages the ESP32's dual-mode capability to scan for and infect other vulnerable ELDs in proximity. The research highlights the critical security risks posed by mandatory, self-certified IoT devices in critical infrastructure.

How a Single Hardcoded Credential Can Hijack a Commercial Truck

TLDR: Researchers at DEF CON 2024 demonstrated how a lack of firmware signing and hardcoded credentials in Electronic Logging Devices (ELDs) allow for remote CAN bus message injection. By reverse-engineering the device, they gained the ability to manipulate vehicle speed and propagate a worm between trucks in proximity. This research highlights the catastrophic risk of treating mandatory, self-certified IoT hardware as a black box in critical infrastructure.

Commercial vehicles are essentially rolling networks, yet the security of the hardware bolted onto them is often an afterthought. The ELD mandate, while well-intentioned for tracking hours of service, has forced thousands of trucks to adopt devices that are frequently little more than rebranded, insecure IoT modules. When these devices are plugged into the vehicle's diagnostic port, they gain direct access to the J1939 network. If that device is compromised, the entire vehicle's control system is effectively exposed.

The Anatomy of the Compromise

The research presented at DEF CON focused on a specific class of ELD hardware based on the ESP32 microcontroller. These devices are ubiquitous, sold under dozens of different brand names, and share a common, flawed architecture. The researchers began by pulling the firmware using esptool, the standard utility for interacting with Espressif chips. Because the devices lacked firmware signing, there was no cryptographic barrier to prevent the researchers from dumping the binary and modifying it.

Once the binary was extracted, the team used Ghidra to reverse-engineer the logic. The discovery process was straightforward because the firmware contained a hardcoded Wi-Fi password and an exposed debug service on port 22. This is a classic case of OWASP A07:2021 – Identification and Authentication Failures. The device was essentially running an echo server that, when queried with the right command, would forward arbitrary data directly to the CAN bus.

The researchers identified a hidden function in the firmware that handled command parsing. By matching specific string patterns, they found the logic that triggered a send_can function. This function allowed them to inject arbitrary J1939 messages. In their proof-of-concept, they sent Torque Speed Control (TSC1) messages to the engine control module. This allowed them to override the driver's input and force the truck to slow down or speed up, demonstrating a clear path from a wireless exploit to physical vehicle control.

From Single Target to Truck-to-Truck Worm

What makes this research particularly dangerous is the wormable nature of the attack. The ESP32 chip is capable of operating as both an access point and a client simultaneously. The researchers realized that an infected device could scan for other ELDs in its vicinity, authenticate using the same hardcoded credentials they discovered, and push a malicious firmware update to the new target.

This creates a self-propagating threat that could theoretically spread through a fleet of trucks at a rest stop or a distribution hub. Because these trucks often congregate in high-density areas, the proximity requirements for a wireless attack are easily met. The researchers achieved a range of approximately 120 feet in a dense parking lot using a standard PCB antenna. For a pentester, this means that a single compromised device in a fleet could lead to a cascading failure across an entire logistics network.

Why This Matters for Pentesters

If you are performing a security assessment on logistics infrastructure or fleet management systems, do not assume the ELD is a trusted component. These devices are often treated as "set and forget" hardware, but they are frequently the weakest link in the chain. During an engagement, look for the diagnostic port and identify the hardware connected to it. If you see an ELD, check for open ports like 22 (SSH/Telnet) or 80 (HTTP). If you can access the device's web interface or debug console, you are likely one step away from full CAN bus access.

The impact of this vulnerability is not just data exfiltration; it is the potential for physical disruption. Manipulating engine torque or speed while a vehicle is in motion is a high-severity finding that should be prioritized in any threat model. When reporting these issues, focus on the lack of secure boot and the absence of firmware signing, as these are the root causes that allow for persistent, malicious code execution.

The Defensive Reality

Defending against this requires a shift in how we view IoT in critical infrastructure. Manufacturers must implement secure boot and code signing to ensure that only authorized firmware can run on the device. Furthermore, the diagnostic port should be treated as a high-security interface. Implementing a gateway that acts as a firewall between the ELD and the vehicle's internal network is a necessary step to prevent unauthorized CAN bus traffic.

For now, the burden falls on the security community to continue exposing these flaws. We cannot rely on government mandates to enforce security when the certification process is self-policed and lacks technical rigor. If you encounter these devices in the wild, treat them with the same level of scrutiny you would apply to any other critical network node. The next time you see a truck on the highway, remember that its most critical systems might be running on an insecure, off-the-shelf microcontroller that has never seen a security audit.

Talk Type
research presentation
Difficulty
advanced
Category
iot security
Has Demo Has Code Tool Released


DEF CON 32

260 talks · 2024
Browse conference →
Premium Security Audit

We break your app before they do.

Professional penetration testing and vulnerability assessments by the Kuboid Secure Layer team. Securing your infrastructure at every layer.

Get in Touch
Official Security Partner
kuboid.in