Adversaries may abuse Android's
startForeground() API method to maintain continuous sensor access. Beginning in Android 9, idle applications running in the background no longer have access to device sensors, such as the camera, microphone, and gyroscope. Applications can retain sensor access by running in the foreground, using Android’s
startForeground() API method. This informs the system that the user is actively interacting with the application, and it should not be killed. The only requirement to start a foreground service is showing a persistent notification to the user.
Malicious applications may abuse the
startForeground() API method to continue running in the foreground, while presenting a notification to the user pretending to be a genuine application. This would allow unhindered access to the device’s sensors, assuming permission has been previously granted.
Malicious applications may also abuse the
startForeground() API to inform the Android system that the user is actively interacting with the application, thus preventing it from being killed by the low memory killer.
Applications could be vetted for their use of the
If a user sees a persistent notification they do not recognize, they should uninstall the source application and look for other unwanted applications or anomalies.
Users can see persistent notifications in their notification drawer and can subsequently uninstall applications that do not belong.
- Google. (n.d.). Sensors Overview. Retrieved November 19, 2019.
- Google. (n.d.). Services overview. Retrieved November 19, 2019.
- Thomas Sutter. (2019, December). Simple Spyware Androids Invisible Foreground Services and How to (Ab)use Them. Retrieved December 26, 2019.
- Song Wang. (2019, October 18). Fake Photo Beautification Apps on Google Play can Read SMS Verification Code to Trigger Wireless Application Protocol (WAP)/Carrier Billing. Retrieved November 19, 2019.
- R. Gevers, M. Tivadar, R. Bleotu, A. M. Barbatei, et al.. (2020, May 14). Uprooting Mandrake: The Story of an Advanced Android Spyware Framework That Went Undetected for 4 Years. Retrieved July 15, 2020.
- Satori Threat Intelligence and Research Team. (2020, August). TERRACOTTA Android Malware: A Technical Study. Retrieved December 18, 2020.
- S. Desai. (2020, September 8). TikTok Spyware. Retrieved January 5, 2021.