[論文レビュー] DICE: Automatic Emulation of DMA Input Channels for Dynamic Firmware Analysis
DICE は、ハードウェア依存性およびアナライザー依存性のないフレームワークであり、動的解析中に埋め込みファームウェア内の DMA 入力チャネルを自動で特定・エミュレートすることで、ソースコードやハードウェアを必要とせずに完全なコードカバレッジと脆弱性検出を実現する。DICE は DMA チャネルの 89% を真陽性で検出しており、実世界のファームウェアではコードパスカバレッジを最大 79X 向上させ、以前に未知のバグが 5 つ発見された。
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.
研究の動機と目的
- 既存のツールが DMA ベースの入力チャネルを処理できないという動的ファームウェア解析における重要な制限を解消すること。
- ファームウェアのソースコードやハードウェア依存性を必要とせずに、DMA 対応 MCU ファームウェアにおける完全なコードカバレッジと脆弱性検出を可能にすること。
- 多様な埋め込みアーキテクチャや DMA コントローラーと互換性を持つ汎用的でハードウェアに依存しないソリューションを設計すること。
- 既存のファームウェアアナライザーにドロップインモジュールとしてシームレスに統合され、DMA 入力の自動エミュレーションが可能になること。
- エミュレーション中に動的に DMA 入力を検出し、適切なデータを供給することで、ファームウェアの実行が正しく進行すること。
提案手法
- DICE は、DMA コントローラーのレジスタへの書き込み、特にソースおよびデスティネーション転送ポインタの書き込みを監視することで、DMA 入力チャネルを特定する。
- 実行中のエミュレーション中にこれらのレジスタ書き込みを分析することで、DMA トランスファに使用されるメモリバッファの位置とサイズを動的に推定する。
- ファームウェアアナライザーの代わりに DMA 入力データをエミュレートし、実際の周辺機器が書き込んだかのようにメモリバッファに適切なデータを供給する。
- ファームウェアの変更やソースコードの必要性がなく、あらゆるファームウェアアナライザーおよび埋め込みアーキテクチャと互換性を持つ。
- P 2 IM や MIPS PIC32 エミュレータなどの既存のエミュレータと統合され、DMA 入力サポートを透明に提供する。
- 実行時インストルメンテーションを用いて、ファームウェア実行中に DMA 設定およびデータ転送イベントを検出する。
実験結果
リサーチクエスチョン
- RQ1汎用的でハードウェアに依存しないフレームワークは、ソースコードなしで埋め込みファームウェア内の DMA 入力チャネルを自動で検出し、エミュレートできるか?
- RQ2このようなフレームワークは、ファームウェア実行中に動的に設定された DMA バッファをどれほど正確に特定できるか?
- RQ3既存のファームウェア解析パイプラインに DMA エミュレーションを統合した際のパフォーマンスオーバーヘッドはどの程度か?
- RQ4DMA エミュレーションは、実世界のファームウェアにおいてコードパスカバレッジと脆弱性検出をどの程度向上させるか?
- RQ5DMA 依存のファームウェアにおいて、DMA エミュレーションがなければ到達不可能な、以前に未知のバグをフレームワークが発見できるか?
主な発見
- DICE は 83 のベンチマークおよびサンプルファームウェアにおいて、37 個の DMA 入力チャネルのうち 33 個を検出し、偽陽性率 0%、真陽性率 89% を達成した。
- ファームウェアが実際に使用した 22 個の DMA バッファのうち 21 個に対して、正しく DMA 入力を供給し、以前に到達不可能だったコードの実行を可能にした。
- P 2 IM に DICE を統合した結果、実行時間に平均 3.4% のオーバーヘッドしか発生しなかった。
- 実ファームウェアのファズィングにおいて、DICE は DMA サポートなしの元の P 2 IM と比較して、コードパスカバレッジを最大 79X 向上させた。
- DICE は、DMA エミュレーションが欠如していたために従来のアナライザーでは到達できなかった、5 つのユニークで以前に未知の脆弱性を発見した。
- すべてのソースコードおよびデータセットは公開されており、再現性とファームウェア解析分野におけるさらなる研究を支援する。
より良い研究を、今すぐ始めましょう
論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。