iTimed: Cache Attacks on the Apple A10 Fusion SoC

Gregor Haas, Seetal Potluri, Aydin Aysu

TL;DR

This paper presents the first cache timing side-channel attack on Apple's A10 Fusion SoC, enabling researchers to probe the security of iPhones. By leveraging the checkm8 exploit and developing a novel toolkit, the authors successfully reverse-engineered key microarchitectural details of the A10's memory hierarchy and demonstrated a significantly improved cache timing attack that reduces AES-128 security by up to 50 bits.

What Problem Does This Paper Address?

Apple's tightly integrated hardware and software ecosystem, coupled with a lack of public documentation, makes security research on their devices exceptionally challenging. Specifically, performing dynamic analysis and hardware security experiments on iPhones has been largely unexplored due to these "black box" characteristics. Side-channel attacks (SCAs), which exploit physical leakage from a device, are particularly difficult to implement on Apple's SoCs because their scheduling interfaces are not exposed to developers, making timing-based SCAs, like cache timing attacks, a significant hurdle. This paper aims to bridge this gap by providing a robust toolkit and demonstrating a practical cache timing attack on an Apple SoC.

Methods

The core of this work lies in the development of a novel research toolkit called iTimed, built upon the checkm8 BootROM exploit. This toolkit provides enhanced reliability and extensibility for hardware security experiments on iPhones. Key methodological contributions include:

  • Expanded checkm8 Toolkit: The authors re-implemented the checkm8 exploit with improvements for reliability and system stability. They addressed the probabilistic nature of checkm8's partial USB transactions by using an Arduino with a USB host shield as a proxy, ensuring correct partial requests. This also provides an extensible platform for running custom payloads.
  • Reverse Engineering the A10 Memory Hierarchy: Using the iTimed toolkit, the authors were able to reverse-engineer crucial microarchitectural details of the Apple A10 Fusion SoC, including its randomized cache-line replacement policy and a hardware-based L1 prefetcher.
  • Access-Driven Cache Timing Attack (iTimed): The paper adapts the PRIME+PROBE cache timing attack strategy. However, a direct application of PRIME+PROBE on the A10 SoC is hindered by its specific microarchitecture, particularly the prefetcher. To overcome this, the authors introduce two key modifications:
  • Platform-Specific Attack Modifications: To counter the prefetcher's tendency to evict target data, they employ a randomized prime and probe strategy using the A10's ARM NEON floating-point unit registers. This avoids auxiliary memory accesses that would otherwise add noise.
  • Statistical Modifications: A novel constraint-based statistical technique is proposed to handle false positives caused by the prefetcher. This method leverages "true negatives" (cache sets that are not accessed) and is more tolerant of false positives, leading to more accurate key deduction.

Datasets

The paper does not explicitly mention or introduce new benchmark datasets for training. Instead, the evaluation is performed on a real Apple A10 Fusion SoC (iPhone 7) running OpenSSL 1.1.1d. The "dataset" consists of timing measurements collected from AES-128 encryptions using known plaintexts and a single unknown key. The authors generated 16384 traces for each of 16384 random plaintexts for their experiments.

Key Insights and Ideas

  • Apple's "Black Box" is Crackable: The paper demonstrates that even with Apple's strong security measures and lack of documentation, it's possible to perform deep hardware security research by leveraging exploits like checkm8.
  • Prefetchers are a Double-Edged Sword: While prefetchers are designed to improve performance, they can inadvertently aid attackers by causing cache misses that reveal information about the target's memory accesses. However, they also introduce false positives that can confuse naive attacks.
  • Randomization is Key for Modern SoCs: The A10's sophisticated microarchitecture, including its randomized cache replacement and prefetcher, necessitates more advanced attack techniques than those used for simpler architectures. Randomizing the attack's access patterns is crucial to avoid being predictable by these features.
  • Statistical Analysis is Critical: The effectiveness of cache timing attacks hinges on robust statistical analysis. The paper highlights how adapting statistical methods to account for specific hardware features (like prefetchers) can significantly improve attack performance.
  • T-table Alignment Matters: The authors found that t-tables not aligned to cache block boundaries can leak more information, making them more vulnerable to timing attacks.

Key Results

  • The developed iTimed toolkit successfully enables hardware security experiments on Apple SoCs.
  • The modified PRIME+PROBE attack, accounting for the A10's microarchitecture, significantly outperforms the original technique.
  • The attack can reduce the security level of OpenSSL AES-128 by up to 50 more bits than a straightforward adaptation of PRIME+PROBE.
  • The improved attack requires approximately half as many side channel measurement traces to achieve comparable results.
  • The paper demonstrates that the attack can reduce the key search-space, making exhaustive key search more feasible. For example, with 256 plaintexts and 4096 traces each, the attack recovers 37 more bits of key material compared to classical methods.

Limitations and Future Work

  • Co-location Requirement: The current attack instantiation requires the attacker to be co-located on the same core as the victim. While cross-core attacks (e.g., through L2 cache) are acknowledged as possible, they were not pursued to simplify the initial reverse-engineering efforts.
  • Focus on PRIME+PROBE: The paper primarily focuses on adapting the PRIME+PROBE attack style as a canonical example. While the statistical methods are generalizable, further work could explore other access-driven attack styles.
  • Future Work Suggestions:
    • Investigate cross-core attack styles (e.g., L2 cache).
  • Explore other microarchitectural side-channel attacks on Apple SoCs, such as those targeting branch predictors or TLBs.
  • Analyze Apple's mitigations for speculative execution attacks (Meltdown, Spectre).
  • Investigate fault attacks and rowhammer attacks on Apple devices.
  • Extend the research platform to explore the iOS software environment for access-driven attacks.

Summary updated

Abstract

This paper proposes the first cache timing side-channel attack on one of Apple’s mobile devices. Utilizing a recent, permanent exploit named checkm8, we reverse-engineered Apple’s BootROM and created a powerful toolkit for running arbitrary hardware security experiments on Apple’s in-house designed ARM systems-on-a-chip (SoC). Using this toolkit, we then implement an access-driven cache timing attack (in the style of PRIME+PROBE) as a proof-of-concept illustrator. The advanced hardware control enabled by our toolkit allowed us to reverse-engineer key microarchitectural details of the Apple A10 Fusion’s memory hierarchy. We find that the SoC employs a randomized cache-line replacement policy as well as a hardware-based L1 prefetcher. We propose statistical innovations which specifically account for these hardware structures and thus further the state-of-the-art in cache timing attacks. We find that our access-driven attack, at best, can reduce the security of OpenSSL AES-128 by 50 more bits than a straightforward adaptation of PRIME+PROBE, while requiring only half as many side channel measurement traces.
BibTeX
@article{haas2021itimed,
  author = {Gregor Haas and Seetal Potluri and Aydin Aysu},
  title = {{iTimed: Cache Attacks on the Apple A10 Fusion SoC}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2021},
}

Loading related content...

Figure