TL;DR
PhantomCall is a novel black-box adversarial attack that successfully evades machine learning-based malware detectors by manipulating a binary's Function Call Graph (FCG). By injecting fully executable, register-neutral dummy functions through a clever trampoline mechanism, it alters global graph topology without breaking the malware's original functionality. The attack achieves an 85–100% success rate across diverse model architectures, outperforming prior state-of-the-art methods while generating evasive variants up to 2.9× faster.
What Problem Does This Paper Address?
While machine learning (ML) has become a cornerstone of modern static malware detection, these models possess brittle decision boundaries that clever adversaries can exploit. Prior adversarial attacks on Windows Portable Executable (PE) malware have primarily targeted raw bytes, PE headers, or intra-function Control-Flow Graphs (CFGs).
However, modern graph-based detectors increasingly rely on the Function Call Graph (FCG)—the macro-level graph representing how functions call one another—as a highly discriminative feature. Until now, the FCG has remained largely unexplored as an attack surface in the Windows PE ecosystem. The authors of PhantomCall address a critical question: Can an attacker efficiently generate a functionally equivalent, executable adversarial malware variant that evades ML classifiers solely by perturbing its FCG under a strict black-box setting?
Methods
PhantomCall operates entirely as a black-box attack, meaning it requires no access to the target model's internal weights or gradients—only the scalar maliciousness score returned from a query. It consists of two primary components:
- Function Call Graph Perturbation Module: The attack identifies internal direct call sites within the malware. It overwrites the original 5-byte call instruction with an unconditional
jmpto a newly injected code section (.htext). This section acts as a trampoline: it first executes the original call to preserve stack semantics, then executes explicit calls to $k$ injected dummy leaf functions, and finally jumps back to the original execution flow. This process introduces new nodes and edges to both the CFG and FCG. - Classifier-Guided Injection Search Module: To navigate the discrete, combinatorial search space of where and what to inject, PhantomCall utilizes search algorithms (Greedy search and Simulated Annealing) guided by the classifier's feedback. The search optimizes two dimensions: the specific semantic NOP (No-Operation) sequences placed inside the dummy functions/trampolines, and the volume of dummy functions injected per site.
The dummy functions themselves are engineered to be register- and memory-neutral, ensuring that their execution leaves the program state completely unchanged.
Datasets
The authors evaluated PhantomCall using real-world datasets to ensure practical relevance:
- Malware Pool: x86 Windows PE malware samples collected from MalwareBazaar (2025 submissions), filtered to exclude packed binaries and ensure at least one internal call instruction.
- Benign Pool: 17,886 benign samples sourced from the Practical Security Analytics PE dataset, used to calibrate False Positive Rates (FPR) and train baseline models.
- SAFE+GNN Training Set: A separate 2024 corpus of 14,000 MalwareBazaar samples was used to train the FCG-based Graph Neural Network (GNN) from scratch to evaluate temporal robustness.
Key Insights and Ideas
- Dual CFG+FCG Perturbation is Essential: Prior state-of-the-art attacks like MalGuise only manipulate the intra-function CFG (by splitting basic blocks). PhantomCall demonstrates that against pure FCG-based models, CFG-only modifications completely fail. Altering the macro-topology of the program is required to shift graph embeddings.
- Architecture-Dependent Vulnerabilities: The attack reveals that different ML architectures are sensitive to entirely different dimensions of the perturbation space. Classifiers processing instruction content (like MalConv or MalGraph) are highly sensitive to NOP instruction diversity. Conversely, pure FCG classifiers (like SAFE+GNN) use global mean pooling that aggregates over all function nodes; they are indifferent to function body content but highly vulnerable to injection volume (the sheer number of dummy nodes added).
- Minimal Footprint Evasion: For byte-level and hierarchical graph models, the majority of malware samples achieved successful evasion with only a single call site modification, incurring a negligible size overhead of less than 0.5%.
Key Results
PhantomCall was evaluated against three distinct detection paradigms: MalConv (raw-byte CNN), MalGraph (CFG+FCG GNN), and SAFE+GNN (pure FCG GNN) at 0.1% and 1% FPR thresholds.
- High Success Rates: The best PhantomCall variant achieved an 85–100% Attack Success Rate (ASR) across all models and thresholds.
- Baseline Domination: On the pure FCG model (SAFE+GNN), prior baselines failed completely (<2% ASR). PhantomCall achieved up to 97.4% ASR on the same target.
- Speed and Efficiency: PhantomCall generated evasive variants up to 2.9× faster than MalGuise.
- Functionality Preservation: Sandbox-based semantic testing verified that 86–97% of the generated evasive variants perfectly preserved their original malicious runtime behaviors.
- Defense Resilience: Lightweight adversarial finetuning reduced the attack's effectiveness but left a significant residual ASR (up to 83%). Rule-based structural heuristics designed to catch the injected sections suffered from high false-positive rates (9.5%–17.4%) on benign software.
Limitations and Future Work
- Simple Dummy Bodies: The injected dummy functions are parameterless and lack complex control flow. Sophisticated defenders could potentially filter out these simple, semantically inert functions. The authors suggest that enriching dummy bodies with benign API calls, conditional branches, and local variables is a natural next step.
- Overlay-Dependent Failures: The primary cause of semantic preservation failure (the 3–14% that broke during execution) was due to "overlay-dependent" malware. When PhantomCall inserts a new section, it shifts the absolute file offset of any appended data overlays, which can break malware that attempts to self-read its own binary at hardcoded offsets.
- Defensive Open Problem: Developing robust graph neural networks that utilize attention mechanisms to down-weight structurally irrelevant or redundant injected function nodes remains an urgent, open challenge for defenders.
Summary updated