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":
- Algorithm Identification: Naming the cipher (e.g., "This looks like AES").
- Key (IV) Extraction: Finding the specific secret keys or initialization vectors hidden in the binary.
- Wrapper-level Reimplementation: Writing a Python script that perfectly mimics the binary's encryption behavior.
- Flag Recovery: The ultimate goal—decrypting a target ciphertext to find the hidden "flag" string.
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) toO3(aggressive compiler optimization) andConst-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-XORdifficulty 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
O0toConst-XOR, model performance dropped steadily. Compiler optimizations (O3) make the code less readable for LLMs, just as they do for humans.
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.
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