TL;DR
This paper introduces SmartDroid, a novel hybrid static and dynamic analysis system designed to automatically discover the precise UI interactions needed to trigger sensitive behaviors in Android applications. By combining activity and function call graph analysis with automated UI interaction simulation, SmartDroid can uncover malicious behaviors that evade traditional dynamic analysis tools like TaintDroid.
What Problem Does This Paper Address?
Modern Android applications, especially malicious ones, often hide their sensitive actions (like sending SMS messages or exfiltrating device IDs) behind specific user interface (UI) interactions. Traditional dynamic analysis tools, such as TaintDroid, typically execute applications without user interaction or with random inputs. This approach fails to uncover behaviors that require a sequence of button clicks, menu selections, or other UI events to be triggered. Consequently, malware can remain undetected if its sensitive operations are not exposed during passive or random execution. The challenge, therefore, is to automatically identify these "UI-based trigger conditions" to enable thorough analysis of application behavior.
Methods
SmartDroid employs a two-stage approach:
- Static Path Selector: This component first disassembles the Android application's Dalvik bytecode into smali code for easier analysis. It then constructs two key graphs:
- Function Call Graph (FCG): Maps function calls to identify paths leading to sensitive APIs (e.g., those related to SMS or device ID access).
-
Activity Call Graph (ACG): Analyzes
Intentobjects to map how activities transition from one to another. By combining these graphs, the Static Path Selector identifies "expected Activity switch paths" – sequences of activities that are likely to lead to sensitive behaviors. -
Dynamic UI Trigger: This component takes the expected paths from the static analysis and uses them to guide a dynamic analysis. It comprises:
- Runtime Execution Environment: A modified Android emulator instrumented to log sensitive API calls.
- Activity Restrictor: This crucial component ensures the application follows the exact expected Activity switch path. If an interaction leads to an unexpected activity, its creation is blocked.
- UI Interaction Simulator: This module automatically traverses the UI elements within each activity of the expected path. It intelligently interacts with UI elements (e.g., by simulating clicks) based on the path information, aiming to trigger the sensitive behavior. The sequence of UI elements interacted with, along with their event types and coordinates, forms the discovered UI-based trigger condition.
Datasets
The paper evaluates SmartDroid on several real-world Android malware samples. While no new benchmark dataset is introduced, the authors use a collection of applications obtained from sources like Contagio and the Android Market, including the "Horoscope" app (used as an illustrative example), "a.payment.operaupdater," and "kate.v2.2," among others.
Key Insights and Ideas
- UI Interactions as a Stealth Mechanism: The paper highlights that UI interactions are not just for user experience but can be a sophisticated method for malware to evade detection by hiding sensitive actions.
- Hybrid Approach is Key: Neither static analysis alone (which can't fully predict UI behavior) nor dynamic analysis alone (which struggles with complex UI triggers) is sufficient. The synergy of static path identification and guided dynamic interaction is essential.
- Activity Restrictor's Importance: The ability to strictly enforce the predicted Activity switch paths is critical. Without it, random or incorrect UI interactions could derail the analysis and prevent reaching sensitive behaviors.
- Beyond Simple Clicks: While the current implementation focuses on basic UI events, the paper acknowledges the complexity of gestures and other advanced interactions, pointing towards future research.
Key Results
SmartDroid was evaluated on several Android malware samples. The results, summarized in Table 2, show that the system can effectively identify UI-based trigger conditions. For instance, the "Horoscope" app, which requires specific UI interactions to leak the IMEI, was successfully analyzed. The system identified a specific sequence of UI interactions (EntryPoint → My_iHoroscope → My_Sign → ChooseSign → CheckConnection) that leads to the sensitive behavior. The paper also demonstrates SmartDroid's ability to detect SMS-sending malware that would otherwise be missed. The evaluation shows that SmartDroid can automatically and efficiently reveal these conditions, augmenting the capabilities of existing dynamic analysis tools.
Limitations and Future Work
The authors acknowledge several limitations and propose future directions:
- Data Dependency: SmartDroid currently focuses on control dependency (UI events guiding execution flow). It does not fully handle data dependency, where the outcome of a sensitive behavior depends on specific data values set by UI interactions (e.g., a comparison instruction).
- Complex Logic-Based Triggers: Malware might trigger sensitive actions only after a certain number of interactions (e.g., the fifth click). SmartDroid, in its current form, doesn't handle such logic-based triggers directly.
- Advanced UI Events: The system currently handles basic UI events like clicks but not more complex gestures (swipes, pinches) or touch events.
- Native Code Analysis: The analysis is primarily on Dalvik bytecode. Analyzing sensitive behaviors triggered via JNI calls into native code (C/C++) is not covered.
- Activity Lifecycle: The dynamic analysis primarily focuses on the
onResumestate. Sensitive behaviors triggered during other lifecycle methods (onPause,onStop,onDestroy,onRestart) are not fully addressed, though potential solutions are suggested.
Future work includes incorporating data dependency analysis, developing techniques to handle logic-based triggers (potentially through APK rewriting), supporting gesture recognition, and extending analysis to native code.
Summary updated