Skip to main content
QUICK REVIEW

[Paper Review] Taking a Look into Execute-Only Memory

Marc Schink, Johannes Obermaier|arXiv (Cornell University)|Sep 12, 2019
Physical Unclonable Functions (PUFs) and Hardware SecurityComputer Science2 citations
TL;DR

This paper demonstrates that execute-only memory (XOM), a hardware-based firmware protection mechanism designed to prevent code read-out in multi-party microcontroller development, is fundamentally insecure. By exploiting shared hardware resources like CPU state and SRAM, the authors develop an automatic method to recover XOM-protected firmware through side-channel analysis and gadget-based code extraction, successfully demonstrating practical attacks on devices from multiple manufacturers, including NXP and Texas Instruments.

ABSTRACT

The development process of microcontroller firmware often involves multiple parties. In such a scenario, the Intellectual Property (IP) is not protected against adversarial developers which have unrestricted access to the firmware binary. For this reason, microcontroller manufacturers integrate eXecute-Only Memory (XOM) which shall prevent an unauthorized read-out of third-party firmware during development. The concept allows execution of code but disallows any read access to it. Our security analysis shows that this concept is insufficient for firmware protection due to the use of shared resources such as the CPU and SRAM. We present a method to infer instructions from observed state transitions in shared hardware. We demonstrate our method via an automatic recovery of protected firmware. We successfully performed experiments on devices from different manufacturers to confirm the practicability of our attack. Our research also reveals implementation flaws in some of the analyzed devices which enables an adversary to bypass the read-out restrictions. Altogether, the paper shows the insufficient security of the XOM concept as well as several implementations.

Motivation & Objective

  • To evaluate the security effectiveness of execute-only memory (XOM) as a protection mechanism against adversarial developers with physical and privileged access.
  • To investigate whether XOM-protected firmware can be recovered through side-channel analysis of shared hardware resources such as CPU registers and SRAM.
  • To develop and validate an automatic method for recovering XOM-protected firmware using observable state transitions and code-gadget exploitation.
  • To identify and exploit implementation flaws in XOM-enabled microcontrollers that bypass read-out restrictions.
  • To assess the broader implications for firmware security in multi-party embedded development and advocate for stronger isolation mechanisms like TEEs.

Proposed method

  • The authors analyze the behavior of XOM-protected microcontrollers under controlled execution, observing CPU register states and SRAM content during instruction execution to infer secret code.
  • They identify and utilize 'gadgets'—specific instruction sequences that allow controlled memory access—by leveraging existing code patterns in libraries like CMSIS.
  • A timing-based side-channel attack is applied to detect instruction-level transitions, enabling the reconstruction of code from observable state changes.
  • The method is automated using interrupt-driven execution to trigger and observe state changes in XOM-protected regions.
  • The approach is validated on multiple microcontroller platforms, including NXP Kinetis and Texas Instruments MSP432P4, by constructing and executing custom gadgets to extract protected code.
  • The recovery process is enhanced by analyzing debug and trace features such as the Data Watch and Trace (DWT) component to accelerate code extraction.

Experimental results

Research questions

  • RQ1Can XOM-protected firmware be recovered through side-channel analysis of shared hardware state transitions?
  • RQ2What specific instruction sequences (gadgets) enable unauthorized access to XOM-protected memory despite hardware-enforced read-protection?
  • RQ3Do implementation flaws in XOM-enabled microcontrollers allow bypassing the intended read-out restrictions?
  • RQ4To what extent can automated code recovery be achieved across different microcontroller architectures and vendors?
  • RQ5What are the practical limitations and success rates of such attacks in real-world embedded systems?

Key findings

  • The XOM concept is fundamentally insecure because it does not isolate execution from side-channel leakage via shared CPU and SRAM resources.
  • The authors successfully recovered XOM-protected firmware on NXP Kinetis devices using a single non-load instruction followed by a load instruction as a functional gadget.
  • On MSP432P4 devices, a two-instruction gadget (store followed by load) was used to unlock the XOM region and extract code, exploiting a vulnerability in the unlock mechanism's re-locking behavior.
  • Implementation flaws were discovered in several devices that allowed bypassing XOM protection, including premature locking of access after code exit.
  • The recovery process was automated and demonstrated across multiple vendors and architectures, proving the feasibility of full firmware extraction under realistic attack conditions.
  • The study concludes that XOM alone is insufficient for protecting firmware in multi-party development and that hardware-backed isolation like TEEs is required for adequate security.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.