Android apps handle sensitive data, often displayed on screens (i.e., Activities), and protecting these activities is vital for ensuring user privacy. Several studies have demonstrated the risk of private data leakage via screen capture and identified...
Android apps handle sensitive data, often displayed on screens (i.e., Activities), and protecting these activities is vital for ensuring user privacy. Several studies have demonstrated the risk of private data leakage via screen capture and identified malware exploiting this vulnerability. To mitigate such threats, Google introduced FLAG_SECURE, an activity-level security feature that protects an Activity when set by blocking screen capture and restricting display on non-secure devices. Proper usage of this security feature could significantly reduce data leakage risks. However, to the best of our knowledge, its adoption across diverse Android apps has not been systematically studied, and this work aims to address this gap.
We present ASSA, a static analysis framework for detecting Android apps vulnerable to screenshot-based attacks. ASSA constructs UI models of activities and fragments to capture simplified screen information, including UI components as well as statically and dynamically displayed content. It considers both statically defined strings in XML resources and dynamically constructed strings through APIs. To assess vulnerability, ASSA leverages a Large Language Model (LLM), which infers screen context and determines whether the screens contain sensitive user information. Finally, ASSA identifies activities that display sensitive information without the FLAG_SECURE protection. Using our tool, we evaluated 5,667 apps and found that 19.8% contained at least one activity with sensitive data but were not protected. Furthermore, 87.2% of apps failed to apply FLAG_SECURE to any activity, leading to potential leakage of credentials, financial data, and location information. In total, 20 vendors confirmed our findings; 6 committed to fixes, 9 acknowledged the issues and planned further investigation, and the remainder acknowledged the issues without outlining remediation plans. These results expose the widespread prevalence of these vulnerabilities and emphasize the urgent need for stronger developer practices.