Conware: Automated Modeling of Hardware Peripherals
2021, Proceedings of the 2021 ACM Asia Conference on Computer and Communications Security
https://doi.org/10.1145/3433210.3437532Abstract
Emulation is at the core of many security analyses. However, emulating embedded systems is still not possible in most cases. To facilitate this critical analysis, we present Conware, a hardware emulation framework that can automatically generate models for hardware peripherals, which alleviates one of the major challenges currently hindering embedded systems emulation. Conware enables individual peripherals to be modeled, exported, and combined with other peripherals in a pluggable fashion. Conware achieves this by first obtaining a recording of the low-level hardware interactions between the firmware and the peripheral, using either existing methods or our source-code instrumentation technique. These recordings are then used to create high-fidelity automata representations of the peripheral using novel automata-generation techniques. The various models can then be merged to facilitate full-system emulation of any embedded firmware that uses any of the modeled peripherals, even if t...
References (39)
- Open Review Mobicomm 2020. [n.d.]. Device-agnostic Firmware Execution is Possible: A Concolic Execution Approach for Peripheral Emulation. https: //openreview.net/pdf?id=rylaZ6iIDr.
- Altium. 2017. NEC Infrared Transmission Protocol. https://techdocs.altium.com/ display/FPGA/NEC+Infrared+Transmission+Protocol.
- Atmel. 2015. SAM3X/ SAM3A Series (DATASHEET). https://ww1.microchip.com/ downloads/en/DeviceDoc/Atmel-11057-32-bit-Cortex-M3-Microcontroller- SAM3X-SAM3A_Datasheet.pdf.
- BARRAGAN. 2013. Sweep. https://www.arduino.cc/en/Tutorial/Sweep.
- Fabrice Bellard. 2005. QEMU, a fast and portable dynamic translator.. In USENIX Annual Technical Conference, FREENIX Track, Vol. 41. 46.
- Jacob Beningo. 2016. Prototype to production: Arduino for the professional. https://www.edn.com/prototype-to-production-arduino-for-the-professional/.
- Duane Benson. 2015. Arduino as a rapid prototyping system. https://www. embedded.com/arduino-as-a-rapid-prototyping-system/.
- Daming D Chen, Maverick Woo, David Brumley, and Manuel Egele. 2016. To- wards Automated Dynamic Analysis for Linux-based Embedded Firmware.. In Proceedings of the Network and Distributed System Security Symposium (NDSS), Vol. 16. 1-16.
- Abraham Clements, Eric Gustafson, Tobias Scharnowski, Paul Grosen, David Fritz, Christopher Kruegel, Giovanni Vigna, Saurabh Bagchi, and Mathias Payer. 2020. HALucinator: Firmware Re-hosting through Abstraction Layer Emulation. Proceedings of the 29th USENIX Security Symposium (USENIX '20) (2020).
- Furkan Comert and Tolga Ovatman. 2015. Attacking state space explosion prob- lem in model checking embedded TV software. IEEE Transactions on Consumer Electronics 61, 4 (2015), 572-579.
- Brendan Dolan-Gavitt, Josh Hodosh, Patrick Hulin, Tim Leek, and Ryan Whelan. 2015. Repeatable reverse engineering with PANDA. In Proceedings of the 5th Program Protection and Reverse Engineering Workshop. 1-11.
- Bo Feng, Alejandro Mera, and Long Lu. 2020. P 2 IM: Scalable and Hardware- independent Firmware Testing via Automatic Peripheral Interface Modeling (extended version). Proceedings of the 29th USENIX Security Symposium (USENIX '20) (2020).
- Jack Ganssle. 2004. Reentrancy. In The Firmware Handbook. Elsevier, 231-244.
- Geeetech. 2012. Arduino IR Remote Control. http://www.geeetech.com/wiki/ index.php/Arduino_IR_Remote_Control.
- Giovani Gracioli and Sebastian Fischmeister. 2012. Tracing and recording in- terrupts in embedded software. Journal of Systems Architecture 58, 9 (2012), 372-385.
- Joe Grand and July Friday. 2004. Advanced hardware hacking techniques. DEF- CON 12 (2004), 59.
- Eric Gustafson, Marius Muench, Chad Spensky, Nilo Redini, Aravind Machiry, Yanick Fratantonio, Davide Balzarotti, Aurelien Francillon, Yung Ryn Choe, Christophe Kruegel, et al. 2019. Toward the Analysis of Embedded Firmware through Automated Re-hosting. In 22nd International Symposium on Research in Attacks, Intrusions and Defenses (RAID 2019). 135-150.
- Lee Harrison, Hayawardh Vijayakumar, Rohan Padhye, Koushik Sen, Michael Grace, Rohan Padhye, Caroline Lemieux, Koushik Sen, Laurent Simon, Hayawardh Vijayakumar, et al. 2020. Partemu: Enabling dynamic analysis of real-world trustzone software using emulation. In Proceedings of the 29th USENIX Security Symposium (USENIX '20).
- John Hopcroft. 1971. An n log n algorithm for minimizing states in a finite automaton. In Theory of machines and computations. Elsevier, 189-196.
- Markus Kammerstetter, Daniel Burian, and Wolfgang Kastner. 2016. Embedded security testing with peripheral device caching and runtime program state ap- proximation. In 10th International Conference on Emerging Security Information, Systems and Technologies (SECUWARE).
- Markus Kammerstetter, Christian Platzer, and Wolfgang Kastner. 2014. Prospect: peripheral proxying supported embedded code testing. In Proceedings of the 9th ACM symposium on Information, computer and communications security. 329-340.
- Karl Koscher, Tadayoshi Kohno, and David Molnar. 2015. SURROGATES: Enabling near-real-time dynamic analyses of embedded systems. In 9th USENIX Workshop on Offensive Technologies (WOOT '15).
- Chris Lattner. 2008. LLVM and Clang: Next generation compiler technology. In The BSD conference, Vol. 5.
- Chris Lattner and Vikram Adve. 2004. LLVM: A compilation framework for lifelong program analysis & transformation. In International Symposium on Code Generation and Optimization, 2004. CGO 2004. IEEE, 75-86.
- ARM Limited. 2010. Cortex-M3 Technical Reference Manual (Revision
- Peter S Magnusson, Magnus Christensson, Jesper Eskilson, Daniel Forsgren, Gustav Hallberg, Johan Hogberg, Fredrik Larsson, Andreas Moestedt, and Bengt Werner. 2002. Simics: A full system simulation platform. Computer 35, 2 (2002), 50-58.
- Marius Muench, Dario Nisi, Aurélien Francillon, and Davide Balzarotti. 2018. Avatar2: A multi-target orchestration platform. In Workshop on Binary Analysis Research (Colocated with NDSS Symposium), Vol. 18. 1-11.
- Marius Muench, Jan Stijohann, Frank Kargl, Aurélien Francillon, and Davide Balzarotti. 2018. What You Corrupt Is Not What You Crash: Challenges in Fuzzing Embedded Devices.. In Proceedings of the Network and Distributed System Security Symposium (NDSS).
- Osbourne, Paul. [n.d.].
- CMSIS-SVD Repository and Parsers. https://github.com/ posborne/cmsis-svd.
- Ivan Pustogarov, Qian Wu, and David Lie. [n.d.].
- Ex-vivo dynamic analysis framework for Android device drivers. ([n. d.]).
- Nilo Redini, Aravind Machiry, Ruoyu Wang, Chad Spensky, Andrea Continella, Yan Shoshitaishvili, Christopher Kruegel, and Giovanni Vigna. 2020. KARONTE: Detecting Insecure Multi-binary Interactions in Embedded Firmware. In 2020 IEEE Symposium on Security and Privacy (SP). 431-448.
- Miro Samek. 2016. State Machines for Event-Driven Systems. https://barrgroup. com/embedded-systems/how-to/state-machines-event-driven-systems.
- Yan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens, Mario Polino, Andrew Dutcher, John Grosen, Siji Feng, Christophe Hauser, Christopher Kruegel, et al. 2016. Sok:(state of) the art of war: Offensive techniques in binary analysis. In 2016 IEEE Symposium on Security and Privacy (SP). IEEE, 138-157.
- Dokyung Song, Felicitas Hetzelt, Dipanjan Das, Chad Spensky, Yeoul Na, Stijn Volckaert, Giovanni Vigna, Christopher Kruegel, Jean-Pierre Seifert, and Michael Franz. 2019. PeriScope: An Effective Probing and Fuzzing Framework for the Hardware-OS Boundary.. In Proceedings of the Network and Distributed System Security Symposium (NDSS).
- Seyed Mohammadjavad Seyed Talebi, Hamid Tavakoli, Hang Zhang, Zheng Zhang, Ardalan Amiri Sani, and Zhiyun Qian. 2018. Charm: Facilitating dynamic analysis of device drivers of mobile systems. In 27th USENIX Security Symposium (USENIX '18). 291-307.
- LLC. Where Labs. 2019. Bus Pirate. http://dangerousprototypes.com/docs/Bus_ Pirate.
- Jonas Zaddach, Luca Bruno, Aurelien Francillon, Davide Balzarotti, et al. 2014. AVATAR: A Framework to Support Dynamic Security Analysis of Embedded Systems' Firmwares.. In Proceedings of the Network and Distributed System Security Symposium (NDSS), Vol. 14. 1-16.