Structured Heatmap Learning for Multi-Family Malware Classification: A Deep and Explainable Approach Using CAPEv2
Accurate malware family classification from dynamic sandbox reports continues to be a fundamental cybersecurity challenge. Most prior works depend on random splits that tend to overestimate accuracy, whereas deployment requires robustness under temporal drift as well as changing behaviors. We present a leakage-aware pipeline that transforms CAPEv2 sandbox JSON reports into structured visual heatmaps and evaluate models under stratified and chronological splits. The pipeline rigorously flattens behavioral keys, builds normalized representations, and benchmarks Random Forest, MLP, CNN64, HybridNet, and a modern ResNeXt-50 backbone. On the Avast–CTU CAPEv2 dataset containing ten malware families, Random Forest achieves nearly state-of-the-art accuracy (97.2% accuracy, 0.993 AUC) with high efficiency on CPUs, making it attractive for triage. ResNeXt-50 achieves the best overall performance (98.4% accuracy, 0.998 AUC) and provides visual interpretability via Grad-CAM, enabling analysts to verify predictions. We further quantify efficiency trade-offs (inference throughput and GPU memory) and report ablation studies on vocabulary size and keyset choices. These results affirm that though ensemble methods are still robust, heatmap-based CNNs provide better accuracy, interpretability, and robustness against drift.
Authors
- Hamid Tairi (ORCID: https://orcid.org/0000-0002-4895-3981)
- Omar El Beqqali (ORCID: https://orcid.org/0000-0003-0269-3819)
- Mohamed Lamrini (ORCID: https://orcid.org/0009-0008-8400-1508)
- Jamal Riffi
- Oussama El Rhayati (ORCID: https://orcid.org/0009-0007-5336-7913)
- Hatim Essadeq
Institutions
- Sidi Mohamed Ben Abdellah University (MA)
Publication Details
- Journal
- Journal of Cybersecurity and Privacy
- Published
- 2025-09-10
- DOI
- https://doi.org/10.3390/jcp5030072
- Primary Topic
- Advanced Malware Detection Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00