KIA Head Unit Defacement: Reversing an entire RTOS
Danilo Erazo (Security Researcher · PCAutomotive)
RE//verse 2026 · Day 2 · Coral Ballroom A
Overview
In this comprehensive talk at RE//verse, security researcher Danilo Erazo unveiled the intricate process of reverse engineering a proprietary Real-Time Operating System (RTOS) found in Kia head units. Titled "KIA Head Unit Defacement: Reversing an entire RTOS," the presentation built upon a lightning talk from the previous year, offering a deep dive into the architecture and vulnerabilities of an infotainment system widely deployed in Kia Soluto/Pegas models across Latin America, China, Africa, and the Middle East. Erazo's independent research, conducted largely from his home and car, exposed significant security flaws, culminating in a proof-of-concept demonstration of head unit defacement leading to sophisticated phishing attacks and remote access to connected mobile devices.

Key moments
- 0:00 Introduction and personal car hacking journey
- 4:30 Dissecting Kia head unit hardware and components
- 9:40 Identifying the proprietary IRTOS and firmware insights
- 11:40 Deep dive into IRTOS kernel architecture and tasks
- 25:00 Discovering PNG vulnerability and defacing the head unit
- 29:00 Live demo: QR code phishing leading to RAT
- 32:30 Research timeline, career impact, and recent CVEs
KIA Head Unit Defacement: Reversing an entire RTOS
Speakers: Danilo Erazo, Security Researcher, PCAutomotive
Conference: RE//verse
YouTube: https://www.youtube.com/watch?v=4URYm8vULkY
Overview
In this comprehensive talk at RE//verse, security researcher Danilo Erazo unveiled the intricate process of reverse engineering a proprietary Real-Time Operating System (RTOS) found in Kia head units. Titled "KIA Head Unit Defacement: Reversing an entire RTOS," the presentation built upon a lightning talk from the previous year, offering a deep dive into the architecture and vulnerabilities of an infotainment system widely deployed in Kia Soluto/Pegas models across Latin America, China, Africa, and the Middle East. Erazo's independent research, conducted largely from his home and car, exposed significant security flaws, culminating in a proof-of-concept demonstration of head unit defacement leading to sophisticated phishing attacks and remote access to connected mobile devices.
The talk meticulously details the challenges of analyzing a system built with undocumented, low-cost components and a completely black-box RTOS. Erazo navigated a labyrinth of hardware hacking, firmware extraction, and bare-metal reverse engineering to uncover the system's inner workings, including its task scheduler, inter-task communication, and handling of external interfaces like USB and Bluetooth. The core finding revolved around a critical lack of integrity verification for visual assets (PNG files) loaded during the boot process, enabling an attacker to replace system images with arbitrary content.
This research is particularly significant for automotive cybersecurity, as it highlights the inherent risks in complex supply chains where proprietary, often outdated, components are integrated without rigorous security auditing. The ability to manipulate the head unit's display, as demonstrated by Erazo, extends beyond mere cosmetic defacement; it opens doors to highly effective social engineering attacks, such as tricking users into installing malware via compromised QR codes. Erazo responsibly reported these vulnerabilities to Kia Corporation through the Automotive Cyber Security Research Group, emphasizing the importance of collaborative disclosure in securing modern vehicles.
Background
▶ Watch: Introduction and personal car hacking journey (0:00)
Danilo Erazo’s journey into reverse engineering the Kia infotainment system began as a personal quest, driven by curiosity and a passion for car hacking. After leaving his role as a penetration tester in December 2024, he dedicated his free time to exploring the security of his own vehicle, a Kia Soluto Pegas. This wasn't his first foray into automotive security; previous independent research in 2024 led to the discovery of a remote keyless entry system vulnerability and a local CAN injection exploit in the electronic stability control, which he presented at Def Con. The deep dive into the head unit's RTOS began in earnest from April to November 2025, following a reverse engineering training in March 2025 where he first showcased preliminary findings.
The context of Kia's infotainment systems is varied; many newer models utilize more common platforms like Linux Automotive OS or Android Automotive OS. However, Erazo's Kia Soluto/Pegas, a car widely sold as the Kia Soluto in Latin America and Kia Pegas in other regions, proved to be an exception. Its infotainment system ran an unknown, proprietary operating system, presenting a significant challenge due to the complete absence of documentation.
Hardware analysis of the head unit revealed a system built with decidedly cheap and undocumented components. The central System-on-a-Chip (SoC) was identified as a TMM9200, for which no data sheets or public information were available. Complementing this was an older M66 microcontroller, further indicating the use of inexpensive parts. The storage architecture included two SPI flash chips (one 2MB, one 16MB) and one EEPROM. The supply chain involved Tamul as the SoC creator, Motrex as the head unit supplier, and Kia Corporation as the end product user, highlighting the multi-layered nature of automotive component sourcing.
The research was fraught with difficulties. The firmware for the Kia Soluto/Pegas was not available through official Kia update apps, making software-based extraction impossible. Furthermore, there was no accessible engineering mode, no data sheets for critical components, and a considerable risk of bricking the device, which would incur a $600 replacement cost for a unit not readily available in Erazo's country. These constraints forced a hardware-centric approach, emphasizing the lengths required to perform security analysis on such closed, proprietary systems.
Key Findings
▶ Watch: Identifying the proprietary IRTOS and firmware insights (9:40)
Danilo Erazo's extensive reverse engineering efforts yielded several crucial discoveries about the Kia head unit's proprietary RTOS and its security posture:
- Identification of IRTOS: Through meticulous analysis, Erazo identified the undocumented RTOS as IRTOS. This was confirmed by string analysis within the firmware and cross-referenced with a now-defunct webpage (
tamulm.com) belonging to the SoC manufacturer, Tamul, which explicitly listed IRTOS as their real-time operating system. - Firmware Structure and Data Exposure: The 16MB main firmware binary was found to contain three raw files: a recovery binary for factory reset, a pre-main bootloader, and the main RTOS kernel. Critically, the firmware also stored sensitive information in plain text, including Bluetooth PINs, synchronized contact names, and Bluetooth device names, rendering this data easily accessible to an attacker.
- Hardcoded Cryptographic Material: The system contained hardcoded Android Auto certificates and associated private keys. The presence of these sensitive cryptographic assets directly within the firmware, without apparent protection, represents a significant security oversight, potentially allowing for impersonation or unauthorized access if compromised.
- Discovery of Libpng and Image Handling: Erazo identified the use of the libpng library for processing all display images within the head unit. The system stores 882 PNG files, which represent every visual element from arrows and logos to numbers, primarily located at the end of the firmware data.
- Critical Bootloader Integrity Vulnerability: The most impactful finding was the lack of signature integrity verification for the PNG files loaded by the bootloader. While
libpngperforms CRC checks on internal PNG chunks (like IHDR), it does not validate the overall integrity or signature of the entire PNG file. This design flaw allows an attacker to modify the content of any display image without triggering an integrity error, as long as specific conditions (e.g., maintaining file size and offset) are met. - Head Unit Defacement Capability: Leveraging the PNG vulnerability, Erazo successfully demonstrated the ability to replace official Kia display images with arbitrary content, effectively defacing the head unit's interface. This was proven by altering the Kia home logo to include custom text and successfully booting the modified firmware.
- Proof-of-Concept for QR Code Phishing and RAT: The defacement capability was extended to a real-world attack scenario. By replacing the official Kia QR code (which linked to
kia.com) with a malicious one, Erazo created a phishing vector. Scanning this modified QR code redirected users to a fake Kia webpage (rebersaotina.com) prompting the download of a Remote Access Trojan (RAT) disguised as an Android APK. This RAT, when installed on a connected phone, provided comprehensive control, including microphone recording, GPS location tracking, and SMS message dumping. - Potential for Remote Code Execution (RCE): Erazo noted a recent libpng CVE (discovered in February 2026) that allows for heap overflow vulnerabilities. While not directly exploited in his primary demonstration due to no longer owning the car, this finding suggests that carefully crafted, malformed PNGs could potentially lead to remote code execution within the RTOS, further escalating the severity of image-related vulnerabilities.
These findings collectively paint a picture of an infotainment system with fundamental security weaknesses, stemming from a lack of secure development practices and an over-reliance on obscurity for protection.
Technical Deep Dive
▶ Watch: Deep dive into IRTOS kernel architecture and tasks (11:40)
Danilo Erazo's technical exposition began with the arduous process of firmware parsing from the physical hardware. Initial attempts to dump the EEPROM memory via I2C yielded only configuration data like UUIDs and version information, proving unhelpful for deeper analysis. A 2MB SPI flash chip also contained no useful firmware. The breakthrough came with the 16MB SPI flash (WB25Q128), which was found to contain the second-stage bootloader and the main firmware. Crucially, a UART port discovered on the backside of the board provided invaluable debug logs, including the unencrypted Bluetooth PIN password in plain text, a stark indicator of the system's security posture.
The firmware itself comprised three main binaries: a recovery binary for factory resets, a pre-main binary acting as the second-stage bootloader, and the main binary, which is the core Real-Time Operating System (RTOS). The pre-main binary is responsible for loading the main RTOS into memory.
Initial RTOS identification efforts led to a false positive. The presence of the byte sequence EB 10 90 00 in the assembly code, often associated with QNX file system signatures, initially suggested a QNX operating system. However, deeper analysis revealed this sequence to be a BLX (Branch with Link and Exchange) ARM instruction, specifically used to switch between ARM (32-bit) and Thumb (16-bit) instruction sets during a function call, debunking the QNX hypothesis. Through further investigation and string analysis, Erazo confirmed the RTOS to be IRTOS, a proprietary system developed by Tamul, the SoC manufacturer.
The IRTOS kernel was found to manage 110 tasks, each defined by a task template including an ID, name, entry point, stack size, and flags. A key architectural element is the RTOS's main task, which operates as a while(true) loop, effectively serving as the scheduler. This scheduler orchestrates the execution of various tasks based on their assigned priorities, which range from 2 (low priority, e.g., power management) to 11 (high priority, e.g., OS updates). Common functionalities like USB processing, multimedia, navigation, Android Auto, CarPlay, and Bluetooth typically operate at priority 10.
Inter-task communication is facilitated primarily through message queues and semaphores. Message queues provide a buffered mechanism for tasks to exchange data, with functions like create_message, send_message_to_queue, and receive_message_from_queue. Semaphores act as synchronization primitives, controlling access to shared resources to prevent race conditions. Each semaphore maintains an internal counter: a value greater than zero indicates resource availability, while zero signifies the resource is busy, blocking waiting tasks. Erazo noted that every task initialization involves the creation of both a semaphore and a message queue, indicating a structured approach to concurrency management.
The scheduler is the "brain" of the RTOS, with functions like init_scheduler, next_task, high_priority_task, ready_task, scheduler_callback, and restore_task_context. These functions, which Erazo painstakingly reverse-engineered and renamed due to the complete absence of symbols in the bare-metal firmware, determine task execution order based on priorities and readiness. Interrupts, triggered by events such as USB device connection or Bluetooth pairing, are translated into tasks by the system, managed by functions like set_interrupt_state and restore_interrupt_state.
Erazo identified several attack vectors:
- USB Kernel Stack: The system includes drivers for USB mass storage and USB CDC/NCM (Network Control Model). Each layer of the USB stack is implemented as a task, with inter-task communication facilitating data flow. Erazo highlighted that USB fuzzing, using tools like
syscaller Google fuzzer, could uncover zero-day vulnerabilities in such a complex, layered system. - Bluetooth Stack: The head unit utilizes a Broadcom chip (BCM2072A) for Bluetooth connectivity. Through chip ID identification and comparison with public repositories, Erazo confirmed the use of BCA (Broadcom's Bluetooth stack), rather than IROC, which is typically found in RTOS environments. This stack includes various application layers (Hands-Free Profile, A2DP, Phonebook Access Profile) and the L2CAP (Logical Link Control and Adaptation Protocol) layer for host-controller communication. The speaker referenced the "Perfect Blue" exploit, a known remote command execution vulnerability affecting Volkswagen and Mercedes-Benz head units, as an example of Bluetooth stack attack potential.
- Bootloader and PNG Vulnerability: This was the most critical vector. While the first-stage bootloader performs integrity checks (a modified bit resulted in a white screen), the second-stage bootloader and the subsequent loading of 882 PNG files revealed a fundamental flaw. The RTOS uses the libpng library for image decoding. Crucially,
libpng's default CRC checks only validate the integrity of internal PNG chunks (e.g., IHDR for dimensions) but not the overall integrity or signature of the entire PNG file. This means an attacker can substitute a legitimate image with an arbitrary one, provided the new image maintains the same file size and offset in the firmware, effectively bypassing any integrity validation. The bootloader simply loads the raw PNG bytes from flash into RAM without cryptographic verification.
This detailed technical analysis provided the foundation for the demonstrated defacement and phishing attacks, exposing a critical weakness in the infotainment system's boot process and asset loading mechanism.
Demo / Proof of Concept
▶ Watch: Live demo: QR code phishing leading to RAT (29:00)
Danilo Erazo presented a compelling proof of concept (PoC) demonstrating the practical implications of the identified vulnerabilities, particularly the lack of integrity verification for PNG files during the boot process.
The initial demonstration focused on head unit defacement. Erazo successfully altered the official Kia home logo image, which is stored as a PNG file within the firmware. He replaced it with an image incorporating the "hard word" (likely "hello world" or similar text, as often used in PoCs). After recompiling the firmware with the modified PNG and flashing it back onto the SPI flash, the system booted successfully. The head unit displayed the custom image, proving that arbitrary visual content could be injected. This required adherence to specific conditions: the fake image had to be the same size as the original, or smaller with zero-padding, and could not be compressed if the original was uncompressed (or vice-versa, depending on how the RTOS handled it). Crucially, the offset in the firmware had to be maintained. Erazo created a script to automate this image replacement process, which he made available on his GitHub.
The defacement capability was then escalated into a more dangerous QR code phishing attack. The Kia head unit featured a QR code that, when scanned, redirected users to the official Kia webpage. Erazo replaced this legitimate QR code with a custom-generated one. This malicious QR code, maintaining the necessary size and uncompressed format, redirected users to a fake Kia webpage hosted at rebersaotina.com.
This fake webpage was designed to mimic the official Kia site but served as a distribution point for malware. It prompted users to download an Android APK that was, in reality, a Remote Access Trojan (RAT). Erazo demonstrated the full attack chain: a user scans the compromised QR code on the head unit, is taken to the phishing site, downloads and installs the malicious APK, and subsequently provides an attacker with a reverse shell on their connected Android phone.
Using the Metasploit Framework, Erazo showcased the RAT's capabilities:
- Recording the phone's microphone: This allowed an attacker to eavesdrop on conversations occurring inside the car.
- Accessing GPS location: Since the phone was inside the car, its GPS coordinates directly provided the car's location.
- Dumping SMS messages: Revealing potentially sensitive personal communications.
- Retrieving system information: Confirming the compromise of an Android 14 device.
This multi-stage attack highlighted how a seemingly innocuous visual defacement vulnerability could be chained to achieve significant compromise of personal data and privacy. Erazo emphasized that this PoC was reported to Kia via the Automotive Cyber Security Research Group.
Finally, Erazo briefly mentioned a libpng CVE from February 2026, discovered just a month before his talk. This vulnerability involved a heap overflow that could potentially allow for remote command execution (RCE) via a malformed PNG file. While he no longer owned the vulnerable car to demonstrate this specific exploit, it underscored the broader security risks associated with unverified image processing libraries and the potential for even more severe attacks than simple defacement.
Defensive Implications
▶ Watch: Research timeline, career impact, and recent CVEs (32:30)
The findings from Danilo Erazo's research expose several critical areas where automotive manufacturers and suppliers must enhance their security posture to protect infotainment systems:
- Robust Firmware Integrity Verification: The paramount defensive implication is the absolute necessity for comprehensive cryptographic signature verification for all firmware components, including visual assets like PNG files, at every stage of the boot process. The current reliance on basic
libpngCRC checks, which only validate internal chunk integrity rather than overall file authenticity, is insufficient. Manufacturers must implement robust digital signature schemes to ensure that only trusted, untampered files are loaded. This should extend to the entire software supply chain, from SoC to the final head unit. - Secure Supply Chain Management: The use of undocumented, potentially outdated, and "cheap" components (like the TMM9200 SoC and M66 microcontroller) from suppliers like Tamul and Motrex introduces significant risk. Automotive OEMs must demand transparency, secure development lifecycle adherence, and thorough security audits from their component suppliers. This includes requiring detailed documentation, open-source security analysis (where appropriate), and vulnerability disclosure processes for all third-party software and hardware integrated into their vehicles.
- Elimination of Hardcoded Sensitive Data: Storing sensitive information such as Bluetooth PINs, Android Auto private keys, and other credentials in plaintext or hardcoded within firmware is a severe security vulnerability. Manufacturers must adopt secure storage mechanisms, such as hardware security modules (HSMs) or trusted execution environments (TEEs), to protect cryptographic keys and user data. All sensitive data should be encrypted at rest and in transit, with proper key management practices.
- Comprehensive Input Validation and Fuzzing: All external interfaces, particularly USB and Bluetooth, represent significant attack surfaces. Robust input validation and continuous fuzz testing (as exemplified by
syscaller Google fuzzerfor USB) should be integrated into the development and testing phases. This is crucial for identifying and mitigating vulnerabilities like buffer overflows or logic flaws that could be exploited through malformed data or unexpected inputs. - Secure Over-the-Air (OTA) Update Mechanisms: The absence of official firmware updates for the Kia Soluto/Pegas model is a critical failing. All vehicle models, regardless of their market segment or age, must be supported with secure, authenticated, and encrypted OTA update capabilities. This allows manufacturers to patch discovered vulnerabilities efficiently and prevent exploitation.
- Defense in Depth: Even with robust integrity checks, a multi-layered security approach is essential. Intrusion detection systems within the head unit could monitor for anomalous behavior or unexpected file modifications. Runtime integrity checks could periodically verify critical system files and loaded assets. Application sandboxing, if feasible within the RTOS, could limit the impact of a compromised component.
- Vulnerability Disclosure and Remediation: Erazo's experience of reporting through the Automotive Cyber Security Research Group highlights the importance of established and responsive vulnerability disclosure programs. OEMs must actively engage with the security research community, facilitate responsible disclosure, and prioritize the remediation of identified vulnerabilities across their entire fleet.
By addressing these defensive implications, automotive manufacturers can significantly enhance the security, trustworthiness, and resilience of their infotainment systems against sophisticated attacks.
Key Takeaways
- Proprietary RTOS presents significant security challenges: The IRTOS running on the Kia head unit was completely undocumented, lacking symbols or public information, making reverse engineering extremely difficult and obscuring potential vulnerabilities.
- Lack of bootloader integrity checks is critical: The most impactful vulnerability was the absence of cryptographic signature verification for visual assets (PNG files) loaded by the bootloader. This allowed for arbitrary image replacement and head unit defacement.
- Defacement enables sophisticated phishing attacks: The ability to alter display images was leveraged to create a malicious QR code, leading to a fake webpage and the installation of a Remote Access Trojan (RAT) on a connected mobile device, demonstrating a clear path from a seemingly minor flaw to severe user compromise.
- Sensitive data often exposed in plaintext: The firmware contained Bluetooth PINs and Android Auto private keys in plaintext, highlighting fundamental lapses in secure coding and data protection practices.
- Automotive supply chain introduces security risks: The use of undocumented and potentially outdated components from third-party suppliers (Tamul SoC, Motrex head unit) without clear security assurances creates a vulnerable ecosystem.
- Input interfaces (USB, Bluetooth) are prime attack vectors: The detailed analysis of the USB and Bluetooth stacks, including the identification of the BCA Bluetooth stack and its Broadcom chip, underscored these as complex, multi-layered interfaces susceptible to known and new vulnerabilities.
About the Speaker(s)
Danilo Erazo is a dedicated Security Researcher currently working with PCAutomotive in Budapest. His passion for cybersecurity, particularly in the realm of embedded devices and automotive systems, drives his independent research. Erazo is a prominent figure in the car hacking community, known for founding the Ecuadorian Car Hacking Village and being an active member of the Def Con Car Hacking Village. He frequently shares his reverse engineering insights and findings on his YouTube channel, inspiring others in the field. His journey into automotive security began with personal endeavors to hack his own car, leading to significant discoveries and ultimately a career move to Budapest, where he continues to contribute to the advancement of automotive cybersecurity.
Reviews
Dr. Zero (Offensive Security Researcher) — STRONG ACCEPT
Danilo Erazo dumped the SPI flash on a black-box Kia head unit, reverse-engineered an undocumented RTOS from scratch, and chained a bootloader integrity flaw into a mobile RAT. This is exactly the kind of gritty, bare-metal hardware and firmware research that conferences need more of. Strong accept.
Heather Calloway (CISO) — STRONG ACCEPT
This is deep reverse engineering of a proprietary automotive RTOS that chains a missing image signature check into a mobile device compromise via QR code phishing. While the specific exploit targets budget-tier head units, the business implication is a textbook demonstration of supply chain failure and the risk of physical-to-digital pivots against corporate mobile devices.