Security Research Center
Attack techniques overview
Malicious accessibility services
Accessibility services are a set of native features on the Android OS developed to assist and enhance the experience of users with disabilities.
However, these powerful features can be abused to introduce security risks. An accessibility service process has the unique ability to interfere with the UI of other apps; this breaks the application sandbox principle, an important security feature designed to prevent applications from reading and modifying other applications. Malware developers are well aware of, and take advantage of, the possibilities of Android accessibility services.
Malicious accessibility services work by inspecting the events generated on the device, which allows them to track which application is being executed at any moment, what text is being entered, and what the screen layout looks like. We have seen this information being used in three distinct ways:
- Triggering actions at a specific moment, e.g. when a particular view is shown on the screen.
- Capturing sensitive information (keyloggers).
- Performing a number of actions without the user's knowledge or consent. Namely, self-granting permissions or elevating privileges to become a device admin app; as well as obstructing any action from the user that could threaten entail danger for the malware’s operation, such as permission or privilege revocation, uninstallation, etc.
Defense techniques overview
Recommended defense tactics
Defending against malicious accessibility services is not easy, because limiting functionality of accessibility services may impact the user experience of anyone relying on accessibility services to use the device.
Therefore, we recommend implementing a multi-front defense strategy that collectively protects against malicious accessibility services while reducing the probability of mistakingly restricting the user experience to a minimum.
For example:
- On Android ≥ 14 (API Level ≥ 34), use the
accessibilityDataSensitive
API. - On Android < 14 (API Level < 34), use:
- Allowlisting.
- Sideloaded check (Extension of allowlisting).
- Device admin check (Extension of allowlisting).
Check the side bar on the left to find more details about each technique.