Lune

USENIX Security2024Top-tier venue

A Friend's Eye is A Good Mirror: Synthesizing MCU Peripheral Models from Peripheral Drivers

Chongqing Lei, Zhen Ling, Yue Zhang, Yan Yang, Junzhou Luo, Xinwen Fu

Abstract

The extensive integration of embedded devices within the Internet of Things (IoT) has given rise to significant security concerns. Various initiatives have been undertaken to bolster the security of these devices at the software level, involving the analysis of MCU firmware and the implementation of automatic MCU rehosting methods. However, existing hardware-oriented rehosting techniques often face scalability challenges, while firmware-oriented approaches may have limited universality and fidelity. To address these limitations, we propose PERRY, a system that synthesizes faithful and extendable peripheral models for MCUs. By extracting peripheral models from hardware drivers, PERRY ensures compatibility and accurate emulation of targeted MCUs. The process involves gathering hardware metadata, analyzing driver code, capturing traces of peripheral accesses, and converting software beliefs into hardware behaviors. PERRY is implemented with approximately 19,000 lines of code. A comprehensive evaluation of 75 firmware samples has showcased its effectiveness, consistency, universality, and scalability in generating hardware models for MCUs. PERRY can efficiently synthesize hardware models consistent with the actual hardware and achieve a 74.24% unit test passing rate, outperforming the state-of-the-art techniques. The hardware models produced by PERRY can faithfully emulate diverse firmware and can be readily expanded with minimal manual intervention. Through case studies, we show that PERRY can help reproduce firmware vulnerabilities, discover specification-violation bugs in drivers, and fuzz RTOS for vulnerabilities. These case studies have led to the identification of two specification-violating bugs and the discovery of seven new vulnerabilities, underscoring PERRY's potential to enhance various security-focused tasks.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • FlexEmu: Towards Flexible MCU Peripheral Emulation cites Karonte: Detecting Insecure Multi-binary Interactions in Embedded Firmware
  • FlexEmu: Towards Flexible MCU Peripheral Emulation cites Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
  • FlexEmu: Towards Flexible MCU Peripheral Emulation cites Inception: System-Wide Security Testing of Real-World Embedded Systems Software
  • FlexEmu: Towards Flexible MCU Peripheral Emulation cites FirmUSB: Vetting USB Device Firmware using Domain Informed Symbolic Execution
  • Karonte: Detecting Insecure Multi-binary Interactions in Embedded Firmware cites Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
  • Khost: KVM-based Near Native MCU Firmware Rehosting cites Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
  • Khost: KVM-based Near Native MCU Firmware Rehosting cites Inception: System-Wide Security Testing of Real-World Embedded Systems Software
  • Khost: KVM-based Near Native MCU Firmware Rehosting cites LEMIX: Enabling Testing of Embedded Applications as Linux Applications
  • LEMIX: Enabling Testing of Embedded Applications as Linux Applications cites Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
  • LEMIX: Enabling Testing of Embedded Applications as Linux Applications cites Inception: System-Wide Security Testing of Real-World Embedded Systems Software
  • FirmUSB: Vetting USB Device Firmware using Domain Informed Symbolic Execution cites Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. Collapse Like A House of Cards: Hacking Building Automation System Through FuzzingYue Zhang, Zhen Ling, Michael Cash, Qiguang Zhang et al.CCS 2024 · 3 citations
  2. FlexEmu: Towards Flexible MCU Peripheral EmulationChongqing Lei, Zhen Ling, Xiangyu Xu, Shaofeng Li et al.CCS 2025 · 1 citation
  3. Khost: KVM-based Near Native MCU Firmware RehostingChunlin Wang, Yicheng Yang, Yuan Zhang, Haoyu Xiao et al.USENIX Security 2026
  4. GDMA: Fully Automated DMA Rehosting via Iterative Type OverlaysTobias Scharnowski, Simeon Hoffmann, Moritz Bley, Simon Wörner et al.USENIX Security 2025
  5. LEMIX: Enabling Testing of Embedded Applications as Linux ApplicationsSai Ritvik Tanksalkar, Siddharth Muralee, Srihari Danduri, Paschal C. Amusuo et al.USENIX Security 2025

Builds on16

  1. Towards Automated Dynamic Analysis for Linux-based Embedded FirmwareDaming D. Chen, Maverick Woo, David Brumley, Manuel EgeleNDSS 2016 · 428 citations
  2. Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type AnalysisKangjie Lu, Hong HuCCS 2019 · 142 citations
  3. Karonte: Detecting Insecure Multi-binary Interactions in Embedded FirmwareNilo Redini, Aravind Machiry, Ruoyu Wang, Chad Spensky et al.S&P 2020 · 128 citations
  4. Inception: System-Wide Security Testing of Real-World Embedded Systems SoftwareNassim Corteggiani, Giovanni Camurati, Aurélien FrancillonUSENIX Security 2018 · 117 citations
  5. FirmUSB: Vetting USB Device Firmware using Domain Informed Symbolic ExecutionGrant Hernandez, Farhaan Fowze, Dave (Jing) Tian, Tuba Yavuz et al.CCS 2017 · 98 citations

Related papers

  1. Greenhouse: Single-Service Rehosting of Linux-Based Firmware Binaries in User-Space EmulationHui Jun Tay, Kyle Zeng, Jayakrishna Menon Vadayath, Arvind S. Raj et al.USENIX Security 2023
  2. SHiFT: Semi-hosted Fuzz Testing for Embedded ApplicationsAlejandro Mera, Changming Liu, Ruimin Sun, Engin Kirda et al.USENIX Security 2024 · 15 citations
  3. BoardRunner: Automatic Firmware Rehosting Using High-Fidelity Compositional Device ModelsMuhammad Hammad Bashir, Michael Rooney, Colin Smith, Dongyan Xu et al.CCS 2026
  4. Protocol-Aware Firmware Rehosting for Effective Fuzzing of Embedded Network StacksMoritz Bley, Tobias Scharnowski, Simon Wörner, Moritz Schloegel et al.CCS 2025
  5. P2IM: Scalable and Hardware-independent Firmware Testing via Automatic Peripheral Interface ModelingBo Feng, Alejandro Mera, Long LuUSENIX Security 2020
Dusk over the sea between two cliffs drawn in fine vertical lines