Skip to content
Memory corruption Write-up Advanced

Pwn2Own Automotive: Popping the CHARX SEC-3100

A use-after-free in the CHARX SEC-3100's ControllerAgent service during process teardown allowed an attacker to hijack a virtual call and achieve remote code execution. The exploit bypassed ASLR by spraying fake objects in the large BSS segment and using a call-oriented programming chain to invoke system().

blog.ret2.io

Published on blog.ret2.io

Our previous post explored some of the bugs we discovered in the CHARX SEC-3100 ControllerAgent service for Pwn2Own Automotive. We’ll now walk through how these bugs were weaponized to produce a fully remote exploit.

The author, on blog.ret2.io

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

Impact

An attacker could achieve remote code execution with a connect-back shell, with an expected runtime under a minute due to the ASLR bypass.

What the attacker needed

Network access to the device; ability to send TCP/UDP/HomePlug packets

How it was found

  1. Wait for the agent to perform V2G-prerequisite initialization
  2. Use a config value std::string to craft a fake list node
  3. Populate V2GMessageReqMsg in the BSS with many fake objects
  4. Populate raw BSS buffers with 2nd fake objects (TCP / UDP / HomePlug packets)
  5. Trigger HomePlug null deref to kick off exit handlers (ControllerAgent destructor)
  6. Config value with fake list node is freed into tcache

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 device has a bug where, when shutting down, it uses memory that has already been freed. An attacker can arrange for that freed memory to contain fake data, tricking the program into running the attacker's code. This report explains how the researchers turned that bug into a full remote exploit.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.