Understanding the Security of ARM Debugging Features
Zhenyu Ning and Fengwei Zhang
COMPASS Lab Wayne State University
May 21, 2019
Understanding the Security of ARM Debugging Features, S&P 19 1
Understanding the Security of ARM Debugging Features Zhenyu Ning and - - PowerPoint PPT Presentation
Understanding the Security of ARM Debugging Features Zhenyu Ning and Fengwei Zhang COMPASS Lab Wayne State University May 21, 2019 Understanding the Security of ARM Debugging Features, S&P 19 1 Outline Introduction Obstacles in
COMPASS Lab Wayne State University
Understanding the Security of ARM Debugging Features, S&P 19 1
◮ Introduction ◮ Obstacles in Traditional Debugging Model ◮ Nailgun Attack ◮ Mitigations ◮ Conclusion
Understanding the Security of ARM Debugging Features, S&P 19 2
◮ Introduction ◮ Obstacles for Traditional Debugging Model ◮ Nailgun Attack ◮ Mitigations ◮ Conclusion
Understanding the Security of ARM Debugging Features, S&P 19 3
Understanding the Security of ARM Debugging Features, S&P 19 4
Understanding the Security of ARM Debugging Features, S&P 19 5
Understanding the Security of ARM Debugging Features, S&P 19 6
Understanding the Security of ARM Debugging Features, S&P 19 7
Understanding the Security of ARM Debugging Features, S&P 19 8
◮ Obstacle 1: Physical access. ◮ Obstacle 2: Debug authentication.
Understanding the Security of ARM Debugging Features, S&P 19 9
◮ Obstacle 1: Physical access. ◮ Obstacle 2: Debug authentication.
Understanding the Security of ARM Debugging Features, S&P 19 10
◮ Introduction ◮ Obstacles for Traditional Debugging Model ◮ Nailgun Attack ◮ Mitigations ◮ Conclusion
Understanding the Security of ARM Debugging Features, S&P 19 11
◮ Obstacle 1: Physical access. ◮ Obstacle 2: Debug authentication.
Understanding the Security of ARM Debugging Features, S&P 19 12
◮ Memory-mapped debugging registers.
◮ No JTAG, No physical access.
Understanding the Security of ARM Debugging Features, S&P 19 13
◮ Obstacle 1: Physical access. ◮ Obstacle 2: Debug authentication.
Understanding the Security of ARM Debugging Features, S&P 19 14
Understanding the Security of ARM Debugging Features, S&P 19 15
Understanding the Security of ARM Debugging Features, S&P 19 16
Understanding the Security of ARM Debugging Features, S&P 19 17
Understanding the Security of ARM Debugging Features, S&P 19 18
Understanding the Security of ARM Debugging Features, S&P 19 19
◮ ARM licenses technology to the SoC Vendors.
◮ Defines the debug authentication signals.
Understanding the Security of ARM Debugging Features, S&P 19 20
◮ The SoC Vendors develop chips for the OEMs.
◮ Implement the debug authentication signals.
Understanding the Security of ARM Debugging Features, S&P 19 21
◮ The OEMs produce devices for the users.
◮ Configure the debug authentication signals.
Understanding the Security of ARM Debugging Features, S&P 19 22
◮ Finally, the User can enjoy the released devices.
◮ Learn the status debug authentication signals.
Understanding the Security of ARM Debugging Features, S&P 19 23
◮ What is the status of the signals in real-world device? ◮ How to manage the signals in real-world device?
Understanding the Security of ARM Debugging Features, S&P 19 24
Category Platform / Device Debug Authentication Signals DBGEN NIDEN SPIDEN SPNIDEN Development Boards ARM Juno r1 Board ✔ ✔ ✔ ✔ NXP i.MX53 QSB ✖ ✔ ✖ ✖ IoT Devices Raspberry PI 3 B+ ✔ ✔ ✔ ✔ Cloud Platforms 64-bit ARM miniNode ✔ ✔ ✔ ✔ Packet Type 2A Server ✔ ✔ ✔ ✔ Scaleway ARM C1 Server ✔ ✔ ✔ ✔ Google Nexus 6 ✖ ✔ ✖ ✖ Samsung Galaxy Note 2 ✔ ✔ ✖ ✖ Mobile Devices Huawei Mate 7 ✔ ✔ ✔ ✔ Motorola E4 Plus ✔ ✔ ✔ ✔ Xiaomi Redmi 6 ✔ ✔ ✔ ✔
Understanding the Security of ARM Debugging Features, S&P 19 25
Category Platform / Device Debug Authentication Signals DBGEN NIDEN SPIDEN SPNIDEN Development Boards ARM Juno r1 Board ✔ ✔ ✔ ✔ NXP i.MX53 QSB ✖ ✔ ✖ ✖ IoT Devices Raspberry PI 3 B+ ✔ ✔ ✔ ✔ Cloud Platforms 64-bit ARM miniNode ✔ ✔ ✔ ✔ Packet Type 2A Server ✔ ✔ ✔ ✔ Scaleway ARM C1 Server ✔ ✔ ✔ ✔ Google Nexus 6 ✖ ✔ ✖ ✖ Samsung Galaxy Note 2 ✔ ✔ ✖ ✖ Mobile Devices Huawei Mate 7 ✔ ✔ ✔ ✔ Motorola E4 Plus ✔ ✔ ✔ ✔ Xiaomi Redmi 6 ✔ ✔ ✔ ✔
Understanding the Security of ARM Debugging Features, S&P 19 26
Category Platform / Device Debug Authentication Signals DBGEN NIDEN SPIDEN SPNIDEN Development Boards ARM Juno r1 Board ✔ ✔ ✔ ✔ NXP i.MX53 QSB ✖ ✔ ✖ ✖ IoT Devices Raspberry PI 3 B+ ✔ ✔ ✔ ✔ Cloud Platforms 64-bit ARM miniNode ✔ ✔ ✔ ✔ Packet Type 2A Server ✔ ✔ ✔ ✔ Scaleway ARM C1 Server ✔ ✔ ✔ ✔ Google Nexus 6 ✖ ✔ ✖ ✖ Samsung Galaxy Note 2 ✔ ✔ ✖ ✖ Mobile Devices Huawei Mate 7 ✔ ✔ ✔ ✔ Motorola E4 Plus ✔ ✔ ✔ ✔ Xiaomi Redmi 6 ✔ ✔ ✔ ✔
Understanding the Security of ARM Debugging Features, S&P 19 27
◮ For both development boards with manual, we cannot fully
◮ In some mobile phones, we find that the signals are controlled
Understanding the Security of ARM Debugging Features, S&P 19 28
◮ We don’t need physical access to debug a processor. ◮ The debug authentication also allows us to debug the
Understanding the Security of ARM Debugging Features, S&P 19 29
◮ Introduction ◮ Obstacles for Traditional Debugging Model ◮ Nailgun Attack ◮ Mitigations ◮ Conclusion
Understanding the Security of ARM Debugging Features, S&P 19 30
Understanding the Security of ARM Debugging Features, S&P 19 31
Understanding the Security of ARM Debugging Features, S&P 19 32
TARGET (Normal State) (High Privilege) HOST (Normal State) (High Privilege) High-privilege Resource (Secure RAM/Register/Peripheral) Low-privilege Resource (Non-Secure RAM/Register/Peripheral) Privilege Escalation Request
◮ Two processors as HOST and TARGET, respectively. ◮ Low-privilege and High-privilege resource.
Understanding the Security of ARM Debugging Features, S&P 19 33
TARGET (Normal State) (High Privilege) HOST (Normal State) (High Privilege) High-privilege Resource (Secure RAM/Register/Peripheral) Low-privilege Resource (Non-Secure RAM/Register/Peripheral) Privilege Escalation Request
◮ Low-privilege refers to non-secure kernel-level privilege ◮ High-privilege refers to any other higher privilege
Understanding the Security of ARM Debugging Features, S&P 19 34
TARGET (Normal State) (Low Privilege) HOST (Normal State) (Low Privilege) High-privilege Resource (Secure RAM/Register/Peripheral) Low-privilege Resource (Non-Secure RAM/Register/Peripheral) Debug Request
◮ Normal state ◮ Low-privilege mode
Understanding the Security of ARM Debugging Features, S&P 19 35
TARGET (Normal State) (Low Privilege) HOST (Normal State) (Low Privilege) High-privilege Resource (Secure RAM/Register/Peripheral) Low-privilege Resource (Non-Secure RAM/Register/Peripheral) Debug Request
◮ TARGET checks its authentication signal. ◮ Privilege of HOST is ignored.
Understanding the Security of ARM Debugging Features, S&P 19 36
TARGET (Debug State) (Low Privilege) HOST (Normal State) (Low Privilege) High-privilege Resource (Secure RAM/Register/Peripheral) Low-privilege Resource (Non-Secure RAM/Register/Peripheral) Debug Request
◮ Low-privilege mode ◮ No access to high-privilege resource
Understanding the Security of ARM Debugging Features, S&P 19 37
TARGET (Debug State) (Low Privilege) HOST (Normal State) (Low Privilege) High-privilege Resource (Secure RAM/Register/Peripheral) Low-privilege Resource (Non-Secure RAM/Register/Peripheral) Privilege Escalation Request
◮ e.g., executing DCPS series instructions. ◮ The instructions can be executed at any privilege level.
Understanding the Security of ARM Debugging Features, S&P 19 38
TARGET (Debug State) (High Privilege) HOST (Normal State) (Low Privilege) High-privilege Resource (Secure RAM/Register/Peripheral) Low-privilege Resource (Non-Secure RAM/Register/Peripheral) Privilege Escalation Request
◮ Debug state, high-privilege mode ◮ Gained access to high-privilege resource
Understanding the Security of ARM Debugging Features, S&P 19 39
TARGET (Debug State) (High Privilege) HOST (Normal State) (Low Privilege) High-privilege Resource (Secure RAM/Register/Peripheral) Low-privilege Resource (Non-Secure RAM/Register/Peripheral) Resource Access Request
◮ e.g., accessing secure RAM/register/peripheral. ◮ Privilege of HOST is ignored.
Understanding the Security of ARM Debugging Features, S&P 19 40
TARGET (Debug State) (High Privilege) HOST (Normal State) (Low Privilege) High-privilege Resource (Secure RAM/Register/Peripheral) Low-privilege Resource (Non-Secure RAM/Register/Peripheral) Debug Response
◮ i.e., content of the high-privilege resource. ◮ Privilege of HOST is ignored.
Understanding the Security of ARM Debugging Features, S&P 19 41
TARGET (Debug State) (High Privilege) HOST (Normal State) (Low Privilege) High-privilege Resource (Secure RAM/Register/Peripheral) Low-privilege Resource (Non-Secure RAM/Register/Peripheral) Debug Response
◮ Normal state ◮ Low-privilege mode
Understanding the Security of ARM Debugging Features, S&P 19 42
◮ Achieve access to high-privilege resource via misusing the
◮ Can be used to craft different attacks.
Understanding the Security of ARM Debugging Features, S&P 19 43
◮ Deivce: Huawei Mate 7 (MT-L09) ◮ Firmware: MT7-L09V100R001C00B121SP05 ◮ Fingerprint sensor: FPC1020
Understanding the Security of ARM Debugging Features, S&P 19 44
◮ By reverse engineering, we learn the address to store
◮ With Nailgun, we extract the fingerprint data from secure
◮ Finally, the fingerprint image is reconstructed from the data
Understanding the Security of ARM Debugging Features, S&P 19 45
◮ The right part of the image is blurred for privacy concerns. ◮ Source code: https://compass.cs.wayne.edu/nailgun/
Understanding the Security of ARM Debugging Features, S&P 19 46
◮ Introduction ◮ Obstacles for Traditional Debugging Model ◮ Nailgun Attack ◮ Mitigations ◮ Conclusion
Understanding the Security of ARM Debugging Features, S&P 19 47
Understanding the Security of ARM Debugging Features, S&P 19 48
◮ Existing tools rely on the debug authentication signals.
◮ Unavailable management mechanisms. ◮ OTP feature, cost, and maintenance.
Understanding the Security of ARM Debugging Features, S&P 19 49
◮ For ARM, additional restriction in inter-processor debugging
◮ For SoC vendors, refined signal management and
◮ For OEMs and cloud providers, software-based access control.
Understanding the Security of ARM Debugging Features, S&P 19 50
◮ Introduction ◮ Obstacles for Traditional Debugging Model ◮ Nailgun Attack ◮ Mitigations ◮ Conclusion
Understanding the Security of ARM Debugging Features, S&P 19 51
◮ We present a study on the security of hardware debugging
◮ It shows that the ”known-safe” or ”assumed-safe” component
◮ We suggest a comprehensive rethink on the security of legacy
Understanding the Security of ARM Debugging Features, S&P 19 52
[1] IEEE, “Standard for test access port and boundary-scan architecture,” https://standards.ieee.org/findstds/standard/1149.1-2013.html. [2]
experience in testing the security of real-world electronic voting systems,” IEEE Transactions on Software Engineering, 2010. [3]
(still) can’t encrypt: A security analysis of the APCO project 25 two-way radio system,” in Proceedings of the 20th USENIX Security Symposium (USENIX Security’11), 2011. [4]
Proceedings of the 10th European Workshop on Systems Security (EuroSec’17), 2017. [5]
embedded systems software,” in Proceedings of the 27th USENIX Security Symposium (USENIX Security’18), 2018. [6]
malware knows physics! Attacking PLCs with physical model aware rootkit,” in Proceedings of 24th Network and Distributed System Security Symposium (NDSS’17), 2017. [7]
embedded systems,” in Proceedings of the 9th USENIX Workshop on Offensive Technologies (WOOT’15), 2015. [8]
Security and Privacy (HASP’15), 2015. [9]
app platform,” in Proceedings of the 10th USENIX Workshop on Offensive Technologies (WOOT’16), 2016. Understanding the Security of ARM Debugging Features, S&P 19 53
[10]
26th USENIX Security Symposium (USENIX Security’17), 2017. [11]
analysis of embedded systems’ firmwares,” in Proceedings of 21st Network and Distributed System Security Symposium (NDSS’14), 2014. Understanding the Security of ARM Debugging Features, S&P 19 54
Understanding the Security of ARM Debugging Features, S&P 19 55
Understanding the Security of ARM Debugging Features, S&P 19 56
◮ 64-bit ARMv8 architecture: ARM Juno r1 board.
◮ 32-bit ARMv8 architecture: Raspberry PI Model 3 B+.
◮ ARMv7 architecture: Huawei Mate 7.
Understanding the Security of ARM Debugging Features, S&P 19 57
Understanding the Security of ARM Debugging Features, S&P 19 58
Understanding the Security of ARM Debugging Features, S&P 19 59
Understanding the Security of ARM Debugging Features, S&P 19 60
Understanding the Security of ARM Debugging Features, S&P 19 61
Understanding the Security of ARM Debugging Features, S&P 19 62
◮ March 2018: Preliminary findings are reported to ARM. ◮ August 2018: Report to ARM with enriched result. ◮ August 2018: Report our findings to related OEMs. ◮ October 2018: Issue is reported to MITRE. ◮ February 2019: PoCs and demos are released. ◮ April 2019: CVE-2018-18068 is released.
Understanding the Security of ARM Debugging Features, S&P 19 63