Abstract
The rapid proliferation of malware has created a significant bottleneck for security analysts who must manually reverse-engineer millions of new samples. While machine learning models offer high detection rates, they often function as "black boxes," providing little insight into the specific malicious behaviors within a file. This paper presents MalwareExpert, an explainable AI framework that represents programs as Function Call Graphs (FCGs) and utilizes deep Graph Neural Networks (GNNs) to not only detect malware but also pinpoint the specific code functions responsible for the threat. MalwareExpert achieves 97.3% detection accuracy and significantly reduces analyst workload by highlighting the most suspicious subgraphs.
Introduction
Manual reverse engineering is a slow, resource-intensive process. Analysts require tools that bridge the gap between automated binary classification and deep manual inspection. MalwareExpert addresses this need for Explainable AI (XAI) in cybersecurity by providing "leads" that guide human experts directly to the most suspicious parts of a binary. By focusing on the logical flow of a program rather than raw byte sequences, the system remains robust against common obfuscation techniques.
Methodology
The MalwareExpert framework follows a three-phase pipeline:
- Sample Pre-processing: Binaries are disassembled using Radare2 to extract Function Call Graphs (FCGs). In these graphs, nodes represent functions and edges represent calls between them.
- Detection (DeeperGCN): The system employs an 8-layer DeeperGCN architecture. To handle large, complex software graphs, it integrates skip connections and layer normalization to prevent over-smoothing and over-squashing.
- Explanation: Once a file is flagged, the system uses GNNExplainer and graph pruning strategies to identify the subgraphs that most influenced the malicious verdict. These subgraphs are then mapped back to actual code functions for human review.
To formalize these operations, the framework utilizes specific mathematical notations for sample sets, embeddings, and the neural network model.
Experimental Setup and Datasets
The study utilized a comprehensive collection of Windows Portable Executable (PE) files:
- Benign Samples: 44,953 files from Windows 10, Chocolatey, and Cygwin.
- Malicious Samples: 75,257 viruses from VirusShare and 2,865 real-world APT samples from 12 state-sponsored groups.
- Ground Truth: Metadata from IDA Pro’s Lumina service provided expert-annotated "essential" functions for samples like WannaCry and Lockbit to validate the explainer's accuracy.
Key Results
- Detection Performance: The model achieved 97.3% accuracy and a 96.5% recall rate, outperforming byte-based models like MalConv.
- Generalization: The system maintained high detection rates when tested against previously unseen APT samples.
- Explainability: In case studies of WannaCry and AZORult, the explainer correctly identified critical functions related to SMB scanning and credential theft.
- Efficiency: Analysts using the system's "leads" only need to examine the top 2% of flagged functions to find all expert-annotated malicious code.
Conclusion and Future Work
MalwareExpert demonstrates that GNNs can provide both high-accuracy detection and meaningful explanations for malware analysis. While currently limited by the constraints of static analysis—such as packed or heavily obfuscated code—future iterations will explore the integration of dynamic behavior analysis and defenses against adversarial attacks targeting graph-based models.
Summary updated