Cross-Platform Analysis of Indirect File Leaks in Android and iOS Applications

Daoyuan Wu, Rocky K. C. Chang

Abstract

Today, much of our sensitive information is stored inside mobile applications (apps), such as browsing histories and chat logs. To safeguard these private files, modern mobile systems like Android and iOS use sandboxes to isolate app file zones. However, this paper demonstrates that these private files can still be leaked by indirectly exploiting components trusted by the victim apps. We devise new indirect file leak (IFL) attacks exploiting browser interfaces, command interpreters, and embedded app servers to leak data from popular apps like Evernote and QQ. Unlike previous local-only attacks, these IFLs affect both Android and iOS and can be launched remotely without installing malicious apps on the victim's device.

The Problem: The "Confused Deputy" in the Sandbox

Modern mobile operating systems rely on sandboxing to isolate application data. Under this model, App A cannot access App B’s files. However, the authors identify a critical bypass: the Indirect File Leak (IFL).

In an IFL attack, an adversary doesn't try to break the sandbox directly. Instead, they send crafted inputs to a "deputy"—a legitimate, trusted component within a victim app (like a WebView or a terminal) that has permission to access the app's private files. The deputy is then tricked into sending those files back to the attacker. While previous research focused on local attacks on Android, this paper explores how these vulnerabilities manifest across both Android and iOS and how they can be triggered remotely via the internet or a local network.

The IFL Model and Attack Vectors

The authors formalize the IFL model as a four-step process: $a \to d \to s \Rightarrow a$ (Adversary $\to$ Deputy $\to$ Secret $\Rightarrow$ Adversary).

The IFL model illustrating the interaction between the adversary (a), the deputy component (d), and the private files (s).

They categorize four distinct attack vectors:

  1. sopIFL (Same-Origin Policy IFL): Exploits flaws in how mobile browsers handle the file:// scheme. If a browser fails to enforce strict SOP for local files, a malicious HTML file can "reach across" and steal other local files.
  2. aimIFL (Active Injection Method IFL): Injects unauthorized JavaScript into target files (like cookies or history logs). When the app later renders these files in a UI component, the script executes and exfiltrates the data.
  3. cmdIFL (Command IFL): Exploits apps that contain command interpreters (e.g., terminal emulators or SSH servers) to execute arbitrary shell commands.
  4. serverIFL (Server IFL): Targets apps with embedded HTTP or FTP servers (common in "WiFi File Transfer" utilities) that have weak or non-existent authentication.

Key Insights: Android vs. iOS

The study highlights architectural differences that influence these leaks:

  • The file:// SOP Gap: The legacy Same-Origin Policy was designed for the web, not local file systems. iOS 8 (at the time) failed to properly isolate local file origins, allowing one local file to read another.
  • iOS's Internal File Handling: Because iOS lacks a global file system, developers often design apps to open untrusted files (like email attachments) internally within the app's own sandbox. This creates a massive attack surface for sopIFL.
  • Path Randomization: iOS uses randomized directory names for app data (e.g., /private/var/mobile/Containers/Data/Application/<UUID>/). This effectively thwarts aimIFL attacks that rely on knowing exact paths to sensitive files.
  • Apple’s App Review: While iOS is more vulnerable to sopIFL, it is virtually immune to cmdIFL because Apple prohibits apps that launch other executable code.

Results and Impact

The researchers performed manual vulnerability analysis on popular apps, uncovering zero-day vulnerabilities in massive apps like Evernote and QQ. Evernote subsequently added the researchers to their security Hall of Fame.

Summary of attack channels (Remote vs. Local) for different IFL types across various Android and iOS apps.

Key findings include:

  • Remote Reach: Three out of four IFL types affect both platforms and can be launched remotely (e.g., via a malicious email attachment or a crafted web page).
  • Broken Authentication: In an audit of 10 popular server apps, 70% did not enforce any authentication, making them trivial to exploit via an Intranet adversary.
  • iOS 8 Vulnerability: The study confirmed that iOS 8 did not guarantee SOP for the file:// scheme, a finding reported to Apple in early 2015.

Conclusion

IFLs represent a significant threat because they turn legitimate app features into weapons against user privacy. While mitigations like disabling JavaScript for local schemes and enforcing user-authorized access are helpful, the challenge remains in detecting these "confused deputy" patterns at scale. The cross-platform nature of these attacks underscores the need for more robust, context-aware security models in mobile operating systems.

Summary updated

Abstract

Today, much of our sensitive information is stored inside mobile applications (apps), such as the browsing histories and chatting logs. To safeguard these privacy files, modern mobile systems, notably Android and iOS, use sandboxes to isolate apps' file zones from one another. However, we show in this paper that these private files can still be leaked by indirectly exploiting components that are trusted by the victim apps. In particular, we devise new indirect file leak (IFL) attacks that exploit browser interfaces, command interpreters, and embedded app servers to leak data from very popular apps, such as Evernote and QQ. Unlike the previous attacks, we demonstrate that these IFLs can affect both Android and iOS. Moreover, our IFL methods allow an adversary to launch the attacks remotely, without implanting malicious apps in victim's smartphones. We finally compare the impacts of four different types of IFL attacks on Android and iOS, and propose several mitigation methods.
BibTeX
@misc{wu2015cross,
  author = {Daoyuan Wu and Rocky K. C. Chang},
  title = {{Cross-Platform Analysis of Indirect File Leaks in Android and iOS Applications}},
  year = {2015},
  eprint = {1511.00104},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1511.00104},
}

Loading related content...

Figure