Lune

S&P2021顶会

DICE: Automatic Emulation of DMA Input Channels for Dynamic Firmware Analysis

Alejandro Mera, Bo Feng, Long Lu, Engin Kirda

摘要

Microcontroller-based embedded devices are at the core of Internet-of-Things (IoT) and Cyber-Physical Systems (CPS). The security of these devices is of paramount importance. Among the approaches to securing embedded devices, dynamic firmware analysis (e.g., vulnerability detection) gained great attention lately, thanks to its offline nature and low false-positive rates. However, regardless of the analysis and emulation techniques used, existing dynamic firmware analyzers share a major limitation, namely the inability to handle firmware using DMA (Direct Memory Access). It severely limits the types of devices supported and firmware code coverage.We present DICE, a drop-in solution for firmware analyzers to emulate DMA input channels and generate or manipulate DMA inputs (from peripherals to firmware). DICE is designed to be hardware-independent (i.e., no actual peripherals or DMA controllers needed) and compatible with common MCU firmware (i.e., no firmware-specific DMA usages assumed) and embedded architectures. The high-level idea behind DICE is the identification and emulation of the abstract DMA input channels, rather than the highly diverse peripherals and controllers. DICE identifies DMA input channels as the firmware writes the source and destination DMA transfer pointers into the DMA controller. Then DICE manipulates the input transferred through DMA on behalf of the firmware analyzer. DICE does not require firmware source code or additional features from firmware analyzers.We integrated DICE to the recently proposed firmware analyzer P2IM (for ARM Cortex-M architecture) and a PIC32 emulator (for MIPS M4K/M-Class architecture). We evaluated it on 83 benchmarks and sample firmware, representing 9 different DMA controllers from 5 different vendors. DICE detected 33 out of 37 DMA input channels, with 0 false positives. It correctly supplied DMA inputs to 21 out of 22 DMA buffers that firmware actually use, which previous firmware analyzers cannot achieve due to the lack of DMA emulation. DICE’s overhead is fairly low, it adds 3.4% on average to P2IM execution time. We also fuzz-tested 7 real-world firmware using DICE and compared the results with the original P2IM. DICE uncovered tremendously more execution paths (as much as 79X) and found 5 unique previously-unknown bugs that are unreachable without DMA emulation. All our source code and dataset are publicly available.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 30 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Operation Mango: Scalable Discovery of Taint-Style Vulnerabilities in Binary Firmware Services 引用了 Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
  • Operation Mango: Scalable Discovery of Taint-Style Vulnerabilities in Binary Firmware Services 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • PeriScope: An Effective Probing and Fuzzing Framework for the Hardware-OS Boundary 引用了 What You Corrupt Is Not What You Crash: Challenges in Fuzzing Embedded Devices
  • SoK: Prudent Evaluation Practices for Fuzzing 引用了 What You Corrupt Is Not What You Crash: Challenges in Fuzzing Embedded Devices
  • Inception: System-Wide Security Testing of Real-World Embedded Systems Software 引用了 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
  • Automatic Firmware Emulation through Invalidity-guided Knowledge Inference 引用了 Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
  • Automatic Firmware Emulation through Invalidity-guided Knowledge Inference 引用了 What You Corrupt Is Not What You Crash: Challenges in Fuzzing Embedded Devices
  • 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
  • From One Thousand Pages of Specification to Unveiling Hidden Bugs: Large Language Model Assisted Fuzzing of Matter IoT Devices 引用了 Automatic Firmware Emulation through Invalidity-guided Knowledge Inference
  • \mu AFL: Non-intrusive Feedback-driven Fuzzing for Microcontroller Firmware 引用了 Inception: System-Wide Security Testing of Real-World Embedded Systems Software
  • \mu AFL: Non-intrusive Feedback-driven Fuzzing for Microcontroller Firmware 引用了 Automatic Firmware Emulation through Invalidity-guided Knowledge Inference
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper30

  1. Automatic Firmware Emulation through Invalidity-guided Knowledge InferenceWei Zhou, Le Guan, Peng Liu, Yuqing ZhangUSENIX Security 2021 · 76 次引用
  2. SoK: Prudent Evaluation Practices for FuzzingMoritz Schloegel, Nils Bars, Nico Schiller, Lukas Bernhard 等S&P 2024 · 69 次引用
  3. 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 次引用
  4. μAFL\mu AFL: Non-intrusive Feedback-driven Fuzzing for Microcontroller FirmwareWenqiang Li, Jiameng Shi, Fengjun Li, Jingqiang Lin 等ICSE 2022 · 27 次引用
  5. Operation Mango: Scalable Discovery of Taint-Style Vulnerabilities in Binary Firmware ServicesWil Gibbs, Arvind S. Raj, Jayakrishna Menon Vadayath, Hui Jun Tay 等USENIX Security 2024 · 20 次引用

它引用的 Paper10

  1. SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens 等S&P 2016 · 1,085 次引用
  2. Towards Automated Dynamic Analysis for Linux-based Embedded FirmwareDaming D. Chen, Maverick Woo, David Brumley, Manuel EgeleNDSS 2016 · 428 次引用
  3. What You Corrupt Is Not What You Crash: Challenges in Fuzzing Embedded DevicesMarius Muench, Jan Stijohann, Frank Kargl, Aurélien Francillon 等NDSS 2018 · 202 次引用
  4. Inception: System-Wide Security Testing of Real-World Embedded Systems SoftwareNassim Corteggiani, Giovanni Camurati, Aurélien FrancillonUSENIX Security 2018 · 117 次引用
  5. PeriScope: An Effective Probing and Fuzzing Framework for the Hardware-OS BoundaryDokyung Song, Felicitas Hetzelt, Dipanjan Das, Chad Spensky 等NDSS 2019 · 114 次引用

相关 Paper

  1. P2IM: Scalable and Hardware-independent Firmware Testing via Automatic Peripheral Interface ModelingBo Feng, Alejandro Mera, Long LuUSENIX Security 2020
  2. DyMA-Fuzz: Dynamic Direct Memory Access Abstraction for Re-hosted Monolithic Firmware FuzzingGuy Farrelly, Michael Chesser, Seyit Camtepe, Damith C. RanasingheICSE 2026
  3. GDMA: Fully Automated DMA Rehosting via Iterative Type OverlaysTobias Scharnowski, Simeon Hoffmann, Moritz Bley, Simon Wörner 等USENIX Security 2025
  4. FlexEmu: Towards Flexible MCU Peripheral EmulationChongqing Lei, Zhen Ling, Xiangyu Xu, Shaofeng Li 等CCS 2025 · 1 次引用
  5. SHiFT: Semi-hosted Fuzz Testing for Embedded ApplicationsAlejandro Mera, Changming Liu, Ruimin Sun, Engin Kirda 等USENIX Security 2024 · 15 次引用
黄昏的海面,两侧是细线勾勒的悬崖