English

AIM: Automatic Interrupt Modeling for Dynamic Firmware Analysis

Cryptography and Security 2023-12-05 v1 Software Engineering

Abstract

The security of microcontrollers, which drive modern IoT and embedded devices, continues to raise major concerns. Within a microcontroller (MCU), the firmware is a monolithic piece of software that contains the whole software stack, whereas a variety of peripherals represent the hardware. As MCU firmware contains vulnerabilities, it is ideal to test firmware with off-the-shelf software testing techniques, such as dynamic symbolic execution and fuzzing. Nevertheless, no emulator can emulate the diverse MCU peripherals or execute/test the firmware. Specifically, the interrupt interface, among all I/O interfaces used by MCU peripherals, is extremely challenging to emulate. In this paper, we present AIM -- a generic, scalable, and hardware-independent dynamic firmware analysis framework that supports unemulated MCU peripherals by a novel interrupt modeling mechanism. AIM effectively and efficiently covers interrupt-dependent code in firmware by a novel, firmware-guided, Just-in-Time Interrupt Firing technique. We implemented our framework in angr and performed dynamic symbolic execution for eight real-world MCU firmware. According to testing results, our framework covered up to 11.2 times more interrupt-dependent code than state-of-the-art approaches while accomplishing several challenging goals not feasible previously. Finally, a comparison with a state-of-the-art firmware fuzzer demonstrates dynamic symbolic execution and fuzzing together can achieve better firmware testing coverage.

Keywords

Cite

@article{arxiv.2312.01195,
  title  = {AIM: Automatic Interrupt Modeling for Dynamic Firmware Analysis},
  author = {Bo Feng and Meng Luo and Changming Liu and Long Lu and Engin Kirda},
  journal= {arXiv preprint arXiv:2312.01195},
  year   = {2023}
}

Comments

This paper was accepted to IEEE Transactions on Dependable and Secure Computing at Oct 12, 2023

R2 v1 2026-06-28T13:39:17.289Z