Adding ~20 benign API imports drops malware recall from 87.5% to 30% and forces target category classification
Targeted injection of a small number of benign Win32 API imports can cause static malware detectors to misclassify malware as a chosen benign category
AI/ML arXiv 18 May 2026 Attack Real-world evidence
Published as “Learning to Look Benign: Targeted Evasion of Malware Detectors via API Import Injection”
Why it matters
Attackers can bypass static API-based malware detectors and masquerade as specific benign software with only a few imported functions, highlighting the need for combined static-dynamic defenses.
Summary
The paper shows that adding just 20 Win32 API imports can drop a static malware detector's recall from 87.5% to 30% and 99% of evaded samples are classified as the chosen benign category, demonstrating effective targeted evasion. The attack works across a six-class dataset of 3,799 samples and also reduces detections on commercial VirusTotal engines by an average of 54.5%. Evidence is based on repeated experiments (20 runs) comparing the CVAE against frequency-based and random baselines, with consistent superiority. However, effectiveness is modest at very low injection sizes (e.g., k=5) and the study is limited to static IAT features and a single dataset.
What they found 2
- Adding 20 API imports reduces malware recall to 30%
“adding just 20 API imports reduces recall to 30%.”
- 99% of evaded samples are classified as the intended target category at k=20
“At k = 20, among samples that evaded detection, 99% are classified as the intended target category.”
Caveats 5
- Even a small k=5 already reduces Recall6 from 0.87 to 0.75.
- The average number of engines flagging a sample as malicious dropped from 48 to 22, a mean reduction of 54.5%.
- The framework operates exclusively on static IAT entries, so samples that evade static classification may still be caught by dynamic monitoring of system calls, network behaviour, or process activity.
- We assume a greybox threat model with access to the feature representation and training data but not the detector’s internal parameters; effectiveness under a query-only black-box setting remains open.
- the evaluation is conducted on a single six-class Windows PE dataset, leaving generalisation to other feature representations, larger class taxonomies, or different malware families to future work.
What’s new here 4
- Targets a specific benign software category rather than any non-malware label.
- Uses a CVAE with a strictly additive decoder that never removes existing imports, preserving functionality.
- Introduces a knowledge-distilled differentiable proxy to enable gradient-based training against a non-differentiable ensemble detector.
- Provides and releases a six-class dataset of binary Win32 API import vectors.