Automatic Firmware Emulation through Invalidity-guided Knowledge Inference (Extended Version)

07/16/2021
by   Wei Zhou, et al.
0

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 for peripheral drivers without any manual assistance. We also evaluated uEmu with real-world firmware samples and new bugs were discovered.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/16/2022

What Your Firmware Tells You Is Not How You Should Emulate It: A Specification-Guided Approach for Firmware Emulation

Emulating firmware of microcontrollers is challenging due to the lack of...
research
09/24/2021

Finding Taint-Style Vulnerabilities in Linux-based Embedded Firmware with SSE-based Alias Analysis

Although the importance of using static analysis to detect taint-style v...
research
07/23/2019

Enhancing Dynamic Symbolic Execution by Automatically Learning Search Heuristics

We present a technique to automatically generate search heuristics for d...
research
05/23/2019

SynFuzz: Efficient Concolic Execution via Branch Condition Synthesis

Concolic execution is a powerful program analysis technique for explorin...
research
07/13/2020

BoxE: A Box Embedding Model for Knowledge Base Completion

Knowledge base completion (KBC) aims to automatically infer missing fact...
research
07/08/2019

Neutaint: Efficient Dynamic Taint Analysis with Neural Networks

Dynamic taint analysis (DTA) is widely used by various applications to t...
research
09/13/2019

P^2IM: Scalable and Hardware-independent Firmware Testing via Automatic Peripheral Interface Modeling (extended version)

Dynamic testing or fuzzing of embedded firmware is severely limited by h...

Please sign up or login with your details

Forgot password? Click here to reset