Abstract
Android's permission-based security model often suffers from a "permission gap"—a discrepancy between the permissions an application declares and those it actually requires. This paper introduces COPES, a static analysis tool designed to detect these gaps by mapping the Android framework and application bytecode. By identifying over-privileged applications, COPES provides a systematic approach to reducing the mobile attack surface.
Introduction
Android applications must explicitly declare access to sensitive resources like the camera or GPS. However, due to poor documentation or developer caution, many apps are "over-provisioned." This creates a significant security risk: if an app with unused permissions is compromised, the attacker gains unauthorized access to those resources. The authors define this as a "permission gap," analogous to leaving unnecessary ports open on a firewall.
Methodology
The researchers formalized the detection of permission gaps using boolean matrix algebra. They represent the relationship between applications and permissions through a Permission Access Matrix ($M$), an Access Vector ($AV_{app}$), and an Inferred Permission Vector ($IP_{app} = AV_{app} \times M$).
To construct these, two primary tools were developed:
- The Mapper: Utilizes the Soot framework and Spark pointer analysis to perform static analysis on the Android framework. It constructs call graphs to locate Permission Enforcement Points (PEPs)—the specific code locations where the system validates a permission request.
- The Sniffer: Analyzes application bytecode to identify which framework methods are invoked.
The analysis accounts for complex Android-specific mechanisms, such as Binder-based Inter-Process Communication (IPC) and string analysis for permission identifiers.
Evaluation and Results
The study analyzed the Android v2.2 framework (126,660 methods) and two large application datasets: 742 apps from an alternative market (Freewarelovers) and 679 from the official Android Market.
Key Findings
- Framework Mapping: COPES identified 9,562 framework methods requiring at least one permission.
- Prevalence of Over-privilege: Permission gaps were found in 12.7% of apps from the alternative market and 18.3% from the official market.
- Gap Magnitude: While most over-privileged apps lacked only one required permission, some exhibited gaps of four or more.
Validation
COPES was validated against previous dynamic analysis research (Felt et al.). As shown in the table below, COPES matched dynamic results for 82.3% of methods and identified additional required permissions in 17.7% of cases that dynamic testing missed. This supports the authors' claim that static analysis provides a more comprehensive "upper bound" for security.
Discussion and Limitations
Static analysis offers a significant advantage over dynamic testing by capturing code paths that might not be triggered during standard execution. However, COPES faces limitations with applications using reflection, dynamic class loading, or native C/C++ code (NDK), as these break the static call graph. The authors suggest that the "true" required permission set likely lies between the lower bound found by dynamic testing and the upper bound found by static analysis.
Conclusion
COPES demonstrates that static analysis is a viable and powerful method for identifying permission gaps in the Android ecosystem. By automatically detecting over-privileged applications, it offers a path toward a more secure, principle-of-least-privilege environment for mobile software.
Summary updated