RoMA: Robust Malware Attribution via Byte-level Adversarial Training with Global Perturbations and Adversarial Consistency Regularization

Yuxia Sun, Huihong Chen, Jingcai Guo, Aoxiang Sun, Zhetao Li, Haolin LiuarXiv 2025 · DOI · arXiv

Abstract

Attributing malware to specific Advanced Persistent Threat (APT) groups is critical for cyber-intelligence, yet modern deep learning models are highly susceptible to adversarial "anti-attribution" techniques. We present RoMA (Robust Malware Attribution), a novel adversarial training framework that hardens models against byte-level manipulations. By employing a learned "global" perturbation strategy and consistency-based regularization, RoMA achieves over 80% accuracy against sophisticated attacks—more than double the performance of existing state-of-the-art methods—while significantly reducing training time.

Introduction

Malware attribution involves identifying the threat actor behind a malicious file, a task increasingly handled by deep learning models like MalConv that process raw bytes. However, these models are notoriously fragile. Attackers can perform functionality-preserving modifications, such as appending bytes to "slack space," causing model accuracy to drop from over 90% to near zero. Existing defenses often rely on multi-step adversarial training, which is computationally prohibitive and often fails to generalize against diverse malware manipulations.

The RoMA Framework

RoMA introduces a single-step adversarial training approach designed for both efficiency and robustness. The architecture is built around two core innovations:

1. Global Perturbation (GP) Strategy

Rather than generating stochastic noise for each sample, RoMA maintains a pool of learned perturbation patterns. A dedicated "Selection Head" identifies the most effective pattern for a given file during training. This allows the model to anticipate and defend against common structural strategies used by attackers to obfuscate malware identity.

2. Adversarial Consistency Regularization

To maintain stable predictions under attack, RoMA utilizes two specialized loss functions:

  • Adversarial Contrastive Loss ($L_{AC}$): Ensures that "clean" and "attacked" versions of the same sample are mapped to similar regions in the latent representation space, while maximizing the distance between different APT groups.
  • Adversarial Distribution Loss ($L_{AD}$): Enforces stability in the model's final probability distribution across threat groups, even when input bytes are perturbed.
The RoMA architecture, featuring the Global Perturbation Module and consistency-based loss functions.

Experimental Evaluation

The researchers evaluated RoMA using AMG18, a new benchmark dataset comprising 6,360 malware instances from 18 distinct APT groups. AMG18 provides a realistic testbed with verified samples and representative class imbalances.

Performance and Robustness

RoMA demonstrates superior resilience compared to seven baseline methods. Under a rigorous PGD-50 attack—a standard benchmark for adversarial robustness—RoMA maintained 80.13% accuracy, whereas the next best method (PGD-4-AT) achieved only 36.85%.

Efficiency and Generalization

Beyond robustness, RoMA is highly efficient. It completes training in approximately 2,378 minutes, nearly twice as fast as PGD-4-AT. Notably, RoMA also improves standard accuracy on clean data (91.00% vs. 90.06% for the baseline), indicating that its adversarial training serves as an effective regularizer.

t-SNE visualizations of latent representations. RoMA (d) produces significantly tighter and more distinct clusters for different APT groups compared to MalConv (a) and other adversarial training methods (b, c).

Conclusion

RoMA addresses the critical vulnerability of malware attribution models to adversarial deception. By learning global perturbation patterns and enforcing consistency, it provides a robust and efficient defense mechanism. Future work will explore extending this approach to other file formats like ELF and Mach-O, and applying the framework to broader malware detection tasks.

Summary updated

Abstract

Attributing APT (Advanced Persistent Threat) malware to their respective groups is crucial for threat intelligence and cybersecurity. However, APT adversaries often conceal their identities, rendering attribution inherently adversarial. Existing machine learning-based attribution models, while effective, remain highly vulnerable to adversarial attacks. For example, the state-of-the-art byte-level model MalConv sees its accuracy drop from over 90% to below 2% under PGD (projected gradient descent) attacks. Existing gradient-based adversarial training techniques for malware detection or image processing were applied to malware attribution in this study, revealing that both robustness and training efficiency require significant improvement. To address this, we propose RoMA, a novel single-step adversarial training approach that integrates global perturbations to generate enhanced adversarial samples and employs adversarial consistency regularization to improve representation quality and resilience. A novel APT malware dataset named AMG18, with diverse samples and realistic class imbalances, is introduced for evaluation. Extensive experiments show that RoMA significantly outperforms seven competing methods in both adversarial robustness (e.g., achieving over 80% robust accuracy-more than twice that of the next-best method under PGD attacks) and training efficiency (e.g., more than twice as fast as the second-best method in terms of accuracy), while maintaining superior standard accuracy in non-adversarial scenarios.
BibTeX
@misc{sun2025roma,
  author = {Yuxia Sun and Huihong Chen and Jingcai Guo and Aoxiang Sun and Zhetao Li and Haolin Liu},
  title = {{RoMA: Robust Malware Attribution via Byte-level Adversarial Training with Global Perturbations and Adversarial Consistency Regularization}},
  year = {2025},
  eprint = {2502.07492},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.07492},
}
Figure