Skip to content
RCE Write-up Advanced

I also hacked my car

The infotainment system's phone-based map update feature allowed arbitrary file writes under the /navi directory, enabling an attacker to modify a file and inject a call to a bash script that runs as root. This gave full root access to the head unit.

goncalomb.com

Published on goncalomb.com

This blog post is kind of inspired by another that I saw on HN some time ago, “How I Hacked my Car”. After praising the infotainment system of the car, a Hyundai IONIQ, the author ends up hacking it and running custom software on the head unit.

goncalomb, on goncalomb.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The update protocol allowed arbitrary file writes under /navi without proper validation, and a writable file could be modified to execute a script as root.

Impact

An attacker with physical USB access could gain root access to the infotainment system, allowing full control of the head unit.

What the attacker needed

Physical USB access to the head unit; head unit firmware version 6.0.10.2 or later; a device that can act as an Android accessory (e.g.…

The fix

The autorun.sh backdoor was removed in version 6.0.10.2, but the NFTP update feature still allowed arbitrary file writes; it should be fixed by validating file paths and preventing writes outside intended directories.

How it was found

  1. Set up a Raspberry Pi in USB gadget mode to act as an Android device in AOA mode.
  2. Connect the Raspberry Pi to the head unit's USB port and select 'Update with Phone' on the head unit.
  3. Use a custom implementation of the NFTP protocol to send commands that write files under /navi.
  4. Modify a specific file to inject a call to a bash script, and upload the bash script via NFTP.
  5. The head unit executes the bash script as root, giving a root shell.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The car's entertainment system had a feature to update maps using a phone app. The system trusted the phone to send files without checking what they were, so someone could pretend to be the phone and send malicious files that the car then ran with full control. This let them take over the car's computer.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.