Introduction
Malware detection remains a critical challenge as authors continuously evolve techniques to evade signature-based systems. While structural representations like Call Graphs (CGs) and Control-Flow Graphs (CFGs) offer more robustness than simple syntax, they often fail to distinguish between benign and malicious behaviors that share similar code structures. This paper introduces the Contextual Weisfeiler-Lehman Kernel (CWLK), a novel graph kernel designed to bridge this gap by incorporating execution context into the analysis of Program Representation Graphs (PRGs).
The Challenge of Context in Malware Detection
A significant hurdle in graph-based malware detection is the lack of expressiveness in standard kernels. For instance, the traditional Weisfeiler-Lehman Kernel (WLK) captures structural neighborhoods but ignores the intent or context of sensitive operations. A benign weather app and a malicious data-leaker might both contain code to transmit location data. The critical difference is the trigger: the weather app acts upon a user's request (user-aware), whereas the malware operates silently in the background (user-unaware). Without this context, classifiers often suffer from high false-positive rates.
Methodology: The CWLK Approach
The authors propose CWLK to enhance the standard WLK algorithm with "contextual re-labeling." The process involves identifying sensitive API entry points and categorizing them based on UI interaction. During the iterative relabeling phase of the WLK algorithm, node labels are augmented with their reachability context.
Crucially, CWLK maintains a computational complexity of O(he), where h is the number of iterations and e is the number of edges, ensuring it remains as efficient as the standard WLK for large-scale production use.
Experimental Evaluation
The study evaluated CWLK using a massive dataset of 54,877 Android applications, including 29,877 malware samples and 25,000 benign apps. The researchers tested the kernel on both Call Graphs (CG) and Inter-procedural Control-Flow Graphs (ICFG).
Key Results
- Superior Accuracy: CWLK achieved an F-measure of 95.82% on ICFGs, outperforming standard WLK and the Neighborhood Hash Graph Kernel (NHGK).
- Beating State-of-the-Art: It surpassed established detectors like DREBIN by 4.87% in F-measure.
- Negligible Overhead: Despite the added contextual layer, the training and testing times remain nearly identical to the standard WLK.
Conclusion
The Contextual Weisfeiler-Lehman Kernel demonstrates that integrating domain-specific context into graph-based machine learning can drastically improve malware detection accuracy without sacrificing performance. By addressing the "false positive" problem where benign apps look like malware, CWLK provides a robust and efficient solution for real-world cybersecurity challenges.
Summary updated