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).
They categorize four distinct attack vectors:
- 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. - 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.
- cmdIFL (Command IFL): Exploits apps that contain command interpreters (e.g., terminal emulators or SSH servers) to execute arbitrary shell commands.
- 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 thwartsaimIFLattacks that rely on knowing exact paths to sensitive files. - Apple’s App Review: While iOS is more vulnerable to
sopIFL, it is virtually immune tocmdIFLbecause 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.
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