Lune

USENIX Security2022Top-tier venue

Trust Dies in Darkness: Shedding Light on Samsung's TrustZone Keymaster Design

Alon Shakevsky, Eyal Ronen, Avishai Wool

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

12 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE Systems cites Hardware-Backed Heist: Extracting ECDSA Keys from Qualcomm's TrustZone
  • SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE Systems cites BOOMERANG: Exploiting the Semantic Gap in Trusted Execution Environments
  • Evaluating the Security Posture of Real-World FIDO2 Deployments cites SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE Systems
  • EL3XIR: Fuzzing COTS Secure Monitors cites SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE Systems
  • EL3XIR: Fuzzing COTS Secure Monitors cites PARTEMU: Enabling Dynamic Analysis of Real-World TrustZone Software Using Emulation
  • EL3XIR: Fuzzing COTS Secure Monitors cites BOOMERANG: Exploiting the Semantic Gap in Trusted Execution Environments
  • GlobalConfusion: TrustZone Trusted Application 0-Days by Design cites SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE Systems
  • GlobalConfusion: TrustZone Trusted Application 0-Days by Design cites PARTEMU: Enabling Dynamic Analysis of Real-World TrustZone Software Using Emulation
  • GlobalConfusion: TrustZone Trusted Application 0-Days by Design cites EL3XIR: Fuzzing COTS Secure Monitors
  • GlobalConfusion: TrustZone Trusted Application 0-Days by Design cites BOOMERANG: Exploiting the Semantic Gap in Trusted Execution Environments
  • GlobalConfusion: TrustZone Trusted Application 0-Days by Design cites 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 cites 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 cites 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 cites BOOMERANG: Exploiting the Semantic Gap in Trusted Execution Environments
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers12

  1. Evaluating the Security Posture of Real-World FIDO2 DeploymentsDhruv Kuchhal, Muhammad Saad, Adam Oest, Frank LiCCS 2023 · 13 citations
  2. EL3XIR: Fuzzing COTS Secure MonitorsChristian Lindenmeier, Mathias Payer, Marcel BuschUSENIX Security 2024 · 10 citations
  3. Caveat Implementor! Key Recovery Attacks on MEGAMartin R. Albrecht, Miro Haller, Lenka Mareková, Kenneth G. PatersonEUROCRYPT 2023 · 8 citations
  4. Spill the TeA: An Empirical Study of Trusted Application Rollback Prevention on Android SmartphonesMarcel Busch, Philipp Mao, Mathias PayerUSENIX Security 2024 · 8 citations
  5. GlobalConfusion: TrustZone Trusted Application 0-Days by DesignMarcel Busch, Philipp Mao, Mathias PayerUSENIX Security 2024 · 4 citations

Builds on4

  1. SoK: Understanding the Prevailing Security Vulnerabilities in TrustZone-assisted TEE SystemsDavid Cerdeira, Nuno Santos, Pedro Fonseca, Sandro PintoS&P 2020 · 231 citations
  2. BOOMERANG: Exploiting the Semantic Gap in Trusted Execution EnvironmentsAravind Machiry, Eric Gustafson, Chad Spensky, Christopher Salls et al.NDSS 2017 · 119 citations
  3. Hardware-Backed Heist: Extracting ECDSA Keys from Qualcomm's TrustZoneKeegan RyanCCS 2019 · 90 citations
  4. PARTEMU: Enabling Dynamic Analysis of Real-World TrustZone Software Using EmulationLee Harrison, Hayawardh Vijayakumar, Rohan Padhye, Koushik Sen et al.USENIX Security 2020

Related papers

  1. CLKSCREW: Exposing the Perils of Security-Oblivious Energy ManagementAdrian Tang, Simha Sethumadhavan, Salvatore J. StolfoUSENIX Security 2017
  2. ARMageddon: Cache Attacks on Mobile DevicesMoritz Lipp, Daniel Gruss, Raphael Spreitzer, Clémentine Maurice et al.USENIX Security 2016 · 451 citations
  3. TPM-FAIL: TPM meets Timing and Lattice AttacksDaniel Moghimi, Berk Sunar, Thomas Eisenbarth, Nadia HeningerUSENIX Security 2020
  4. A Side Journey To TitanThomas Roche, Victor Lomné, Camille Mutschler, Laurent ImbertUSENIX Security 2021 · 49 citations
  5. VoltJockey: Breaching TrustZone by Software-Controlled Voltage Manipulation over Multi-core FrequenciesPengfei Qiu, Dongsheng Wang, Yongqiang Lyu, Gang QuCCS 2019 · 124 citations
Dusk over the sea between two cliffs drawn in fine vertical lines