arXiv:2610.20427cs.CROct 2026

Manuscript Offprint

arXiv:2610.20427

Phantomware: a Data Augmentation Framework for the Detection of Emerging Malware Campaigns

Antonino Rullo

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Detecting unseen malware variants remains a major challenge as malware families continuously evolve. This issue is exacerbated in data-scarce scenarios such as emerging malware campaigns, where only a few samples are available to train robust detectors. A common strategy is to proactively generate malware variants and use them as augmentation data to expose models to a broader range of potential threats. Existing approaches that generate functional malware variants through adversarial manipulation suffer from several important limitations. Generated samples must remain executable and preserve their malicious behavior, requiring costly validation through execution and analysis. Moreover, the adversarial objective provides limited control over the resulting augmentation dataset: it cannot guarantee the generation of sufficiently diverse variants, or even a single successful sample, making the effectiveness of the augmentation process inherently unpredictable. Finally, these approaches typically rely on a well-trained detector to guide generation, an assumption that may not hold in data-scarce scenarios such as early-stage malware campaigns. We formally and empirically demonstrate these limitations and propose Phantomware, a data augmentation framework designed for extreme data scarce scenarios. Phantomware operates entirely in the representation space of a pretrained malware detector, avoiding the costly generation and validation of functional binaries. By exploiting latent-space geometry, it generates synthetic malware representations of a target family in a controlled manner, providing a constructive guarantee on the generation of diverse training samples. Extensive experiments on real malware families demonstrate that Phantomware improves detection of unseen variants and provides robustness against both real and adversarially generated malware samples.

1 Introduction

Malicious software, commonly known as malware, has existed for decades and continues to represent one of the most persistent threats in modern computing systems. With the widespread adoption of the Internet and the growing interconnectedness of devices, the speed and scale at which malware can propagate have increased dramatically. Moreover, the evolution of artificial intelligence has enabled adversaries to deploy malicious code rapidly, diversify their attack vectors, and coordinate large-scale campaigns with unprecedented efficiency.

A major challenge in malware detection arises from the continual creation of malware variants. These variants are often generated through obfuscation techniques specifically engineered to evade existing defenses. Common evasion strategies, such as instruction reordering [40], function reordering [37], insertion of NOP operations [44, 59], and other semantic-preserving transformations, allow attackers to produce syntactically distinct programs that nevertheless retain their malicious functionality [6].

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Malware variants that share the same behavioral intent but differ in their syntactic representation collectively constitute a malware family. In practice, variants belonging to well-represented families (i.e., families with a large number of known samples) are comparatively easier to detect, because classifiers can learn richer and more stable malicious patterns from the abundant training data. Conversely, variants from small families pose a harder detection problem due to the scarcity of available samples from which to learn discriminative features.

Motivations To address this issue, a natural strategy is to proactively generate malware variants that can supplement the training set, anticipating the evolution of small families. However, generating functional malware variants is time consuming because error-prone and computationally expensive: variants must remain executable and preserve the original malicious behavior, which typically requires validation through dynamic analysis in sandbox environments.

Malware generation can also be performed adversarially, that is, by creating variants specifically designed to evade a target detection system. The attack seeks functionality-preserving perturbations that moves the classifier's decision toward the benign class while maintaining the malicious behavior of the original sample. The resulting evasion samples can then be used to retrain the detector, initiating a continual arms race in which the model is iteratively adapted to emerging attack strategies. However, despite the considerable progress achieved by adversarial malware generation as an offensive technique, its actual contribution to cybersecurity remains largely unexplored. Indeed, state-of-the-art adversarial approaches have been evaluated exclusively in terms of their evasion capability, where success is measured by their ability to bypass existing malware detectors (e.g., VirusTotal), whereas their effectiveness as defensive tools for improving detector robustness and generalization has been underinvestigated. Moreover, these approaches suffer from three critical limitations: (i) the process is time-consuming due to the need for functional correctness checks; (ii) when only a limited number of malware samples is available, the generation procedure may fail to produce a sufficiently large and/or diverse number of adversarial samples for effective finetuning; and (iii) it assumes the availability of a well-trained detector, which is unlikely in scarce-data scenarios, making the adversarial component practically ineffective when dealing with early-stage malware campaigns.

An alternative approach is to generate representations of malware variants, that is, synthetic malware embeddings within a learned latent domain rather than constructing functional executables. These generated embeddings do not correspond to real malware samples; instead, they serve as constructive artifacts that approximate the potential distribution of small malware families. By enriching the embedding space in this way, detectors can be trained on a more diverse set of representations and can expand their decision boundaries toward regions that real future variants may plausibly occupy, eliminating the need for costly functionality validation. However, existing approaches rely on an adversarial generation objective, which provides only limited control over the location of the generated samples, as their primary goal is to induce misclassification. Consequently, the generated samples typically concentrate around the detector's decision boundary, providing limited coverage of other potentially challenging regions of the latent space. Moreover, these approaches generally assume access to tens or hundreds of real samples [29, 52], and their effectiveness in early-stage malware campaigns, where only a handful of samples are available, has not been demonstrated.

Contribution To fill these gaps, we propose Phantomware, a geometry-guided embedding generation approach which synthesizes malware-like latent representations by perturbing representative benign embeddings along malware-discriminative directions. The method does not require a large corpus of malware data, and leverages the geometric structure of the benign manifold to generate hard synthetic malware embeddings that populate challenging regions of the feature space. Since Phantomware operates entirely in the learned latent space, the generated samples correspond to plausible feature-space variations of malware rather than fully functional or semantically meaningful executable files. These synthetic representations are subsequently used to finetune the detector, enhancing its robustness against underrepresented malware families. The name Phantomware reflects the essence of the approach: the generated embeddings are “phantoms” – latent representations with no corresponding physical counterpart. 1^{1}

Our contributions can be summarized as follow:

1^{1}Phantom is broader term for any illusion or manifestation with no physical reality.

• We provide a systematic assessment of adversarial malware generation techniques as data augmentation strategies. Through both formal analysis and extensive empirical evaluation, we demonstrate that existing adversarial approaches cannot guarantee the generation of sufficiently diverse and representative synthetic samples, thereby limiting their effectiveness in improving detector robustness and generalization.

• We present Phantomware, a geometry-guided data augmentation framework designed for improving the detection performance of pretrained malware detectors with minimal computational effort and minimal reliance on malware data, making it suitable for extreme data-scarce scenarios such as emerging malware campaigns. We demonstrate the effectiveness of Phantomware through an extensive experimental evaluation on both real malware families and adversarially generated malware samples. We make the Phantomware implementation publicly available in an open-source repository. 2^{2}

The rest of the paper is organized as follows. In Section 2 we discuss related work; in Section 3 we formally demonstrate the limitations of adversarial generation approaches; in Section 4 we describe the Phantomware framework; in Section 5 we empirically demonstrate either the effectiveness of Phantomware and the shortcomings of adversarial approaches through an extensive set of experiments; finally, in Section 6 we conclude the paper.

References (58)