arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2007.01502cs.CR
收藏

DICE:动态固件分析用DMA输入通道的自动仿真

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

Alejandro Mera, Bo Feng, Long Lu, Engin Kirda

摘要:

基于微处理器的嵌入式设备是物联网和网络物理系统的核心。这些设备的安全性至关重要。在保护嵌入式设备的方法中,动态固件分析最近受到了极大的关注,这要归功于其离线性质和低误报率。然而,不管使用的分析和仿真技术,现有的动态固件分析仪共享一个主要的限制,即不能使用DMA处理固件。它严重限制了支持的设备类型和固件代码覆盖范围。我们提出了DICE,固件分析仪的一个下拉式解决方案,用于模拟DMA输入通道并生成或操作DMA输入。DICE被设计为与硬件无关,并与常见的MCU固件和嵌入式架构兼容。当固件将源DMA传输指针和目的DMA传输指针写入DMA控制器时,DICE识别DMA输入通道。然后,DICE代表固件分析器处理通过DMA传输的输入。我们将DICE集成到固件分析器P2 IM(Cortex-M架构)和PIC 32仿真器(MIPS M4 K/M-Class架构)中。我们在83个基准测试和样本固件上对它进行了评估,这些基准测试和样本固件代表了来自5个不同供应商的9个不同DMA控制器。DICE检测到37个DMA输入通道中的33个,误报为0。它正确地提供DMA输入到22个DMA缓冲区中的21个,这是以前的固件分析仪由于缺乏DMA仿真而无法实现的。DICE的开销相当低,它平均增加了3.4%的P2 IM执行时间。我们还使用DICE对7个真实世界的固件进行了模糊测试,并将结果与原始P2 IM进行了比较。DICE发现了更多的执行路径(多达79倍),并发现了5个独特的以前未知的错误,这些错误在没有DMA仿真的情况下无法访问。我们所有的源代码和数据集都是公开的。

英文摘要:

Microcontroller-based embedded devices are at the core of Internet-of-Things and Cyber-Physical Systems. The security of these devices is of paramount importance. Among the approaches to securing embedded devices, dynamic firmware analysis 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. 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. DICE is designed to be hardware-independent, and compatible with common MCU firmware and embedded architectures. 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. We integrated DICE to the firmware analyzer P2IM (Cortex-M architecture) and a PIC32 emulator (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, 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑