Trust Dies in Darkness: Shedding Light on Samsung's TrustZone Keymaster Design
Alon Shakevsky, Eyal Ronen, Avishai Wool
摘要
ARM-based Android smartphones rely on the TrustZone hardware support for a Trusted Execution Environment (TEE) to implement security-sensitive functions. The TEE runs a separate, isolated, TrustZone Operating System (TZOS), in parallel to Android. The implementation of the cryptographic functions within the TZOS is left to the device vendors, who create proprietary undocumented designs. In this work, we expose the cryptographic design and implementation of Android's Hardware-Backed Keystore in Samsung's Galaxy S8, S9, S10, S20, and S21 flagship devices. We reversed-engineered and provide a detailed description of the cryptographic design and code structure, and we unveil severe design flaws. We present an IV reuse attack on AES-GCM that allows an attacker to extract hardware-protected key material, and a downgrade attack that makes even the latest Samsung devices vulnerable to the IV reuse attack. We demonstrate working key extraction attacks on the latest devices. We also show the implications of our attacks on two higher-level cryptographic protocols between the TrustZone and a remote server: we demonstrate a working FIDO2 We-bAuthn login bypass and a compromise of Google's Secure Key Import. We discuss multiple flaws in the design flow of TrustZone based protocols. Although our specific attacks only apply to the ≈100 million devices made by Samsung, it raises the much more general requirement for open and proven standards for critical cryptographic and security designs.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE Systems 引用了 Hardware-Backed Heist: Extracting ECDSA Keys from Qualcomm's TrustZone
- SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE Systems 引用了 BOOMERANG: Exploiting the Semantic Gap in Trusted Execution Environments
- Evaluating the Security Posture of Real-World FIDO2 Deployments 引用了 SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE Systems
- EL3XIR: Fuzzing COTS Secure Monitors 引用了 SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE Systems
- EL3XIR: Fuzzing COTS Secure Monitors 引用了 PARTEMU: Enabling Dynamic Analysis of Real-World TrustZone Software Using Emulation
- EL3XIR: Fuzzing COTS Secure Monitors 引用了 BOOMERANG: Exploiting the Semantic Gap in Trusted Execution Environments
- GlobalConfusion: TrustZone Trusted Application 0-Days by Design 引用了 SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE Systems
- GlobalConfusion: TrustZone Trusted Application 0-Days by Design 引用了 PARTEMU: Enabling Dynamic Analysis of Real-World TrustZone Software Using Emulation
- GlobalConfusion: TrustZone Trusted Application 0-Days by Design 引用了 EL3XIR: Fuzzing COTS Secure Monitors
- GlobalConfusion: TrustZone Trusted Application 0-Days by Design 引用了 BOOMERANG: Exploiting the Semantic Gap in Trusted Execution Environments
- GlobalConfusion: TrustZone Trusted Application 0-Days by Design 引用了 Spill the TeA: An Empirical Study of Trusted Application Rollback Prevention on Android Smartphones
- Spill the TeA: An Empirical Study of Trusted Application Rollback Prevention on Android Smartphones 引用了 SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE Systems
- Spill the TeA: An Empirical Study of Trusted Application Rollback Prevention on Android Smartphones 引用了 PARTEMU: Enabling Dynamic Analysis of Real-World TrustZone Software Using Emulation
- Spill the TeA: An Empirical Study of Trusted Application Rollback Prevention on Android Smartphones 引用了 BOOMERANG: Exploiting the Semantic Gap in Trusted Execution Environments
引用它的顶会 Paper12
- Evaluating the Security Posture of Real-World FIDO2 DeploymentsDhruv Kuchhal, Muhammad Saad, Adam Oest, Frank LiCCS 2023 · 13 次引用
- EL3XIR: Fuzzing COTS Secure MonitorsChristian Lindenmeier, Mathias Payer, Marcel BuschUSENIX Security 2024 · 10 次引用
- Caveat Implementor! Key Recovery Attacks on MEGAMartin R. Albrecht, Miro Haller, Lenka Mareková, Kenneth G. PatersonEUROCRYPT 2023 · 8 次引用
- Spill the TeA: An Empirical Study of Trusted Application Rollback Prevention on Android SmartphonesMarcel Busch, Philipp Mao, Mathias PayerUSENIX Security 2024 · 8 次引用
- GlobalConfusion: TrustZone Trusted Application 0-Days by DesignMarcel Busch, Philipp Mao, Mathias PayerUSENIX Security 2024 · 4 次引用
它引用的 Paper4
- SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE SystemsDavid Cerdeira, Nuno Santos, Pedro Fonseca, Sandro PintoS&P 2020 · 231 次引用
- BOOMERANG: Exploiting the Semantic Gap in Trusted Execution EnvironmentsAravind Machiry, Eric Gustafson, Chad Spensky, Christopher Salls 等NDSS 2017 · 119 次引用
- Hardware-Backed Heist: Extracting ECDSA Keys from Qualcomm's TrustZoneKeegan RyanCCS 2019 · 90 次引用
- PARTEMU: Enabling Dynamic Analysis of Real-World TrustZone Software Using EmulationLee Harrison, Hayawardh Vijayakumar, Rohan Padhye, Koushik Sen 等USENIX Security 2020
相关 Paper
- CLKSCREW: Exposing the Perils of Security-Oblivious Energy ManagementAdrian Tang, Simha Sethumadhavan, Salvatore J. StolfoUSENIX Security 2017
- ARMageddon: Cache Attacks on Mobile DevicesMoritz Lipp, Daniel Gruss, Raphael Spreitzer, Clémentine Maurice 等USENIX Security 2016 · 451 次引用
- TPM-FAIL: TPM meets Timing and Lattice AttacksDaniel Moghimi, Berk Sunar, Thomas Eisenbarth, Nadia HeningerUSENIX Security 2020
- VoltJockey: Breaching TrustZone by Software-Controlled Voltage Manipulation over Multi-core FrequenciesPengfei Qiu, Dongsheng Wang, Yongqiang Lyu, Gang QuCCS 2019 · 124 次引用
- A Side Journey To TitanThomas Roche, Victor Lomné, Camille Mutschler, Laurent ImbertUSENIX Security 2021 · 49 次引用
