Manuscript Offprint

arXiv:2609.00705

PhantomCall: Evading ML Malware Detectors via Function Call Graph Perturbation

Md Ajwad Akil, Adrian Shuai Li, Imtiaz Karim, Arun Iyengar, Ashish Kundu, Elisa Bertino

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

Abstract

Prior adversarial attacks on Windows PE malware detectors target raw bytes, PE headers, or intra-function control-flow graphs, leaving the function call graph (FCG) unexplored as an attack surface. Yet the FCG structure is an important feature in graph-based malware detectors. We present PhantomCall, a black-box attack that perturbs the FCG of Windows PE malware by injecting fully executable dummy functions at targeted call sites, adding new nodes and edges to both the CFG and FCG while preserving program semantics. We pair this structural perturbation with classifier-guided search and tunable injection parameters, effective across three architecturally distinct classifiers. Evaluated on a 2025-collected Windows malware corpus against MalConv (raw-byte CNN), MalGraph (graph-based GNN), and SAFE+GNN (pure FCG GNN trained from scratch on a 2024 corpus) at two FPR thresholds, the best PhantomCall variant achieves 85-100% attack success rate across all configurations, exceeding prior state-of-the-art by up to 14.78 percentage points on MalGraph and 95.5 percentage points on SAFE+GNN, and generating evasive variants up to 2.9× faster on average across all targets. For MalConv and MalGraph, the majority of evasions require only a single call site modification, and 86-97% of evaluated evasive variants preserve the original malicious behavior in sandbox-based semantic testing across all configurations.

1 Introduction

Despite decades of defensive research, malware remains among the most persistent and economically devastating threats in modern computing. In 2025 alone, global cybercrime damages reached an estimated 10.5trillion[12],withthreatintelligencesystemsflaggingover450,000newmaliciousfileseveryday[7],aratethathasincreasedyear−over−year[26].MicrosoftWindowsstillremainstheprimaryattackplatform,accountingforapproximately8710.5 trillion [12], with threat intelligence systems flagging over 450,000 new malicious files every day [7], a rate that has increased year-over-year [26]. Microsoft Windows still remains the primary attack platform, accounting for approximately 87% of all desktop malware detections in 2025, which is nearly seven times the rate seen on macOS [66]. The financial toll is severe as the median ransom payment in 2025 reached 1 million per incident [64], while the average cost of an extortion or ransomware breach stands at $5.08 million [25].

The defensive landscape has evolved considerably in response to these evolving threats. Signature-based antivirus, which emerged in the 1990s, blacklists files against a database of known malware patterns, is trivially defeated by slight variant generation or code transformation that is absent in the database [42]. Over the past decade, machine learning (ML)-based detectors have therefore become a central defensive layer. These include raw-byte convolutional neural network-based models [56,57], static PE (Portable Executable) feature ensembles trained on header and section metadata [6], and graph neural networks (GNNs) that operate on control-flow graphs (CFG) and function-call graph (FCG) structure using node and edge features [5,41,61,62,74,75,77]. Modern commercial products, including Microsoft Defender, now integrate ML-based components alongside traditional signatures [48], enabling continuous retraining on fresh telemetry from billions of endpoints. ML-based static malware detection is fast, scalable, requires no sandbox and has become a vital deployed layer of real-world malware detection.

However, recent advances in adversarial machine learning have demonstrated that ML systems are inherently vulnerable to carefully crafted perturbations, whether in image classifiers [19,82], language models [83], or vision-language models [76]. These attacks exploit structural properties of learned models, including high-dimensional feature spaces and brittle decision boundaries, enabling adversaries to induce misclassification with minimal, targeted changes. ML-based malware detectors are particularly exposed to such vulnerabilities. Unlike other domains, adversaries in this setting have strong control over the input generation process and can modify malware samples while preserving their functionality and evasiveness [11,42]. This creates a natural and powerful adversarial loop, making robustness a central challenge. Consequently, studying adversarial malware generation against these systems serves two complementary purposes: ① Realistically characterizing the attack surface of production systems under query-only black-box access, and ② Driving the development of more robust detectors through adversarial training and red-teaming. This is particularly important because ML detectors already largely resist classical obfuscation techniques [42], making structured adversarial perturbations a novel and practically significant threat vector. While prior adversarial attacks on Windows PE malware detectors have targeted raw bytes [32, 35, 65], PE headers and overlays [13, 37], or intra-function control-flow graphs [43, 79, 80], graph-based detectors increasingly rely on the function call graph structure as a discriminative feature [27, 41, 61, 62], making its adversarial robustness directly relevant to the security of these systems. FCG-level perturbation has been studied in Android malware [38, 39, 63, 81] and WebAssembly [30], but these approaches inject either provably dead calls or trivially short-circuiting stubs, and none treat the perturbation configurations such as injected function body content, injection volume, or injected NOP content search strategy as variables that can be tuned against the target classifier. Whether fully executable FCG perturbations with configurable injection strategies can evade architecturally diverse detectors under black-box access, and how the attack mechanism differs across classifier architectures, remains an open and understudied problem.

Problem. Given the aforementioned gaps, we investigate the following question: Given a Windows PE malware binary detected by an ML-based classifier, can we efficiently generate a functionally-equivalent, executable adversarial variant that evades the classifier by perturbing its function call graph, under a black-box setting?

Our Approach. PhantomCall perturbs the function call graph of a malware binary by injecting fully executable dummy functions at targeted call sites, creating new nodes and edges in both the CFG and FCG (the latter being our primary contribution, since CFG-level displacement has been explored in prior work) while preserving execution semantics. A classifier-guided search iteratively explores injection configurations at each site, using the detector's maliciousness score as feedback. The same attack framework achieves high evasion rates across three architecturally distinct classifiers by adjusting only its key hyperparameters — the number of injected dummy functions, the number of call sites to perturb, and the search iteration budget, while generating evasive variants at practical throughput.

Evaluation. We evaluate PhantomCall on a 2025-collected Windows malware corpus against MalConv (raw-byte CNN) [56], MalGraph (CFG+FCG-based GNN) [41], and SAFE+GNN (pure FCG GNN) [62] at 0.1% and 1% FPR thresholds. The best PhantomCall variant achieves 85-100% attack success rate (ASR) across all configurations, exceeding prior state-of-the-art by up to 14.78 percentage points on MalGraph and 95.5 percentage points on SAFE+GNN (where both prior baselines fail to exceed 2% ASR), while generating evasive variants up to 2.9×2.9 \times faster on average. ASR remains 84.5-100% when restricted to high-confidence detec-

tions (P(malware) ≥ 0.95), and 86-97% of evasive samples retain their original malicious functionality. Adversarial fine-tuning reduces ASR to 26-83% depending on the classifier, and structural heuristic defenses achieve 100% detection but at 9.5-17.4% false positive rates, and a simple attack modification (linking injected functions via call edges) further weakens the lowest-FPR heuristic. Neither defense strategy alone neutralizes the attack.

Contributions. To summarize, our contributions are:

• To our knowledge, we present the first adversarial attack on Windows PE malware that perturbs the function call graph by injecting fully executable, reachable dummy functions.

• We design a configurable attack framework with classifier-guided search (greedy and adaptive simulated annealing) and tunable injection parameters, effective across three architecturally distinct classifiers through hyperparameter adjustment alone.

• We conduct a rigorous evaluation on a 2025-collected malware corpus measuring both evasion rate and generation throughput, with comprehensive ablation studies, semantic preservation analysis, and defense evaluation including adversarial finetuning and structural heuristic detection.

All of our experimental code and dataset hashes will be released soon.

References (67)