TL;DR
This paper introduces "Malware Makeover," a novel attack that manipulates executable binaries to evade deep neural network (DNN)-based static malware detection. By intelligently modifying functional code, their method achieves near-perfect evasion rates against state-of-the-art DNNs and even fools some commercial antivirus solutions, highlighting the vulnerability of ML-centric security.
What Problem Does This Paper Address?
Modern malware detection increasingly relies on machine learning, particularly deep neural networks (DNNs), to analyze raw executable bytes. These DNNs aim to bypass the need for manual feature engineering, offering a more automated and potentially powerful approach. However, like other ML models, these DNNs are susceptible to adversarial attacks – inputs subtly modified to cause misclassification. The critical challenge in the malware domain is that these modifications must preserve the original functionality of the executable. Previous attacks often added "junk" data to non-functional parts of binaries, which could be easily detected and removed. This paper tackles the problem of creating adversarial examples for static malware detection that are functionality-preserving and modify actual code, making them significantly harder to defend against.
Methods
The core of the "Malware Makeover" attack lies in combining binary diversification techniques with optimization frameworks.
- Binary Diversification: The authors leverage and extend existing binary rewriting and randomization tools, specifically In-Place Randomization (IPR) and Code Displacement (Disp).
- IPR: This technique modifies instructions with equivalent ones, reassigns registers, reorders instructions, and alters stack operations, all while aiming to preserve functionality.
- Disp: This method displaces code blocks to new locations and replaces them with jump instructions, often using "semantic nops" (sequences of instructions that have no side effects) to fill space and maintain program flow.
- Optimization Framework: To guide these diversification techniques, the authors employ optimization algorithms.
- White-Box Attack: In this setting, the attacker has full knowledge of the DNN. They use gradient information to iteratively apply transformations that shift the binary's representation in a direction that maximizes the loss function, pushing it towards a "benign" classification.
- Black-Box Attack: When the DNN's internal workings are unknown, the attack uses a hill-climbing approach. It queries the DNN with transformed binaries and accepts transformations that lead to a higher probability of being classified as benign.
The key novelty is that these transformations target functional parts of the binary, not just padding or metadata.
Datasets
- VTFeed: A newly collected dataset of raw binaries (malware and benign) targeting Windows machines, adhering to the Portable Executable (PE) format. It was sampled from the VirusTotal feed for PE binaries seen in 2020, filtered by antivirus detections, and split into training, validation, and test sets.
- Microsoft Malware Classification Challenge dataset: Used for evaluating commercial antivirus detection.
- VirusShare dataset: Used for collecting malicious binaries for commercial antivirus testing.
- Publicly available benign binaries: Used for testing the correctness of transformations.
Key Insights and Ideas
- Functional Code Modification is Key: Simply adding "junk" bytes to non-executable regions is easily detectable. Modifying actual instructions is far more effective and challenging to defend against.
- Binary Diversification as an Attack Vector: Tools designed for defense (like IPR and Disp) can be repurposed as powerful attack mechanisms when guided by adversarial optimization.
- White-Box vs. Black-Box Effectiveness: The attack is highly effective in both settings, demonstrating its practical threat even when full model knowledge isn't available.
- Commercial Antivirus Vulnerability: The attack successfully evades some commercial antivirus solutions, suggesting a reliance on static analysis and ML that can be exploited.
- Limitations of Prior Defenses: Existing defenses like adversarial training and input sanitization are either too computationally expensive, not applicable to binary data, or can be circumvented by adaptive attackers.
Key Results
- High Evasion Rates: The proposed attack achieved success rates near 100% against three state-of-the-art DNNs for static malware detection in white-box settings.
- Black-Box Success: Even in black-box settings, the attack achieved coverage of 95% and potency of 92% against MalConv, and significant success against AvastNet and Endgame.
- Commercial Antivirus Evasion: The attack fooled commercial antivirus solutions, reducing median detection rates from 55 to 33-36 out of 68 vendors, with one vendor misclassifying 85% of transformed malicious binaries as benign.
- Disp is More Potent than IPR: Transformations leveraging Code Displacement (Disp) generally outperformed In-Place Randomization (IPR) in terms of evasion success.
- Combined Attacks are Stronger: Combining IPR and Disp often yielded better results than using either alone, especially with lower displacement budgets.
- Functionality Preservation: Rigorous testing confirmed that transformed binaries retained their original functionality.
Limitations and Future Work
- Computational Cost: The attack can be computationally expensive, especially in the white-box setting, which limits its direct applicability for real-time adversarial training.
- Recursive Transformations: The current implementation does not recursively apply displacements to already displaced code, which could be an area for improvement.
- Composability of Transformations: While improved, the composability of IPR and Disp transformations could be further enhanced.
- Adaptive Attackers: The authors acknowledge that adaptive attackers could potentially develop new methods to circumvent defenses, even those that show promise.
The authors advocate for augmenting ML-based static malware detection with methods that do not rely on ML, such as template-based reasoning about program semantics, to create a more robust defense against such sophisticated attacks.
Summary updated