A multi-view context-aware approach to Android malware detection and malicious code localization

Annamalai Narayanan, Mahinthan Chandramohan, Lihui Chen, Yang Liu

TL;DR

This paper introduces MKLDROID, a novel framework for Android malware detection and malicious code localization. By integrating multiple "views" of an app's behavior using graph kernels and Multiple Kernel Learning (MKL), MKLDROID achieves superior detection accuracy and can pinpoint the exact malicious code segments within an app, a crucial capability for security analysts.

What Problem Does This Paper Address?

The ever-increasing volume and sophistication of Android malware pose a significant challenge. Existing detection methods often rely on a single type of feature (e.g., API calls, permissions), which can be circumvented by malware designed to hide its malicious intent in specific views. This "single-view" approach limits detection capabilities, as malware can disguise itself in one perspective while remaining malicious. Furthermore, most current methods act as black boxes, only indicating if an app is malicious without specifying where the malicious code resides, hindering deeper analysis and countermeasure development. This paper aims to address these limitations by creating a more robust, multi-faceted detection system that can also precisely locate malicious code.

Methods

MKLDROID employs a multi-view approach, extracting five distinct "semantic views" of an Android app's behavior. These views are derived from the app's Control Flow Graph (CFG) and include:

  • API Dependency Graphs (CADG): Focuses on security-sensitive API calls.
  • Permission Dependency Graphs (CPDG): Analyzes nodes related to app permissions.
  • Source & Sink Dependency Graphs (CSSDG): Tracks information flow from sources to sinks.
  • Instruction Sequences (CICFGins): Captures patterns of Dalvik bytecode instructions.
  • CFG Signatures (CICFGsigns): Uses textual signatures of basic block control flow.

A key innovation is the use of a Contextual Weisfeiler-Lehman Graph Kernel (CWLK) to capture both structural and contextual information within these views. This allows for a more nuanced understanding of app behavior. To combine the strengths of these diverse views and mitigate their individual weaknesses, Multiple Kernel Learning (MKL) is employed. Specifically, they use SMO-MKL to learn optimal weights for each view, creating a unified, more accurate detection model.

A unique contribution is MKLDROID's ability to perform malicious code localization. After predicting an app as malicious, the framework assigns "maliciousness scores" (m-scores) to individual basic blocks within the app's CFG. These scores are then aggregated to methods and classes, effectively highlighting the most suspicious code segments. This interpretability is achieved by switching from the dual to the primal formulation of the SVM, allowing for feature contribution analysis.

Datasets

The paper utilizes a combination of benchmark datasets and real-world "wild" apps:

  • Malware Datasets: DREBIN (DR), Virus-share (VS).
  • Benign Datasets: Google Play 1 (GP1), Google Play 2 (GP2).
  • Wild Datasets: Apps collected from third-party markets (Android Drawer, AnZhi, AppsApk, FDroid, SlideMe).
  • Malicious Code Localization Dataset: MYSTIQUE (MYST), augmented by piggybacking malware on benign apps to create a dataset with known malicious classes.

A total of 60,561 apps were used across various experiments.

Key Insights and Ideas

  • The "Disguise" Problem: Malware can easily hide its malicious intent in one view (e.g., API calls) but it's much harder to disguise itself across all views simultaneously. This multi-view approach significantly enhances detection robustness.
  • Context is Crucial: Simply looking at structural information (like API calls) isn't enough. Understanding when and how these actions occur (e.g., user-aware vs. user-unaware context) is vital for accurate detection. CWLK's ability to capture this context is a key enabler.
  • MKL for Synergy: Different views have unique strengths and weaknesses. MKL is essential for finding the optimal "blend" of these views, leading to better overall performance than any single view or a simple average.
  • Beyond Black Boxes: The ability to pinpoint malicious code segments (localization) is a game-changer. It moves beyond simply flagging an app as malicious to providing actionable intelligence for security analysts.

Key Results

  • Accuracy: MKLDROID consistently outperformed three state-of-the-art techniques (DREBIN, Allix et al., ADAGIO) across various experimental settings. In one challenging scenario with historically anterior training data, MKLDROID achieved an 11% higher F-measure. In wild app detection, it showed an 8% improvement in F-measure.
  • Efficiency: While MKLDROID is more computationally intensive than some simpler methods due to its multi-view analysis and MKL, it maintains comparable efficiency to other advanced techniques and is significantly faster than some kernel-based approaches.
  • Malicious Code Localization: In experiments on repackaged malware, MKLDROID achieved an impressive 94% average recall in identifying malicious classes within the top 10 ranked classes.

Limitations and Future Work

  • Data-flow and Dynamic Analysis: The current framework relies on static analysis. The authors acknowledge that integrating data-flow analysis and dynamic execution would provide a more comprehensive view but is currently limited by scalability concerns.
  • Population Drift: As a batch-learning system, MKLDROID can struggle with evolving malware patterns over time. The authors propose using online MKL algorithms to address this and enable automatic adaptation.
  • Adversarial Attacks: Like most ML-based systems, MKLDROID could be susceptible to adversarial attacks that inject benign-looking features to mislead the detector.
  • Future Work: The authors plan to incorporate dynamic analysis features and explore online MKL for better adaptation to malware evolution. They also release their results to encourage further research in malicious code localization.

Summary updated

BibTeX
@article{narayanan2018multi,
  author = {Annamalai Narayanan and Mahinthan Chandramohan and Lihui Chen and Yang Liu},
  title = {{A multi-view context-aware approach to Android malware detection and malicious code localization}},
  journal = {Empir. Softw. Eng.},
  year = {2018},
  doi = {10.1007/s10664-017-9539-8},
}
Figure