TY - GEN
T1 - Automatic firmware emulation through invalidity-guided knowledge inference
AU - Zhou, Wei
AU - Guan, Le
AU - Liu, Peng
AU - Zhang, Yuqing
N1 - Funding Information:
We would like to thank our shepherd William Enck and the anonymous reviewers for their helpful feedback. We thank Bo Feng for providing us with the firmware samples used in P2IM [21] and kind guidance on configuring P2IM. We also thank Vitaly Chipounov for his help on adding ARM support to S2E. Wei Zhou and Yuqing Zhang were support by National Natural Science Foundation of China (U1836210) and CSC scholarship. Le Guan was supported in part by JFSG from the University of Georgia Research Foundation, Inc. Peng Liu was supported by ARO W911NF-13-1-0421 (MURI), NSF CNS-1814679, and NSF CNS-2019340.
Publisher Copyright:
© 2021 by The USENIX Association. All rights reserved.
PY - 2021
Y1 - 2021
N2 - 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 µEmu 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. µEmu achieved a passing rate of 95% in a set of unit tests for peripheral drivers without any manual assistance. We also evaluated µEmu with real-world firmware samples and new bugs were discovered.
AB - 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 µEmu 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. µEmu achieved a passing rate of 95% in a set of unit tests for peripheral drivers without any manual assistance. We also evaluated µEmu with real-world firmware samples and new bugs were discovered.
UR - http://www.scopus.com/inward/record.url?scp=85114121098&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85114121098&partnerID=8YFLogxK
M3 - Conference contribution
AN - SCOPUS:85114121098
T3 - Proceedings of the 30th USENIX Security Symposium
SP - 2007
EP - 2024
BT - Proceedings of the 30th USENIX Security Symposium
PB - USENIX Association
T2 - 30th USENIX Security Symposium, USENIX Security 2021
Y2 - 11 August 2021 through 13 August 2021
ER -