XLM4Detector: Multistage Deobfuscation and Semantic-Driven Excel 4.0 Macro Malware Detection
- 29 May 2025
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Internet of Things Journal
- Vol. 12 (16) , 33271-33292
Abstract
Excel 4.0 Macro leverages XLM code to directly invoke system APIs and automate complex tasks, making it a widely used tool in phishing attacks, APT campaigns, and IoT intrusions in recent years. By constructing various obfuscated macro malware, attackers can easily evade firewalls and detection systems, thereby achieving persistent attacks. However, existing XLM malware defense mechanisms lack in-depth analysis of XLM malware families and behaviors, failing to integrate multi-dimensional features and semantic relationships effectively. As a result, detection systems struggle to accurately identify malicious operations in real-world attacks, leading to low robustness and accuracy. To this end, we propose XLM4Detector, a novel Excel 4.0 Macro malware detection framework based on multi-stage deobfuscation and multi-view semantic fusion. First, XLM4Detector integrates AST analysis, simulated execution, and regular expression matching to construct a multi-stage deobfuscation algorithm, enabling precise deobfuscation and XLM code extraction. Second, we introduce four feature extraction methods that capture fine-grained features at the word (string), token (function), abstract syntax tree, and semantic relationship levels. Then, we design four embedding representations (XlmWord2Vec, XlmToken2Vec, XlmAst2Vec, XlmRela2Vec) and employ a multi-view semantic fusion algorithm for feature alignment. Finally, we develop an MHSACNN-BiGRU model to capture hierarchical semantic relationships, effectively enabling XLM malware behavior detection and family classification. Experimental results demonstrate that XLM4Detector effectively reconstructs obfuscated XLM source code and accurately detects XLM malware families and behaviors. It outperforms state-of-the-art methods in detection accuracy, robustness, and generalization. Our framework provides critical technical support for IoT security defense, malicious document detection, and APT tracking.Keywords
Funding Information
- National Natural Science Foundation of China (62172308)
- National Natural Science Foundation of China (62202118)
- National Natural Science Foundation of China (72261004)
- Major Scientific and Technological Special Project of Guizhou Province ([2024]014)
- Guizhou Provincial Basic Research Program (MS[2025]686)
- Guizhou Provincial Key Technology Research and development Program (PA[2025]004)
- Research Project for Recruited Talents at Guizhou University (GDRJH[2024]15)
- Scientific and Technological Innovation Talent Team of Guizhou Province for Cybersecurity Protection of Computing Power Network (CXTD[2025]029)
This publication has 37 references indexed in Scilit:
- Can serious gaming tactics bolster spear-phishing and phishing resilience? : Securing the human hacking in Information SecurityInformation and Software Technology, 2024
- Short- versus long-term performance of detection models for obfuscated MSOffice-embedded malwareInternational Journal of Information Security, 2023
- Detection of MSOffice-Embedded Malware: Feature Mining and Short- vs. Long-Term Performance2022
- Analysing corpus of office documents for macro-based attacks using Machine LearningGlobal Transitions Proceedings, 2022
- MPSAutodetect: A Malicious Powershell Script Detection Model Based on Stacked Denoising Auto-EncoderComputers & Security, 2022
- Malware Detection in Word Documents Using Machine Learning2021
- Using fake text vectors to improve the sensitivity of minority class for macro malware detectionJournal of Information Security and Applications, 2020
- Towards Efficient Detection of Malicious VBA Macros with LSI2019
- Macros Finder: Do You Remember LOVELETTER?2018
- Preventing Exploits in Microsoft Office Documents Through Content Randomization2015