CREBench: Evaluating Large Language Models in Cryptographic Binary Reverse Engineering

Baicheng Chen, Yu Wang, Ziheng Zhou, Xiangru Liu, Juanru Li, Yilei Chen, Tianxing He

TL;DR

Researchers have introduced CREBench, a rigorous new benchmark designed to evaluate how well Large Language Models (LLMs) can perform cryptographic binary reverse engineering. While top-tier models like GPT-5.4 show promising autonomous capabilities—successfully solving 59% of challenges—they still significantly trail human experts, particularly when faced with complex compiler optimizations and code obfuscation.

What Problem Does This Paper Address?

Reverse engineering (RE) is the "black magic" of cybersecurity. It involves taking a compiled binary—where the original source code is gone—and figuring out how it works. This is critical for finding vulnerabilities and analyzing malware, but it is incredibly labor-intensive and requires years of specialized expertise.

Cryptographic programs are a particularly high-stakes subset of RE. If an attacker can reverse-engineer a custom encryption routine, they can steal sensitive data. Conversely, defenders need to reverse-engineer malware to understand how it hides its communications. While LLMs have shown talent in general coding, their ability to autonomously navigate the low-level, math-heavy world of binary cryptography has remained largely unquantified. The authors created CREBench to fill this gap and determine if we are nearing a future of fully automated security analysis.

Methods

The authors developed a comprehensive evaluation pipeline that places an LLM inside a ReAct-style agent framework. The agent isn't just looking at code; it’s operating in a sandboxed Docker environment with access to a toolbelt including Ghidra (for decompilation), GDB (for debugging), and web search.

To provide a granular look at model performance, the researchers broke the RE process into a four-step "evaluation ladder":

  1. Algorithm Identification: Naming the cipher (e.g., "This looks like AES").
  2. Key (IV) Extraction: Finding the specific secret keys or initialization vectors hidden in the binary.
  3. Wrapper-level Reimplementation: Writing a Python script that perfectly mimics the binary's encryption behavior.
  4. Flag Recovery: The ultimate goal—decrypting a target ciphertext to find the hidden "flag" string.
Figure 1: Overview of CREBench, which contains 432 challenges based on 48 standard encryption algorithms, three types of insecure key usage, and three levels of reverse- engineering difficulty. We also design an evaluation framework covering four sub-tasks, enabling LLMs to operate as agents that solve these challenges in a sandboxed environment.

Datasets

The core of the paper is CREBench, which consists of 432 unique challenges. These are built from:

  • 48 Cryptographic Algorithms: Ranging from industry standards like AES and SM4 to more obscure ciphers.
  • 3 Insecure Key Scenarios: Hardcoded keys, fragmented keys (split across memory), and weak PRNG-generated keys.
  • 3 Difficulty Levels: Ranging from O0 (no optimization) to O3 (aggressive compiler optimization) and Const-XOR (a custom obfuscation that hides cryptographic constants).

The authors manually reimplemented all 48 algorithms to avoid "data contamination" (where the model might have seen the exact source code during training) and to keep the binaries compact.

Key Insights and Ideas

  • Prototype Bias: One of the most fascinating findings is that LLMs suffer from a form of "tunnel vision." When a model sees a structure it partially recognizes, it often "collapses" its uncertainty and insists the algorithm is a common one like AES or DES, even when the evidence suggests a similar but different cipher (like ARIA or Square).
  • The GDB "Death Loop": The researchers found that heavy use of the debugger (GDB) was actually a predictor of failure. While human experts use GDB for surgical confirmation, LLMs often get stuck in repetitive low-level debugging loops once they lose the "high-level" thread of the problem.
  • The Reimplementation Gap: Models are surprisingly good at identifying an algorithm (Task 1) but struggle significantly more with Task 3 (reimplementing the wrapper logic). This suggests that while LLMs "know" what AES looks like, they struggle with the precise data plumbing required to make a functional tool.
  • Obfuscation Works: The Const-XOR difficulty level, which hides the mathematical constants (S-boxes) used by ciphers, proved devastating for static analysis tools and significantly hampered LLMs, proving that even simple runtime obfuscation remains a potent defense.

Key Results

The evaluation compared eight frontier models against a team of human experts (including a researcher with 20 years of RE experience).

  • GPT-5.4 emerged as the leader among models, achieving a score of 64.04/100 and a 59% flag recovery rate.
  • Human Experts still dominate, scoring 92.19/100. The gap is most pronounced in key extraction and complex reasoning.
  • Performance Decay: As difficulty increased from O0 to Const-XOR, model performance dropped steadily. Compiler optimizations (O3) make the code less readable for LLMs, just as they do for humans.
Figure 2: Comparison of LLMs’ performance on CREBench. Pass@3 performance by model and Pass@1 performance by human expert team are shown, with stacked bars showing sub-task scores, ordered from left to right by total score.

A successful trace (shown in Figure 3) illustrates the complexity of these tasks, requiring the model to jump between decompiled code, memory dumps, and Python scripting.

Figure 3: A successful case: GPT-5.4 solves the AES-128-CBC challenge in 9 rounds. The difficulty is O0, and the key usage strategy is hardcoded. More details are explained in Appendix E.1.1.

Limitations and Future Work

The authors acknowledge that while CREBench is difficult, it doesn't yet include "professional-grade" obfuscators like Tigress or O-LLVM, which produce massive code bloat that might exceed current LLM context windows.

Future work involves exploring multi-agent systems to see if "collaboration" between models can overcome the prototype bias and debugging loops observed in single-agent setups. The researchers have open-sourced the benchmark to encourage the community to track LLM progress in this critical security domain.

Summary updated

BibTeX
@inproceedings{chen2026crebench,
  author = {Baicheng Chen and Yu Wang and Ziheng Zhou and Xiangru Liu and Juanru Li and Yilei Chen and Tianxing He},
  title = {{CREBench: Evaluating Large Language Models in Cryptographic Binary Reverse Engineering}},
  booktitle = {COLM},
  year = {2026},
  url = {https://openreview.net/forum?id=tLYdf8hWJB},
}
Figure