Official code repository for the paper "CREBench: Evaluating Large Language Models in Cryptographic Binary Reverse Engineering" (COLM 2026).

CREBench evaluates reverse-engineering performance on cryptographic binaries over four levels:
L1: algorithm identificationL2: key (IV) extractionL3: wrapper-level code reimplementationL4: flag recoveryCurrent main benchmark corpus is CREBench with:
48 algorithms3 key modes: hardcode_plain, fragmented_build, weak_prng_seeded3 active difficulties: O0, O3, constxorSupported models include:
gpt-5.4gpt-5.4-minigpt-5.2o4-minigemini-2.5-proclaude-sonnet-4-6doubao-seed-1-8-251228mimo-v2-pro3.10+codex: local Codex CLI installed on hostInstall dependencies:
pip install -r requirements.txt
If you want Codex token accounting through LiteLLM, install the proxy extras:
pip install 'litellm[proxy]'
Warning: do not use LiteLLM 1.82.7 or 1.82.8 because of the backdoor vulnerability.
The runtime image expects Ghidra archive in docker/ before build.
ghidra_11.0.1_PUBLIC_20240130.zipdocker/ghidra_11.0.1_PUBLIC_20240130.zipExample:
wget https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.0.1_build/ghidra_11.0.1_PUBLIC_20240130.zip \
-O docker/ghidra_11.0.1_PUBLIC_20240130.zip
Build image:
sudo docker build -t rev-sandbox:latest -f docker/Dockerfile docker
Use a repo-root .env file for API credentials. Runtime scripts load .env automatically.
Example .env:
# OpenAI
OPENAI_API_KEY=""
OPENAI_API_BASE_URL=https://api.openai.com/v1
# Azure OpenAI
AZURE_OPENAI_API_KEY=""
AZURE_OPENAI_ENDPOINT=""
AZURE_OPENAI_API_VERSION=""
# Claude
CLAUDE_API_KEY=""
# Gemini
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
GEMINI_PROJECT=""
GEMINI_LOCATION=global
# Doubao
DOUBAO_API_KEY=""
DOUBAO_BASE_URL=""
# MiMo
MIMO_API_KEY=""
MIMO_BASE_URL=""
# Tavily web tools (optional)
TVLY_API_KEY=""
# Codex
CODEX_MODEL=""
scripts/run_passk_eval.py is the recommended runner for official evaluation and benchmarking.
It handles:
CREBench corpus sweeps--jobs)--resume-dir)Run one challenge:
python3 scripts/run_passk_eval.py \
--model gpt-5.4 \
--challenge AES-128-CBC \
--difficulty O0 \
--key-mode weak_prng_seeded \
--pass-k 3
Run full matrix (48 * 3 * 3):
python3 scripts/run_passk_eval.py \
--model gpt-5.4 \
--all-c-all \
--all-key-modes \
--difficulty ALL \
--pass-k 3 \
--eval-mode full \
--jobs 4 \
--max-rounds 30 \
--max-tokens 600000
Resume an interrupted suite:
python3 scripts/run_passk_eval.py \
--model gpt-5.4 \
--all-c-all \
--all-key-modes \
--difficulty ALL \
--pass-k 3 \
--jobs 4 \
--resume-dir outputs/passk/<your-suite-dir>
run_reverse.py remains useful for single-run debugging / development.
python3 run_reverse.py \
--model gpt-5.4 \
--challenge-path CREBench/AES-128-CBC \
--key-mode weak_prng_seeded \
--difficulty O0 \
--eval-mode full
Provider selection for OpenAI-family models (gpt-*, o4-*) and codex:
--provider openai or --provider azure.openai when OPENAI_API_KEY is set.azure when Azure credentials are set.Codex local runner:
python run_reverse.py \
--model codex \
--provider openai \
--challenge-path CREBench/AES-128-CBC \
--key-mode weak_prng_seeded \
--difficulty O0
Codex local runner with Azure backend:
python run_reverse.py \
--model codex \
--provider azure \
--challenge-path CREBench/AES-128-CBC \
--key-mode weak_prng_seeded \
--difficulty O0
Codex local runner with explicit backend model override:
python run_reverse.py \
--model codex-gpt-5.4 \
--provider openai \
--challenge-path CREBench/AES-128-CBC \
--key-mode weak_prng_seeded \
--difficulty O0
Codex + LiteLLM proxy path for request-level token accounting:
export REV_CODEX_USE_LITELLM=1
python run_reverse.py \
--model codex \
--provider azure \
--challenge-path CREBench/AES-128-CBC \
--key-mode weak_prng_seeded \
--difficulty constxor \
--max-tokens 500000 \
--output-dir outputs/codex-litellm-aes
Notes for Codex + LiteLLM:
--provider openai and --provider azure are both supported for Codex.--provider is omitted for Codex, the local Codex config is used if present; otherwise the runner auto-configures from available credentials.litellm_proxy_config.yamllitellm_proxy_stdout.loglitellm_proxy_stderr.loglitellm_usage.jsonllitellm_trace.jsonlSingle run (run_reverse.py) output:
outputs/<challenge>/<key_mode>/<difficulty>/<provider>/<model>/<eval_mode>/<timestamp>/
Suite run (run_passk_eval.py) output:
outputs/passk/<suite-name>-<timestamp>/
suite_manifest.json
summary.json
report.md
case_results.csv
attempt_results.csv
runs/
<challenge>/<key_mode>/<difficulty>/attempt-<n>/
Per-run artifacts include:
record.txtscore.jsonrun_metrics.jsonrun_metadata.jsonconversation.jsonCREBench/ # Our repo
CREBench/ # Main benchmark corpus (432 challenges with 48 algorithms)
AES-128-CBC/
DES/
RC4/
SM4-CBC-Official/
...
src/reverse_agent/ # Agent runtime, tools, sandbox, evaluator
scripts/
run_passk_eval.py # Primary pass@k runner
run_reverse.py # Single-run entry
If you find this project useful, please cite:
@article{chen2026crebench,
title={CREBench: Evaluating Large Language Models in Cryptographic Binary Reverse Engineering},
author={Chen, Baicheng and Wang, Yu and Zhou, Ziheng and Liu, Xiangru and Li, Juanru and Chen, Yilei and He, Tianxing},
journal={arXiv preprint arXiv:2604.03750},
year={2026}
}
9 commits
4 commits
Standard ML
52.0%
C
39.2%
Python
7.6%
Official code repository for the paper "CREBench: Evaluating Large Language Models in Cryptographic Binary Reverse Engineering" (COLM 2026).

CREBench evaluates reverse-engineering performance on cryptographic binaries over four levels:
L1: algorithm identificationL2: key (IV) extractionL3: wrapper-level code reimplementationL4: flag recoveryCurrent main benchmark corpus is CREBench with:
48 algorithms3 key modes: hardcode_plain, fragmented_build, weak_prng_seeded3 active difficulties: O0, O3, constxorSupported models include:
gpt-5.4gpt-5.4-minigpt-5.2o4-minigemini-2.5-proclaude-sonnet-4-6doubao-seed-1-8-251228mimo-v2-pro3.10+codex: local Codex CLI installed on hostInstall dependencies:
pip install -r requirements.txt
If you want Codex token accounting through LiteLLM, install the proxy extras:
pip install 'litellm[proxy]'
Warning: do not use LiteLLM 1.82.7 or 1.82.8 because of the backdoor vulnerability.
The runtime image expects Ghidra archive in docker/ before build.
ghidra_11.0.1_PUBLIC_20240130.zipdocker/ghidra_11.0.1_PUBLIC_20240130.zipExample:
wget https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.0.1_build/ghidra_11.0.1_PUBLIC_20240130.zip \
-O docker/ghidra_11.0.1_PUBLIC_20240130.zip
Build image:
sudo docker build -t rev-sandbox:latest -f docker/Dockerfile docker
Use a repo-root .env file for API credentials. Runtime scripts load .env automatically.
Example .env:
# OpenAI
OPENAI_API_KEY=""
OPENAI_API_BASE_URL=https://api.openai.com/v1
# Azure OpenAI
AZURE_OPENAI_API_KEY=""
AZURE_OPENAI_ENDPOINT=""
AZURE_OPENAI_API_VERSION=""
# Claude
CLAUDE_API_KEY=""
# Gemini
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
GEMINI_PROJECT=""
GEMINI_LOCATION=global
# Doubao
DOUBAO_API_KEY=""
DOUBAO_BASE_URL=""
# MiMo
MIMO_API_KEY=""
MIMO_BASE_URL=""
# Tavily web tools (optional)
TVLY_API_KEY=""
# Codex
CODEX_MODEL=""
scripts/run_passk_eval.py is the recommended runner for official evaluation and benchmarking.
It handles:
CREBench corpus sweeps--jobs)--resume-dir)Run one challenge:
python3 scripts/run_passk_eval.py \
--model gpt-5.4 \
--challenge AES-128-CBC \
--difficulty O0 \
--key-mode weak_prng_seeded \
--pass-k 3
Run full matrix (48 * 3 * 3):
python3 scripts/run_passk_eval.py \
--model gpt-5.4 \
--all-c-all \
--all-key-modes \
--difficulty ALL \
--pass-k 3 \
--eval-mode full \
--jobs 4 \
--max-rounds 30 \
--max-tokens 600000
Resume an interrupted suite:
python3 scripts/run_passk_eval.py \
--model gpt-5.4 \
--all-c-all \
--all-key-modes \
--difficulty ALL \
--pass-k 3 \
--jobs 4 \
--resume-dir outputs/passk/<your-suite-dir>
run_reverse.py remains useful for single-run debugging / development.
python3 run_reverse.py \
--model gpt-5.4 \
--challenge-path CREBench/AES-128-CBC \
--key-mode weak_prng_seeded \
--difficulty O0 \
--eval-mode full
Provider selection for OpenAI-family models (gpt-*, o4-*) and codex:
--provider openai or --provider azure.openai when OPENAI_API_KEY is set.azure when Azure credentials are set.Codex local runner:
python run_reverse.py \
--model codex \
--provider openai \
--challenge-path CREBench/AES-128-CBC \
--key-mode weak_prng_seeded \
--difficulty O0
Codex local runner with Azure backend:
python run_reverse.py \
--model codex \
--provider azure \
--challenge-path CREBench/AES-128-CBC \
--key-mode weak_prng_seeded \
--difficulty O0
Codex local runner with explicit backend model override:
python run_reverse.py \
--model codex-gpt-5.4 \
--provider openai \
--challenge-path CREBench/AES-128-CBC \
--key-mode weak_prng_seeded \
--difficulty O0
Codex + LiteLLM proxy path for request-level token accounting:
export REV_CODEX_USE_LITELLM=1
python run_reverse.py \
--model codex \
--provider azure \
--challenge-path CREBench/AES-128-CBC \
--key-mode weak_prng_seeded \
--difficulty constxor \
--max-tokens 500000 \
--output-dir outputs/codex-litellm-aes
Notes for Codex + LiteLLM:
--provider openai and --provider azure are both supported for Codex.--provider is omitted for Codex, the local Codex config is used if present; otherwise the runner auto-configures from available credentials.litellm_proxy_config.yamllitellm_proxy_stdout.loglitellm_proxy_stderr.loglitellm_usage.jsonllitellm_trace.jsonlSingle run (run_reverse.py) output:
outputs/<challenge>/<key_mode>/<difficulty>/<provider>/<model>/<eval_mode>/<timestamp>/
Suite run (run_passk_eval.py) output:
outputs/passk/<suite-name>-<timestamp>/
suite_manifest.json
summary.json
report.md
case_results.csv
attempt_results.csv
runs/
<challenge>/<key_mode>/<difficulty>/attempt-<n>/
Per-run artifacts include:
record.txtscore.jsonrun_metrics.jsonrun_metadata.jsonconversation.jsonCREBench/ # Our repo
CREBench/ # Main benchmark corpus (432 challenges with 48 algorithms)
AES-128-CBC/
DES/
RC4/
SM4-CBC-Official/
...
src/reverse_agent/ # Agent runtime, tools, sandbox, evaluator
scripts/
run_passk_eval.py # Primary pass@k runner
run_reverse.py # Single-run entry
If you find this project useful, please cite:
@article{chen2026crebench,
title={CREBench: Evaluating Large Language Models in Cryptographic Binary Reverse Engineering},
author={Chen, Baicheng and Wang, Yu and Zhou, Ziheng and Liu, Xiangru and Li, Juanru and Chen, Yilei and He, Tianxing},
journal={arXiv preprint arXiv:2604.03750},
year={2026}
}
9 commits
4 commits
Standard ML
52.0%
C
39.2%
Python
7.6%