Automatic Firmware Emulation through Invalidity-guided Knowledge Inference
Wei Zhou, Le Guan, Peng Liu, Yuqing Zhang
摘要
Emulating firmware for microcontrollers is challenging due to the tight coupling between the hardware and firmware. This has greatly impeded the application of dynamic analysis tools to firmware analysis. The state-of-the-art work automatically models unknown peripherals by observing their access patterns, and then leverages heuristics to calculate the appropriate responses when unknown peripheral registers are accessed. However, we empirically found that this approach and the corresponding heuristics are frequently insufficient to emulate firmware. In this work, we propose a new approach called uEmu to emulate firmware with unknown peripherals. Unlike existing work that attempts to build a general model for each peripheral, our approach learns how to correctly emulate firmware execution at individual peripheral access points. It takes the image as input and symbolically executes it by representing unknown peripheral registers as symbols. During symbolic execution, it infers the rules to respond to unknown peripheral accesses. These rules are stored in a knowledge base, which is referred to during the dynamic firmware analysis. uEmu achieved a passing rate of 95% in a set of unit tests for peripheral drivers without any manual assistance. We also evaluated uEmu with real-world firmware samples and new bugs were discovered.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 32 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- DICE: Automatic Emulation of DMA Input Channels for Dynamic Firmware Analysis 引用了 Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
- DICE: Automatic Emulation of DMA Input Channels for Dynamic Firmware Analysis 引用了 What You Corrupt Is Not What You Crash: Challenges in Fuzzing Embedded Devices
- DICE: Automatic Emulation of DMA Input Channels for Dynamic Firmware Analysis 引用了 Charm: Facilitating Dynamic Analysis of Device Drivers of Mobile Systems
- HEAPSTER: Analyzing the Security of Dynamic Allocators for Monolithic Firmware Images 引用了 What You Corrupt Is Not What You Crash: Challenges in Fuzzing Embedded Devices
- What You Corrupt Is Not What You Crash: Challenges in Fuzzing Embedded Devices 引用了 Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
- From One Thousand Pages of Specification to Unveiling Hidden Bugs: Large Language Model Assisted Fuzzing of Matter IoT Devices 引用了 DICE: Automatic Emulation of DMA Input Channels for Dynamic Firmware Analysis
- From One Thousand Pages of Specification to Unveiling Hidden Bugs: Large Language Model Assisted Fuzzing of Matter IoT Devices 引用了 Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
- Fuzzing Embedded Systems using Debug Interfaces 引用了 What You Corrupt Is Not What You Crash: Challenges in Fuzzing Embedded Devices
- \mu AFL: Non-intrusive Feedback-driven Fuzzing for Microcontroller Firmware 引用了 DICE: Automatic Emulation of DMA Input Channels for Dynamic Firmware Analysis
- SweynTooth: Unleashing Mayhem over Bluetooth Low Energy 引用了 What You Corrupt Is Not What You Crash: Challenges in Fuzzing Embedded Devices
引用它的顶会 Paper32
- SymLM: Predicting Function Names in Stripped Binaries via Context-Sensitive Execution-Aware Code EmbeddingsXin Jin, Kexin Pei, Jun Yeon Won, Zhiqiang LinCCS 2022 · 56 次引用
- From One Thousand Pages of Specification to Unveiling Hidden Bugs: Large Language Model Assisted Fuzzing of Matter IoT DevicesXiaoyue Ma, Lannan Luo, Qiang ZengUSENIX Security 2024 · 49 次引用
- HEAPSTER: Analyzing the Security of Dynamic Allocators for Monolithic Firmware ImagesFabio Gritti, Fabio Pagani, Ilya Grishchenko, Lukas Dresel 等S&P 2022 · 31 次引用
- : Non-intrusive Feedback-driven Fuzzing for Microcontroller FirmwareWenqiang Li, Jiameng Shi, Fengjun Li, Jingqiang Lin 等ICSE 2022 · 27 次引用
- Fuzzing Embedded Systems using Debug InterfacesMax Eisele, Daniel Ebert, Christopher Huth, Andreas ZellerISSTA 2023 · 20 次引用
它引用的 Paper8
- Towards Automated Dynamic Analysis for Linux-based Embedded FirmwareDaming D. Chen, Maverick Woo, David Brumley, Manuel EgeleNDSS 2016 · 428 次引用
- What You Corrupt Is Not What You Crash: Challenges in Fuzzing Embedded DevicesMarius Muench, Jan Stijohann, Frank Kargl, Aurélien Francillon 等NDSS 2018 · 202 次引用
- SweynTooth: Unleashing Mayhem over Bluetooth Low EnergyMatheus E. Garbelini, Chundong Wang, Sudipta Chattopadhyay, Sumei Sun 等USENIX ATC 2020 · 83 次引用
- DICE: Automatic Emulation of DMA Input Channels for Dynamic Firmware AnalysisAlejandro Mera, Bo Feng, Long Lu, Engin KirdaS&P 2021 · 81 次引用
- Charm: Facilitating Dynamic Analysis of Device Drivers of Mobile SystemsSeyed Mohammadjavad Seyed Talebi, Hamid Tavakoli, Hang Zhang, Zheng Zhang 等USENIX Security 2018 · 81 次引用
相关 Paper
- FlexEmu: Towards Flexible MCU Peripheral EmulationChongqing Lei, Zhen Ling, Xiangyu Xu, Shaofeng Li 等CCS 2025 · 1 次引用
- What Your Firmware Tells You Is Not How You Should Emulate It: A Specification-Guided Approach for Firmware EmulationWei Zhou, Lan Zhang, Le Guan, Peng Liu 等CCS 2022 · 18 次引用
- Jetset: Targeted Firmware Rehosting for Embedded SystemsEvan Johnson, Maxwell Bland, Yifei Zhu, Joshua Mason 等USENIX Security 2021 · 76 次引用
- P2IM: Scalable and Hardware-independent Firmware Testing via Automatic Peripheral Interface ModelingBo Feng, Alejandro Mera, Long LuUSENIX Security 2020
- FFXE: Dynamic Control Flow Graph Recovery for Embedded Firmware BinariesRyan Tsang, Asmita, Doreen Joseph, Soheil Salehi 等USENIX Security 2024 · 8 次引用
