Analyzing Use of High Privileges on Android: An Empirical Case Study of Screenshot and Screen Recording Applications

Mark Huasong Meng, Guangdong Bai, Joseph K. Liu, Xiapu Luo, Yu Wang

TL;DR

This paper exposes a significant security loophole in the "ADB workaround"—a popular method used by Android developers to grant apps high-level privileges (like screen recording) without requiring a rooted device. By analyzing three popular apps, the researchers demonstrate that these privileged background services often communicate over unprotected sockets, allowing malicious apps to hijack them and silently steal user data.

What Problem Does This Paper Address?

Android’s security model relies on a sandbox where each app has limited permissions. Certain sensitive actions, such as capturing the screen or recording audio, are classified as "signature-level" permissions. These are typically reserved for system apps or those signed by the device manufacturer.

To bypass these restrictions without forcing users to "root" their phones (which voids warranties and creates other risks), developers often use the Android Debug Bridge (ADB) workaround. A user connects their phone to a PC and runs a script that launches a privileged "proxy" service on the phone. The app then talks to this proxy to perform high-privilege tasks. The authors tackle the question: Is this communication channel actually secure? As it turns out, the answer is often a resounding "no."

Table 1: Some examples of signature level permissions that are not granted to the third party developers by API level 19

Methods

The researchers employed a multi-step approach to audit three real-world applications:

  1. Proxy Activation Analysis: They examined the desktop scripts (batch/bash) and .Net executables used to launch the proxy services to identify the service names and how they are initialized.
  2. Static Analysis: Using tools like dex2jar and apktool, they decompiled the Android apps to find hardcoded port numbers, socket communication logic, and potential "magic numbers" used for authentication.
  3. Dynamic Analysis (Hooking): Because many apps use code obfuscation, the team used the Xposed framework to "hook" into system APIs at runtime. This allowed them to intercept the actual data packets being sent between the app and the proxy.
  4. Exploitation: Finally, they developed a proof-of-concept (PoC) malicious app to see if it could "replay" these commands to the proxy and trigger unauthorized screenshots or recordings.

Datasets

The authors initially collected a batch of 15 applications from the Google Play Store (13 screenshot apps and 2 screen recording apps) that claimed to work on unrooted devices. From this set, they identified 4 apps using the ADB workaround and performed deep-dive case studies on 3 of them:

  • Screenshot Ultimate (icecoldapps)
  • No Root Screenshot It (edwardkim)
  • FREE screen recorder NO ROOT (Invisibility Ltd)

Key Insights and Ideas

  • The Proxy is a "Sitting Duck": Once the ADB proxy is started, it often listens on a local network socket. Because Android’s internal networking allows any app to connect to localhost, any malicious app on the device can attempt to talk to the proxy.
  • The Illusion of Security: Developers who realized the risk attempted to add "passwords" or "magic numbers." However, these were often static (hardcoded in the app) or dynamically generated but stored in world-readable locations.
  • Life-cycle Mismatch: The proxy service is started via ADB and stays alive even if the original app is closed or uninstalled. This creates a persistent, privileged back-door that a malicious app can exploit at any time.
  • Log File Leaks: In one case, the app used a strong 16-digit dynamic password, but the proxy service wrote that password into a log file in /data/local/tmp—a directory that other apps could read.

Key Results

The researchers successfully identified vulnerabilities in all three apps:

  • App I: Had no protection. Sending the plain-text string "SCREEN" to a specific port triggered an immediate screenshot.
  • App II: Used a "magic number" (89234820) as a pseudo-password. The researchers built a PoC app that sent this number to the proxy, successfully capturing screenshots and saving them to a hidden directory for exfiltration.
  • App III: Used a dynamic password, but the researchers found they could simply read the password from a local log file (videoserv.log) and then initiate a full screen recording session.

Limitations and Future Work

The study focused on a relatively small sample size of three apps, though these apps represent common implementation patterns for the ADB workaround. Additionally, the experiments were conducted on older versions of Android (4.2 and 4.4), which were the primary targets for these types of non-root workarounds at the time of writing.

Future work could involve automating the detection of these socket-based privilege leaks across a wider range of apps and investigating if similar vulnerabilities exist in modern "accessibility service" workarounds used by newer Android versions.

Summary updated

Abstract

The number of Android smartphone and tablet users has experienced a rapid growth in the past few years and it raises users' awareness on the privacy and security of their mobile devices. The features of openness and extensibility make Android unique, attractive and competitive but meanwhile vulnerable to malicious attack. There are lots of users rooting their Android devices for some useful functions, which are not originally provided to developers and users, such as backup and taking screenshot. However, after observing the danger of rooting devices, the developers begin to look for other non-root alternatives to implement those functions. ADB workaround is one of the best known non-root alternatives to help app gain higher privilege on Android. It used to be considered as a secure practice until some cases of ADB privilege leakage have been found. In this project, we design an approach and implement a couple of tools to detect the privilege leakage in Android apps. We apply them to analyse three real-world apps with millions of users, and successfully identify three ADB privilege leaks from them. Moreover, we also conduct an exploitation of the ADB privilege in one app, and therefore we prove the existence of vulnerabilities in ADB workaround. Based on out study, we propose some suggestion to help developers create their apps that could not only satisfy users' needs but also protect users' privacy from similar attacks in future.
BibTeX
@inproceedings{meng2018analyzing,
  author = {Mark Huasong Meng and Guangdong Bai and Joseph K. Liu and Xiapu Luo and Yu Wang},
  title = {{Analyzing Use of High Privileges on Android: An Empirical Case Study of Screenshot and Screen Recording Applications}},
  booktitle = {Inscrypt},
  year = {2018},
  doi = {10.1007/978-3-030-14234-6\_19},
}

Loading related content...

Figure