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
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 7 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- FlexEmu: Towards Flexible MCU Peripheral Emulation 引用了 Karonte: Detecting Insecure Multi-binary Interactions in Embedded Firmware
- FlexEmu: Towards Flexible MCU Peripheral Emulation 引用了 Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
- FlexEmu: Towards Flexible MCU Peripheral Emulation 引用了 Inception: System-Wide Security Testing of Real-World Embedded Systems Software
- FlexEmu: Towards Flexible MCU Peripheral Emulation 引用了 FirmUSB: Vetting USB Device Firmware using Domain Informed Symbolic Execution
- Karonte: Detecting Insecure Multi-binary Interactions in Embedded Firmware 引用了 Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
- Khost: KVM-based Near Native MCU Firmware Rehosting 引用了 Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
- Khost: KVM-based Near Native MCU Firmware Rehosting 引用了 Inception: System-Wide Security Testing of Real-World Embedded Systems Software
- Khost: KVM-based Near Native MCU Firmware Rehosting 引用了 LEMIX: Enabling Testing of Embedded Applications as Linux Applications
- LEMIX: Enabling Testing of Embedded Applications as Linux Applications 引用了 Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
- LEMIX: Enabling Testing of Embedded Applications as Linux Applications 引用了 Inception: System-Wide Security Testing of Real-World Embedded Systems Software
- FirmUSB: Vetting USB Device Firmware using Domain Informed Symbolic Execution 引用了 Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
引用它的顶会 Paper7
- Collapse Like A House of Cards: Hacking Building Automation System Through FuzzingYue Zhang, Zhen Ling, Michael Cash, Qiguang Zhang 等CCS 2024 · 3 次引用
- FlexEmu: Towards Flexible MCU Peripheral EmulationChongqing Lei, Zhen Ling, Xiangyu Xu, Shaofeng Li 等CCS 2025 · 1 次引用
- Khost: KVM-based Near Native MCU Firmware RehostingChunlin Wang, Yicheng Yang, Yuan Zhang, Haoyu Xiao 等USENIX Security 2026
- GDMA: Fully Automated DMA Rehosting via Iterative Type OverlaysTobias Scharnowski, Simeon Hoffmann, Moritz Bley, Simon Wörner 等USENIX Security 2025
- LEMIX: Enabling Testing of Embedded Applications as Linux ApplicationsSai Ritvik Tanksalkar, Siddharth Muralee, Srihari Danduri, Paschal C. Amusuo 等USENIX Security 2025
它引用的 Paper16
- Towards Automated Dynamic Analysis for Linux-based Embedded FirmwareDaming D. Chen, Maverick Woo, David Brumley, Manuel EgeleNDSS 2016 · 428 次引用
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type AnalysisKangjie Lu, Hong HuCCS 2019 · 142 次引用
- Karonte: Detecting Insecure Multi-binary Interactions in Embedded FirmwareNilo Redini, Aravind Machiry, Ruoyu Wang, Chad Spensky 等S&P 2020 · 128 次引用
- Inception: System-Wide Security Testing of Real-World Embedded Systems SoftwareNassim Corteggiani, Giovanni Camurati, Aurélien FrancillonUSENIX Security 2018 · 117 次引用
- FirmUSB: Vetting USB Device Firmware using Domain Informed Symbolic ExecutionGrant Hernandez, Farhaan Fowze, Dave (Jing) Tian, Tuba Yavuz 等CCS 2017 · 98 次引用
相关 Paper
- Greenhouse: Single-Service Rehosting of Linux-Based Firmware Binaries in User-Space EmulationHui Jun Tay, Kyle Zeng, Jayakrishna Menon Vadayath, Arvind S. Raj 等USENIX Security 2023
- SHiFT: Semi-hosted Fuzz Testing for Embedded ApplicationsAlejandro Mera, Changming Liu, Ruimin Sun, Engin Kirda 等USENIX Security 2024 · 15 次引用
- BoardRunner: Automatic Firmware Rehosting Using High-Fidelity Compositional Device ModelsMuhammad Hammad Bashir, Michael Rooney, Colin Smith, Dongyan Xu 等CCS 2026
- Protocol-Aware Firmware Rehosting for Effective Fuzzing of Embedded Network StacksMoritz Bley, Tobias Scharnowski, Simon Wörner, Moritz Schloegel 等CCS 2025
- P2IM: Scalable and Hardware-independent Firmware Testing via Automatic Peripheral Interface ModelingBo Feng, Alejandro Mera, Long LuUSENIX Security 2020
