NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Attacking Neural Binary Function Detection

Joshua Bundt, Michael Davinroy, Ioannis Agadakos, Alina Oprea, William Robertson · DOI

Introduction

Binary analysis is a cornerstone of security research, enabling tasks such as malware detection and vulnerability discovery by reconstructing high-level information from stripped binaries. Traditionally, this process relied on deterministic, rule-based disassemblers. Recently, the field has shifted toward Neural Binary Analysis (NBA), employing deep learning architectures like Transformers and Graph Convolutional Networks (GCNs) to predict function boundaries.

However, these models are often adapted from Natural Language Processing (NLP) domains. This research investigates whether such models are truly learning the semantics of code or merely memorizing syntactic patterns (byte sequences). The authors demonstrate that state-of-the-art NBA models are surprisingly fragile, susceptible to both inadvertent compiler variations and intentional adversarial attacks.

Methodology

The researchers developed a black-box vulnerability search procedure to evaluate model robustness without requiring access to internal weights. The methodology focuses on two primary vectors: inadvertent attacks arising from standard compiler configurations (e.g., Stack Protector, Control Flow Integrity) and intentional adversarial attacks using binary rewriting to inject "dead code" into function epilogues.

Overview of the black-box vulnerability search and misclassification analysis pipeline.

As illustrated in the workflow above, the process involves generating benchmarks from source code using diverse compiler toolchains, extracting ground truth from symbol tables, and performing misclassification analysis to identify "heavy hitter" patterns that trigger model failures.

Datasets and Experimental Setup

The study utilized a comprehensive suite of datasets to stress-test the models:

  • BinKit & ASE18: Standard collections of GNU software compiled with various optimization levels (O0-O3).
  • CFI & PIE Datasets: Specifically created to test modern security protections like Control Flow Integrity and Position Independent Executables.
  • Adversarial Corpus: A mutated dataset where adversarial byte patterns were injected into non-functional regions (NOPs) to deceive the models.

Two prominent models, XDA (Transformer-based) and DeepDi (GCN-based), were evaluated against the industry-standard deterministic tool, IDA Pro.

Key Results and Analysis

The experimental results reveal a significant performance gap between standard benchmarks and real-world or adversarial scenarios. While NBA models often achieve high F1 scores on "clean" data, their reliability craters when faced with syntactic shifts.

Comparative performance (Precision, Recall, F1) of IDA Pro, XDA, and DeepDi across various datasets and compiler configurations.

Major Findings:

  • Massive Evasion: Adversarial injections caused XDA to miss nearly 75% of ground-truth functions in specific binaries.
  • Hallucination and False Positives: DeepDi produced over 3,000 false positives in a single benchmark, triggered by common argument alignment instructions that the model misinterpreted as function starts.
  • Sensitivity to Optimization: Simply changing compiler flags (e.g., enabling Intel CET or switching to SizeOpt) significantly degraded precision. As shown in the results table, while IDA Pro maintains near-perfect precision across all datasets, the neural models exhibit high variance and lower recall in protected or optimized environments.
  • The "NLP Trap": The failure of these models stems from a reliance on syntax. Unlike natural language, binary code can be transformed (obfuscated) to look different while remaining semantically identical. NBAs currently struggle to bridge this gap.

Conclusion and Future Directions

This research highlights a critical vulnerability in current Neural Binary Analysis: a dangerous reliance on syntax over semantics. While deep learning offers high performance on average cases, deterministic tools like IDA Pro remain far more robust against adversarial and structural variations.

To move forward, the authors suggest the development of semantic-aware models that incorporate data-flow graphs or execution logic rather than simple byte embeddings. Furthermore, the security community must adopt more rigorous benchmarking practices that include adversarial examples and diverse compiler configurations to ensure these tools are reliable for critical security tasks.

Summary updated

BibTeX
@inproceedings{bundt2023attacking,
  author = {Joshua Bundt and Michael Davinroy and Ioannis Agadakos and Alina Oprea and William Robertson},
  title = {{Attacking Neural Binary Function Detection}},
  booktitle = {RAID},
  year = {2023},
  doi = {10.1145/3607199.3607200},
}
Figure