Abstract
Many Android apps today face problems such as the large application package (APK) size, frequent updates, and so on. The Android plugin technology provides a solution for app developers, allowing a running app to dynamically load and execute a separate APK file without installing it in the system. These dynamically loaded APKs are called plugins. In Android app markets, many multi-instance apps abuse this technology to load normal social apps as plugins. While satisfying the users’ demand for logging into multiple accounts simultaneously, it brings new security threats to the legitimate apps. Sensitive API invocations can be hijacked and private data becomes accessible to malicious multi-instance apps. Therefore, identifying the running environments becomes necessary. In this paper, we propose a novel detection mechanism, named PluginAssassin, to identify whether an app is running as a plugin. PluginAssassin uses the time ratio of different activity launching procedures to determine the running environment, conforming to the observed time lag contradiction phenomenon. We also present a mitigation mechanism for the
Introduction
With the rapid development of the Android platform, people are heavily dependent on mobile applications (a.k.a., apps), which bring convenience to our daily life, study and work. In the meantime, apps tend to embody more and more functionalities, enlarging the size of the installation files (e.g., the APK files in Android). The plugin technology was proposed a few years ago, originally for reducing the size of installation files and providing an easier way for functionality update.1
Google I/O 2018 introduced the Android App Bundle [1] that can do the same job, but the open source plugin framework VirtualApp [39] was released even two years earlier.
While app development benefits from the plugin technology, the abuse of this technology has been found in apps, which are referred to as multi-instance apps. A multi-instance app runs as a host app in the system and loads another legitimate app as a plugin by utilizing the plugin technology. This makes multiple instances of the legitimate app exist in the system at the same time. Users can leverage multi-instance apps to login to different accounts for the same social app on one device, eliminating the trouble of login and logout for accounts switching. Such usage scenario becomes popular recently. As we can see later in Table 5 in Section 4, multi-instance apps are popular and have attracted a large number of users. More specifically, Parallel Space [24] (#2) is one of the most popular in the Google Play store, with hundreds of millions installations. It’s worth noting that the cost of developing a multi-instance app is low. There are two open-source plugin technology frameworks, DroidPlugin [13] and VirtualApp [39], which provide the basic support of loading arbitrary apps as plugins. The commercial version of VirtualApp is even compatible with the latest Android 10, i.e., being capable to bypass the restrictions on non-SDK interfaces starting in Android 9 [28]. Based on the capability of the technology, developers can implement other functionalities as well. For example, some multi-instance apps offer the function of mocking device information for plugin apps, such as the location and phone models.
Along with the convenience, being loaded as a plugin threatens the security of the legitimate apps. As a popular social app, Twitter [37] has already suffered from a variety of phishing attacks [31], which aim at stealing users’ accounts and credentials. The researchers also found a new kind of malware, DualTwitter [35], which embeds a plugin technology framework, launching the normal Twitter app as a plugin. Because the plugin technology grants the ability to hijack all API calls in the plugin app to the host app, DualTwitter can steal the user’s inputs by hijacking corresponding APIs and extract the login information. Besides, a multi-instance app can access all the files created by the plugin app, which eases the host app to acquire the private data that should be isolated by Android’s security policy. To further illustrate the security threats to legitimate apps, researchers conduct several demo attacks to popular social apps [45]. Social apps usually store login tokens of user accounts in their private directories. By loading a social app as a plugin, adversaries can easily dump all the files under its private directory and then install the same social app on an emulator or another smartphone with all the private files of the victim app. Without explicitly obtaining the credential information such as the username and password, adversaries can login as the victim and take control of the account. In addition to the login tokens, chatting history or email content can also be leaked in a similar attack way. The researchers also point out that attackers can forge emails by loading the Gmail application to achieve more malicious purposes.
Adversaries may achieve the same purposes by repackaging target apps, but with the development of various code protection methods like code obfuscation [6,21] and packing techniques [14,46], it becomes more and more difficult. Compared with repackaged apps, of which users are concerned about the authenticity, a multi-instance app requires no change to the plugin apps and indeed attracts the users to load whatever they want. In other words, adversaries can do something evil more stealthily.
Considering these potential security threats, it is necessary for an app to detect whether it is running as a plugin. Plugin-Killer [23], to the best of our knowledge, is the only feasible solution for normal Android apps to detect the plugin environments at present. Unfortunately, as we will elaborate in Section 2.3, Plugin-Killer can be bypassed easily because a multi-instance app can take full control of the plugin app. Hence, a more robust detection method to protect legitimate apps from being loaded as plugins is deem required.
In this paper, we propose a novel detection mechanism, named PluginAssassin, integrated to normal Android apps to detect the plugin environments. Our insight is that the plugin technology needs to interpose the Android component launching operation to bypass system restrictions, and this interference prolongs the time consumption. We focus on only one type of Android components and observe that launching an activity under two scenarios, in the same process and in a new process, has disproportionate time overhead when an app is running in plugin environments, resulting in a phenomenon that we call the “time lag contradiction”. Based on this observation, PluginAssassin collects the elapsed time and computes the ratio of the activity launching under two scenarios. The ratio is compared with a predefined threshold to judge the type of current environment. Compared with Plugin-Killer, PluginAssassin involves much fewer APIs that do not directly describe an app’s features, leaving less chance for plugin environments to bypass. However, we discuss the opportunity for a plugin environment to evade the detection and present the
We evaluate PluginAssassin on five popular social apps and 50 real-world multi-instance apps. Three different Android smartphones are used in the experiments. We compute the threshold with a few randomly selected samples and apply it to all the other test cases. The results show that, except those cases in which the multi-instance apps do not support the functionalities required by the guest apps, PluginAssassin successfully identifies all plugin environments without false alarms or false negatives, demonstrating the effectiveness of our approach.
Our work makes the following major contributions:
We present PluginAssassin, which detects the running environments based on the time lag contradiction of activity launching in different scenarios. PluginAssassin labels the plugin environments by comparing the computed time ratio with a given threshold.
We discuss a potential challenge specific to PluginAssassin, i.e., the
We evaluate PluginAssassin on real-world social apps, multi-instance apps and devices. The results show that PluginAssassin accurately discovers the plugin environments.
The rest of this paper is structured as follows. Section 2 provides the technical background of the Android plugin technology, and gives a look at Plugin-Killer. In Section 3, we present our approach in detail, including a potential threat and its mitigation. Afterwards, Section 4 evaluates our approach and discusses the results. We discuss some limitations in Section 5 and survey the related work in Section 6. Finally, we conclude this paper in Section 7.
In this section, we first demystify the Android plugin technology, presenting a high level overview. Then without losing generality, we describe how a host app utilizes the plugin technology to launch Android activities. At last, we talk about Plugin-Killer [23], a lightweight defense mechanism that prevents Android apps from being plugin apps running in a plugin environment. We also show how its defense solutions can be easily bypassed.
First of all, we clarify some terms that are commonly used in this paper. The plugin environment denotes a set of programs and resources which are necessary to execute another independent program (i.e., an Android app). A plugin environment can either be merely a framework for secondary development or a host app that already embodies the framework. The host apps are also called multi-instance apps. The plugin environment and the host app are interchangeably used in this paper. A plugin app is an Android app that runs within a host app. It is also used as guest app sometimes. We call launching a component within the same process an intra-process launching, while in an inter-process scenario, the component is started in a new process.

Plugin framework overview.
Android apps typically contain many components such as Activity, Service, Broadcast Receiver and Content Provider, and run on top of the Android framework [3]. When an Android app (or an APK file) is installed on a device, the Android system maintains some records about the app and the registered components defined in
We examined the two open-source Android plugin frameworks, DroidPlugin [13] and VirtualApp [39], to figure out how they play tricks on the Android system and successfully execute guest apps. Figure 1 demonstrates the overview of the plugin technology. In general, the host app, which embeds a plugin framework, is installed on a device as a normal app. The embedded plugin framework provides the ability to manage the plugin apps and hook necessary API invocations. Besides, the plugin framework contains a special

Launching an activity in Android.
For example, as shown in Fig. 1, when an activity A in the plugin app is trying to start another activity B via
In order to avoid the interference among different guest apps, the host app and each guest app usually run in different processes. However, since the Android sandbox mechanism prevents users – in most cases, each app is assigned an unique uid – from accessing resources of other users [4], in order for the plugin framework to interleave the execution of a guest app, they share the same uid. Hence, the sandbox mechanism is evaded and this allows the host app to access all resources and information associated with the guest apps, either public or private. Risks appear as adversaries can leverage this feature to steal the user’s privacy data, as done in DualTwitter [35], or perform many other unexpected behaviors [45].
We omit the implementation details of how the plugin environment loads specific classes and resources from a plugin app [23]. For our paper, we describe the conceptual workflow of launching an activity, which motivates our solution for detecting the plugin environments.
Figure 2 illustrates the normal flow of launching an activity in Android. When an activity A tries to launch another activity B, it invokes an API like
The above workflow fails when the app is indeed a guest app running in a plugin environment as the app is not installed and the target activity B is not known to the system. AMS checks fail if the

Launching an activity in the same process (extra code in grey).

Launching an activity in a new process (extra code in grey).
In real-world Android apps, most activities are launched in the same process. Figure 3 illustrates how to launch a plugin activity B within the same process. We aggregate the injected operations into two grey areas ( 1 and 2). The hooking module, once receiving a request for launching an activity, replaces B with a stub one, say Stub01, which is defined in
Figure 4 shows the flow of launching a plugin activity C in a new process. The procedure before AMS responds is nearly the same as that in Fig. 3. But when AMS checks succeed, a new process (pid_3) is created, within which the guest app’s application needs to be initialized. However, as the system cannot see the plugin app, it initializes the host app’s application, which prepares the plugin environment for the new process. Then the plugin environment initializes the guest application, unwraps the replaced
Luo et al. present Plugin-Killer [23], a lightweight defense mechanism, to prevent Android apps from being launched as plugin apps. Embedded within normal apps, it can detect the existence of plugin environments and terminate the enclosing apps if needed. The intuition behind Plugin-Killer is that, when an app is running as a plugin, there are definitely some differences in the running environment with the one created by system. Hence, Plugin-Killer collects and compares certain information with the counterpart under system environment. Any inconsistency indicates that the app is running in plugin environments. Below we will discuss the methods proposed by Plugin-Killer and show why they are not resistant to attacks.
By introspecting the code of Plugin-Killer, we find four types of information are collected in detection, the process name, the component name, the private directory path and the permission information (see the first column in Table 1).
For the process name, Plugin-Killer obtains all the running processes that share the same uid with itself, and checks their names. Generally, a process’s name contains the package name of the corresponding app. However, in plugin environment, the host app process is also running with the same uid, so Plugin-Killer can detect the existence of the host app that has a different process name. The component name checking is conducted in a similar way. In plugin environments, the name of a plugin component will be the stub component name defined in the host app. For example, a service
Information collected by Plugin-Killer with related APIs and values under different running environments
Information collected by Plugin-Killer with related APIs and values under different running environments
While the proposed approaches can be effective to some extent, they can be easily bypassed by the plugin environments. To collect such running environment information, some specific Android APIs are invoked by Plugin-Killer. Table 1 lists the APIs to obtain the information under the system environment and the DroidPlugin environment. Suppose the package name of the host app and the plugin app are com.example.hostapp and com.example.testapp, respectively. As described in Section 2.2, the
In this section, we propose PluginAssassin based on the observation of time lag contradiction between the intra-process and inter-process activity launching in plugin environments. We will first present the plugin environment capability assumptions, after which we discuss our observations and why some thoughts do not work. Then we detail our approach, a potential threat and the corresponding mitigation. At the end, we summarize how PluginAssassin is generally implemented.
Threat model
PluginAssassin is designed to detect whether an app is running in a plugin environment. Considering the nature of attack-defense countermeasures, we cannot expect to solve the problem once and for all. Therefore, we assume the plugin environment has the following capabilities:
The host app can hook all the API invocations in a plugin app and modify the actual arguments and results. In the meantime, the guest app’s utility must be preserved.
The host app can only run as an ordinary user in Android, i.e., it is installed as a third-party app instead of a system or privileged app.
The first requirement relaxes the restriction, which invalidates the Plugin-Killer solutions as we discussed in Section 2.3. Though it gives the plugin environments the best ability to interfere the guest app, we think the major purpose of a plugin environment is to run Android apps as usual instead of running into crashes or malfunction. As a consequence, in this paper, we require the plugin environments to preserve the utilities of guest apps. The second assumption limits the ability of the host app to interpose other apps and the kernel’s running.
Road to success
Recall the flow of launching a plugin activity in Fig. 3 and Fig. 4. Apparently, the extra embedded functionalities, such as component replacement for both scenarios ( 1, 3, 4 and 5) and plugin environment preparation for inter-process launching ( 2) cost additional time compared with the normal flows of launching an activity. The keyword in our observation is “time” – the time is a potential property to distinguish the system environment and the plugin environment.
At first, we try to get clues from the absolute time an interesting operation consumes. We represent the time period from invoking
We are able to measure
Later, we discovered that APIs like
While the absolute time doesn’t help, we turn our mind to the relative time. Our research question emits: “Can we compute such a time ratio of two procedures, satisfying that: (1) at least one procedure involves the code injected by the host apps in plugin environments, i.e., activity launching, and (2) the ratios for different situations are well distributed such that a simple threshold can easily separate those for system environments and plugin environments?”
To answer the question, we conducted some pilot studies and collected amounts of data, which shed some light on the situation, enlightening us to propose an approach based on the observation of the time lag contradiction.
Time lag contradiction
As we discussed previously, the plugin environment introduces extra code for both intra-process and inter-process activity launching during the guest app’s execution, which prolongs the time consumption. We observed that the plugin environments do not impose proportional time overhead on the two activity launching scenarios. Formally, we have:
For intra-process launching, we use
Time costs of launching an activity in different environments (time unit: ns)
Time costs of launching an activity in different environments (time unit: ns)
Table 2 shows the experimental results of running a simple demo app in a system environment and two plugin environments powered by DroidPlugin and VirtualApp separately, three times for each. The experiments are all conducted on an OPPO A37m smartphone with Android 5.1 running. The observed results clearly satisfy our anticipation of the time lag contradiction.
While the preliminary results show the feasibility of our time lag contradiction approach, it suffers from a simple attack that can be easily implemented. Due to the hooking capability, the hooking module provided by plugin environment can modify the return value of time acquisition APIs after a hooked functionality is done, by subtracting the time consumed by the injected code from the actual value. The plugin environment developers are able to measure

Intra-process
To mitigate the
As shown in Fig. 5, a probe thread, is started before
However, this time-probing method fails in the inter-process launching scenario, because the system call
The probe thread behaves differently to an inter-process scenario. It is created in the main process right after
Because of the invisibility of
If neither
So far, we have not found any plugin environment implementing the
We present PluginAssassin to implement the time lag contradiction detection technique, with the

Flow of PluginAssassin.
Conceptually, the intra-process and inter-process procedures can run in parallel. To reduce the impact of any noise as much as possible, we choose to collect multiple time values and finally compute the ratio with their averages. We define in the diagram the iterations of collecting time data as N and the ratio threshold as
For intra-process launching (
For inter-process launching (
The above steps are repeated for N rounds and the averages of
We conducted all our experiments on three real smartphones to investigate the effectiveness of PluginAssassin across devices. The detail configurations of these smartphones are listed in Table 3.
Configurations of smartphones used in the experiments
Configurations of smartphones used in the experiments
We discuss below first the pilot experiments for the
As mentioned in Section 3.4, we conducted two preliminary experiments on some demo apps with the OPPO smartphone to show the power of a
Validating
attack
Validating
In the first experiment, we prepare two plugin environments. Both are powered by DroidPlugin, one unchanged and the other roughly instrumented with the

Preliminary
The second experiment tests whether the
By far, the effectiveness of the
To evaluate the capability of PluginAssassin to detect plugin environments, we chose five popular social apps, WeChat [41], Twitter [37], Instagram [18], WhatsApp [43], and LINE [22], to deploy PluginAssassin, and ran them in plugin environments. These social apps have hundreds of millions of downloads on Android app stores. However, because of the limitation of simultaneous login to multiple user accounts in one device, they become the first targets of multi-instance apps.
We repackaged the social apps with PluginAssassin. Figure 8 shows how PluginAssassin is integrated into social apps. First, for each social app, we obtain its original APK file and unpack it with

Repacking social apps with PluginAssassin.
We collected 29 multi-instance apps from the Google Play store and 21 multi-instance apps from the YingYongBao store (a third party Android app store in China) by searching with the keywords such as “multiple accounts”. They provide the plugin environments in our experiments. In general, these apps scan the installed social apps in system and load the ones upon user’s choice. Some of them support to load external APK files on device. We also found that a number of the multi-instance apps display advertisements before launching guest apps. We installed these multi-instance apps in the testing smartphones as unprivileged host apps, which will load the five security-enhanced social apps as plugins to evaluate PluginAssassin.

Sample ratio distribution and threshold determination.
PluginAssassin collects
We propose a straightforward calculation for
We randomly selected five multi-instance apps and two social apps (WeChat and Instagram), ran them on two controlled devices, (i.e., the OPPO A37m and HUAWEI CRR-UL00 smartphones) and computed
Detection results and analysis
We conducted experiments for all the social apps and multi-instance apps, on all the three smartphones. We show the results in Table 5. We use the MD5 values of the multi-instance apps to represent the 50 plugin environments and the abbreviations, WX, IN, TW, WA and LI, to denote the five social apps, WeChat, Instagram, Twitter, WhatsApp and LINE, respectively. “∗” indicates the combination of a social app, a plugin environment and the smartphone is used in the threshold determination phase and the detection of plugin environments succeeds. “
Detection results for 50 multi-instance apps
Detection results for 50 multi-instance apps
We unfold the failures as follows:
The plugin environments #29, #31, #38 and #41 fail to load Twitter as a plugin. Twitter uses an Android mechanism
The failures for WhatsApp in 12 plugin environments (#4, #12, #16, #26, #28, #29, #33, #37, #38, #39, #45 and #48) are raised because of their faulty handling of the content provider component. Registering an observer for a content provider by invoking
LINE utilizes dex2oat to optimize an external JAR file after startup. However, two multi-instance apps (#11 and #39) do not handle the file path properly, resulting in additional failures.
According to above discussions, none of the failures is induced by our modifications in the social apps or remarks the existence of indistinguishable time ratios, i.e., all computed
Figure 10 shows all the
We also observed that, WhatsApp usually holds relatively small time ratios (typically smaller than 0.6) while the others may produce bigger ratios. Due to this fact and that we determine the threshold based on very few tests on only two controlled devices, we suggest the app developers to exercise their apps, with PluginAssassin augmented, on more available devices and make the decision with an app-specific threshold, instead of using one applicable for many different situations as done in our experiments. For example, WhatsApp may set a smaller threshold (e.g., one) and LINE might requires a bigger value.

Time ratios under system environments.
Considering the plugin technology has been applied to implement malicious purposes by real-word malwares, such as DualTwitter, we uploaded these 50 multi-instance apps to VirusTotal [40] to check whether they are malicious. Results show that 44 out of 50 are marked as malware or potential malware by the antivirus engines hosted by VirusTotal. According to the analysis reports, we found 10 multi-instance apps intend to execute the “su” shell command to check whether the device is rooted. Besides, 15 multi-instance apps are reported to use the Android packing technique. Antivirus engines label these samples as potential malware because they may hide malicious payloads and dynamically load them during running to evade analysis.
As we mentioned earlier, multi-instance apps with malicious behaviors may threaten the security of legitimate apps. Fortunately, PluginAssassin has a satisfactory performance on identifying the plugin environments by the time lag contradiction detection approach. From the experimental results, we can faithfully claim that PluginAssassin achieves zero false positive rate. For all cases where both the plugin environments and the guest apps do not crash, PluginAssassin doesn’t leave any multi-instance app unreported, namely, zero false negatives.
Since PluginAssassin injects code for extra activity launching, it inevitably introduces some runtime overhead and we will briefly discuss its upper bound in this section. According to our discussion in Section 2 and Section 3, it makes sense for us to simulate the runtime overhead with the observed
Estimated upper bounds of runtime overhead (unit: seconds)
Estimated upper bounds of runtime overhead (unit: seconds)
The proposed mitigation mechanism for
Besides the
Even though app developers can choose an app-specific threshold, some unforeseen plugin environments may still have a chance not to be identified, or in some cases, a system environment can be mistakenly marked. An adaptive threshold determination algorithm may help in the former situation, using the feedbacks from many other daily use smartphones. For the latter case, the developers can either choose to skip the detection in certain extreme conditions or decide a higher threshold to prune any potential false positives while letting off some plugin environments.
PluginAssassin inevitably increases the overall performance overhead. Nevertheless, as we discussed in Section 4.5, the overhead for most cases is not higher than two seconds in our experiments. App developers can even further reduce the overhead by measuring the time cost of launching those activities necessary in the app’s lifecycle, instead of injecting unnecessary but detection-oriented ones as done in our experiments. Moreover, the powerful hardware in nowadays smartphones lessens the potential side-effect, as Table 6 shows, and we believe the approach will not affect the user experience.
App developers need to trade off between the security and the overhead when adopting PluginAssassin in their apps. As mentioned above, developers can reduce the overhead by not injecting additional activities. However, we must be careful that collecting the time cost of existing activities may result in serious privacy leak before PluginAssassin completes the detection. The developers can ease such a situation by performing the detection soon after the app is started. Because the detection finishes before the user interacts with the app, no sensitive data can be leaked to the malicious plugin environments.
Related work
To the best of our knowledge, Plugin-Killer [23] is the only existing solution for detecting plugin environments. As we discussed in Section 2.3, it employs some more straightforward thoughts by comparing certain information concerning the app itself and the plugin environment with the counterpart under normal system environments. The effectiveness heavily relies on whether the plugin environments hijack the corresponding APIs used by Plugin-Killer. PluginAssassin, in contrast, fully acknowledges the capabilities of adversaries and leverages the time consumed by operations, which are more unpredictable, to perform the detection. Considerations and mitigations of specific countermeasures also make PluginAssassin more robust.
Although the security threats from plugin environments have not been taken seriously by most app developers, the running environment is a primary consideration for security-sensitive applications, especially for malware to conceal itself and evade analysis. Dynamic analysis systems [9,15,32,42,44] observe the app behaviors, obtain more useful information at runtime and deduct the nature of the app samples. However, an intelligent malware may redact its behaviors to evade such detection if it recognizes itself under analysis, making the analysis systems fail to catch any suspicious behaviors. For example, several tools [29,34,36] are deployed in virtualized environments, such as the QEMU emulators, but such virtualized environments can be differentiated from real devices by various anti-analysis techniques. Timothy et al. [38] showed the differences in several aspects between emulators and real devices. For instance, the Android APIs obtaining system artifacts, such as the system build property or the phone data, return specific values under virtualized environments. The network configuration is also an indicator to distinguish emulators and real devices. Besides, the CPU and graphical performance can efficiently identify malware sandboxes. Petsas et al. [25] summarized the anti-analysis heuristics into three categories, static, dynamic, and hypervisor-related. Static heuristics utilize the aforementioned features of emulators. Dynamic solutions observe the sensor outputs as emulators generate same values for the sensors at same time intervals. Hypervisor-related heuristics characterize the QEMU scheduling and executions and conduct detections based on the results. While most anti-analysis methods are discovered from vast malicious apps, Jing et al. [19] proposed a framework, Morpheus, to automatically generate heuristic rules from observable artifacts for apps. More than 10 000 rules generated by Morpheus can be used to detect emulators. Some analysis systems do not depend on emulator environments, but they can also be recognized from normal usage scenarios. Dial et al. [12] pointed out the high frequency of user events, such as touchscreen tapping or swiping, gives the app an insight into dynamic testing tools (e.g., the Monkey). Moreover, an app can create a special UI widget, which is invisible to users but valid to analysis tools. If the trap widget is triggered, it presumably indicates that the app is under an analysis environment. Some malware try to root the devices and of course a number of methods have been proposed to detect whether an app is running in a rooted environment. Sun et al. [33] evaluated several rooting detection methods by introspecting hundreds of applications, such as checking installed packages, related files, system properties or outputs of specific shell commands, pointing out that, all the inspected methods are ineffective and can be evaded successfully.
Unlike the analysis tools, plugin environments are designed to run guest apps on real devices and do their best to preserve the guest app’s utilities. Even if some plugin environments slightly interferes the graphical user interfaces (e.g., presenting an advertisement), in general, they do not prevent the guest apps running. The behavior characteristics, either benign or malicious, of guest apps are out of their concerns. While some anti-analysis techniques are similar to what Plugin-Killer uses, most of them do not work to detect the existence of plugin environments. PluginAssassin turns out to be a heuristic approach built upon our observation of the time lag contradiction, attributing the detection to observable and comparable time ratios.
Other researchers have also adopted timing-based methods to enforce untampered code executions or detect virtualized systems. Pioneer [30] computes the time cost of the checksum computation in an external trusted entity and verifies the cost of the same execution in an untrusted platform to detect whether the execution has been manipulated by an adversary. While PluginAssassin can benefit from such ideas to treat all platforms from the app users as potentially trusted and mutually verify the time cost, our approach in this paper computes the time ratio locally and provides good detection and runtime performance. Brengel et al. [8] utilized the execution time of instructions to identify hardware-virtualized systems. They proposed a similar thought of the relative time, which calculates a ratio of the time cost of the
Conclusion
The popularity of multi-instance apps brings new security threats to legitimate apps, which makes legitimate apps run as plugins and allows the host apps to do evil in a stealthier way. While existing detection method is not robust enough to resist attacks, we present PluginAssassin through a deep understanding and observation of the Android plugin technology. PluginAssassin works on top of the time lag contradiction phenomenon of launching Android activities in different scenarios. Elapsed time is collected and a corresponding ratio is calculated. PluginAssassin compares the ratio with a predefined one to judge whether the app is running in a plugin environment. We also discuss a potential
Footnotes
Acknowledgments
This work is supported in part by National Natural Science Foundation of China (NSFC) under grants U1836209 and 61802413, the Fundamental Research Funds for the Central Universities, and the Research Funds of Renmin University of China under grant 19XNLG02. Any opinions, findings, and conclusions in this paper are those of the authors only and do not necessarily reflect the views of our sponsors.
