On the Feasibility of Large-Scale Infections of iOS Devices

Tielei Wang, Yeongjin Jang, Yizheng Chen, Simon P. Chung, Billy Lau, Wenke Lee

TL;DR

This paper demonstrates that large-scale infections of non-jailbroken iOS devices are feasible, despite Apple's robust security measures. The authors exploit vulnerabilities in iTunes syncing and device provisioning to install malicious apps and steal data, and their measurements show that a significant percentage of botnet-controlled computers could be used for such attacks.

What Problem Does This Paper Address?

Apple's iOS platform is known for its strong security, making it difficult for malware to spread. Unlike Android, iOS has a tightly controlled app distribution system (App Store), mandatory code signing, and powerful remote revocation capabilities. This has led to a perception that large-scale infections of non-jailbroken iOS devices are practically impossible. However, the authors investigate whether this perception holds true, particularly in the context of botnets, which can compromise a large number of computers and potentially leverage them to attack connected iOS devices. They aim to determine if these advanced security features can be bypassed to achieve widespread compromise.

Methods

The paper introduces several novel attack vectors and methodologies:

  • Man-in-the-Middle (MitM) Attack on iTunes Syncing: The core of their attack involves exploiting a design flaw in the iTunes syncing process. By intercepting and manipulating the communication between a compromised computer (bot) and an iOS device, they can trick iTunes into authorizing the installation of Apple-signed malicious apps, even if they were purchased by a different Apple ID. This bypasses the standard DRM checks that would normally prevent such installations.
  • Remote Authorization: They extend the MitM attack to work remotely, without requiring direct physical connection between the compromised computer and the iOS device. This is achieved by relaying the authorization requests and responses through the compromised computer.
  • Stealthy Device Provisioning: The authors demonstrate how a compromised computer can exploit the iOS device provisioning process. By leveraging the USB interface and a service called com.apple.misagent, they can stealthily install provisioning profiles, allowing them to install arbitrary apps signed by enterprise or individual developer licenses. This also enables them to remove legitimate apps and replace them with malicious ones.
  • Credential Theft via USB: They show that a compromised computer connected via USB can access app directories on an iOS device, including those protected by the sandbox. This allows them to steal sensitive data like authentication cookies from apps like Facebook and Gmail, enabling remote account access.
  • Large-Scale Measurement Study: To quantify the feasibility of these attacks, they conducted a large-scale measurement study. They analyzed DNS queries from millions of IP addresses associated with known botnets to estimate the overlap between compromised Windows machines and iOS devices. They developed sophisticated fingerprinting techniques to identify iOS devices and Windows iTunes usage within these networks.

Datasets

  • DNS Query Dataset: Provided by Damballa, Inc., this dataset contains DNS traffic from two large ISPs in the US, collected over five days in October 2013, covering 13 cities. It includes anonymized client IDs (CIDs), query counts, queried domains, and resolved IP addresses.
  • Passive DNS Database: Also from Damballa, this dataset provides visibility into other DNS record types, used to reconstruct CNAME chains for domain mapping.
  • HTTP Dataset: Collected by Damballa, this dataset contains HTTP headers, used for ground truth evaluation of their fingerprinting methods.
  • Labeled C&C Domains: Acquired from Damballa, this dataset includes command and control (C&C) domain names for Windows malware families, used to identify compromised Windows machines (bots).

Key Insights and Ideas

  • The "Trusted" Computer is the Weak Link: The most significant insight is that the very act of connecting an iOS device to a computer, especially one that is already compromised, creates a substantial security risk. This challenges the assumption that the iOS device itself is the primary security boundary.
  • Apple-Signed Apps Can Be Maliciously Distributed: The ability to install Apple-signed apps (like the "Jekyll" app) via the iTunes sync exploit demonstrates that even apps that pass Apple's vetting process can be weaponized and distributed covertly, bypassing user consent and DRM.
  • Device Provisioning is a Powerful Attack Vector: The stealthy provisioning attack highlights a critical vulnerability that allows attackers to replace legitimate apps with malicious ones, potentially targeting sensitive applications like banking apps.
  • Plaintext Cookie Storage is a Widespread Problem: The finding that popular apps like Facebook and Gmail store cookies in plaintext within their directories is a serious concern, as it makes them vulnerable to theft via simple USB access.
  • Quantifiable Threat of Large-Scale Infection: The paper moves beyond theoretical attacks by providing concrete, large-scale measurement data, showing that a significant percentage of botnet-controlled computers are likely to have connections to iOS devices, making widespread infections a realistic threat.

Key Results

  • 23% of Bots Connected to iOS Devices: Through their measurement study, the authors estimate that on average, 23% of bots (compromised Windows machines) have connections to iOS devices, indicating a substantial attack surface.
  • Feasible Large-Scale Infections: The paper demonstrates that attackers can install Apple-signed malicious apps, replace existing apps with attacker-signed ones, and steal private data (like Facebook and Gmail cookies) from iOS devices.
  • Bypassing DRM: The iTunes sync exploit successfully bypasses Apple's Fairplay DRM, allowing apps purchased by one Apple ID to run on devices bound to another.
  • Targeting Banking Apps: The study identified that 4% of potential victims queried mobile banking domains, suggesting a significant number of devices could be targeted for banking app replacement attacks.

Limitations and Future Work

  • Underestimation of Infection Potential: The authors acknowledge that their measurement study likely underestimates the true number of potential victims due to factors like not considering cellular traffic and the possibility of multiple iOS devices per household.
  • Focus on Windows Bots: The measurement study primarily focused on Windows bots, and the impact of Linux or macOS bots was not extensively analyzed.
  • Apple's Response: While Apple acknowledged the findings and indicated areas for hardening, the paper doesn't detail the specific patches or their effectiveness.
  • Future Work Suggestions:
    • Apple should monitor anomalous Apple IDs that deliver an excessive number of purchased apps.
  • iOS should warn users when an app purchased by a different Apple ID is about to be installed.
  • Third-party developers need to securely store credentials, as plaintext storage is vulnerable.
  • Redesigning the security model of USB connections for mobile devices is recommended.
  • Further research into the capabilities of injected mobile malware for defeating two-factor authentication is suggested.

Summary updated

BibTeX
@inproceedings{wang2014feasibility,
  author = {Tielei Wang and Yeongjin Jang and Yizheng Chen and Simon P. Chung and Billy Lau and Wenke Lee},
  title = {{On the Feasibility of Large-Scale Infections of iOS Devices}},
  booktitle = {USENIX Security},
  year = {2014},
}
Figure