Abstract
Cross-app collaboration via inter-component communication is a fundamental mechanism on Android. Although it brings the benefits such as functionality reuse and data sharing, a threat called component hijacking is also introduced. By hijacking a vulnerable component in victim apps, an attack app can escalate its privilege for originally prohibited operations. Many prior studies have been performed to understand and mitigate this issue, but component hijacking remains a serious open problem in the Android ecosystem due to no effective defense deployed in the wild. In this paper, we present our vision on practically defending against component hijacking in Android apps. First, we argue that to fundamentally prevent component hijacking, we need to switch from the previous mindset to a more proactive version that aims to help security-inexperienced developers make secure components in the first place. To this end, we propose to embed into apps a secure component library (SecComp), which performs in-app mandatory access control on behalf of app components. We have overcome challenges to implement a preliminary SecComp prototype, which stops component hijacking with very low performance overhead.
Introduction
Android applications are composed of various components (Activities, Services, ContentProviders) that interact through Inter-Component Communication (IPC). While this modularity facilitates data sharing and code reuse, it creates a significant security risk known as component hijacking. In these attacks, a malicious application sends crafted IPC requests to a vulnerable component in a legitimate app, tricking the victim into performing privileged actions—such as data exfiltration or unauthorized system calls—on the attacker's behalf.
Previous defensive strategies often relied on modifying the Android OS or repackaging applications post-release. These approaches have seen limited adoption because they break application signatures, require custom Android distributions, or introduce significant performance penalties. SecComp addresses these challenges by providing a practical, developer-centric security library that integrates directly into the application during development.
The SecComp Architecture
SecComp shifts the security perimeter from the operating system to the application itself by implementing in-app Mandatory Access Control (MAC). The architecture is built around two primary enforcement points that mediate the flow of IPC requests.
- Entry-Point Access Control (EP-AC): This serves as the first line of defense, intercepting IPC requests as they enter a component. It evaluates requests against generic policies designed to catch common developer oversights, such as components being exported by default without proper permission checks.
- Sink-Point Access Control (SP-AC): If the entry-point check is inconclusive, SecComp monitors sensitive "sink" APIs—such as database queries or network transmissions. If a suspicious data flow is detected, the system can trigger a user-driven authorization dialog.
Practical Implementation and Policies
To ensure developer adoption, SecComp is designed to be lightweight and easy to implement, typically requiring only 1–2 lines of code at the start of component functions. The library uses security "primitives"—including the caller’s identity, application signatures, and manifest attributes—to make real-time access control decisions. For ambiguous scenarios, SecComp employs a "human-in-the-loop" model, providing users with context-rich alerts to make informed security decisions without causing significant "alert fatigue."
Evaluation and Results
The researchers evaluated SecComp using the open-source Zirco Browser as a real-world test subject. The library successfully defended against multiple attack vectors, including Explicitly Exported Component (EEC) attacks and SQL injection.
Performance testing demonstrated that SecComp introduces negligible overhead. Security checks for standard operations added only about 0.25 ms of delay, while defending against SQL injection added a mere 0.009 ms. Even the most resource-intensive operation—launching a user alert dialog—clocked in at approximately 229 ms, well below the 500 ms threshold where users typically notice latency.
Conclusion
SecComp represents a proactive shift in Android security, moving from reactive OS-level fixes to developer-integrated protection. By providing a high-performance, signature-preserving library, SecComp offers a viable path toward eliminating component hijacking in the Android ecosystem. Future work will focus on automating the integration process through IDE plugins and refining the user interface to ensure security alerts remain meaningful and effective.
Summary updated