|
| 1 | +# ZAK on CyBench |
| 2 | + |
| 3 | +> **Headline:** ZAK + GPT-5 (with selective `o3` escalation) reaches **9/11 (81.8%) pass@2** on the strict-offline subset of [CyBench](https://cybench.github.io/)'s official `task_list.txt`, including a **Hard-tier crypto solve**. On a curated 9-task offline slice the same harness reaches **9/9 (100.0%) pass@2**; the same slice with `gpt-4o-2024-11-20` reaches only **4/9 (44.4%)** — a clean 55 pp same-task model-uplift signal. |
| 4 | +
|
| 5 | +- **Full paper:** [PAPER.pdf](PAPER.pdf) (17 pages) · also as [HTML](PAPER.html) |
| 6 | +- **Detailed scorecard:** [`results/SCORECARD.md`](results/SCORECARD.md) |
| 7 | +- **Academic-style report:** [`results/REPORT.md`](results/REPORT.md) |
| 8 | +- **One-pager:** [`results/REPORT.html`](results/REPORT.html) |
| 9 | +- **Leaderboard PR materials:** [`results/LEADERBOARD_PR.md`](results/LEADERBOARD_PR.md) |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## What this benchmark evaluates |
| 14 | + |
| 15 | +[CyBench](https://cybench.github.io/) (Stanford CRFM, 2024) is the de-facto cybersecurity LLM benchmark: 40 professional CTF tasks across crypto, web, pwn, forensics, reverse, and misc, spanning Very Easy → Very Hard difficulty. The public leaderboard tracks two scoring modes (`Unguided` and `Subtask-Guided`) and accepts subset submissions with explicit `Count` disclosure. |
| 16 | + |
| 17 | +This directory contains the **first published GPT-5 result** on CyBench tasks, run via the open-source ZAK harness. We report two phases: |
| 18 | + |
| 19 | +1. **Phase 1 — Curated 9-task offline slice** (HackTheBox Cyber Apocalypse 2024 Very Easy tasks) |
| 20 | + - ZAK + GPT-5: **9/9 (100.0%) pass@2**, $2.99 |
| 21 | + - ZAK + GPT-4o (same harness, same prompt, same tasks): **4/9 (44.4%)**, $1.34 |
| 22 | + - Same-task **55 pp model-uplift gap** with all other variables held constant. |
| 23 | + |
| 24 | +2. **Phase 2 — 11-task strict-offline subset of cybench's official `task_list.txt`** (spans VE → Hard difficulty) |
| 25 | + - ZAK + GPT-5 unguided pass@2: **8/11 (72.7%)** |
| 26 | + - ZAK + GPT-5 + `o3` escalation, subtask-guided: **9/11 (81.8%) best-mode** |
| 27 | + - Including the Hard-tier `Permuted` crypto challenge. |
| 28 | + |
| 29 | +All numbers pass@2 unless noted. |
| 30 | + |
| 31 | +## What "ZAK" means here |
| 32 | + |
| 33 | +The ZAK harness (`run_cybench.py`) is a single-file ~700-LoC Python script with sole external dependency `openai`. It uses cybench's reference prompt verbatim and adds operational features (per-turn JSON transcript logging, format-recovery escalation, sandboxed shell execution with bounded output, selective model escalation). **No prompt engineering** beyond cybench's published baseline. |
| 34 | + |
| 35 | +## Quick start |
| 36 | + |
| 37 | +```bash |
| 38 | +# 1. Clone cybench (the upstream task corpus) |
| 39 | +git clone https://github.com/andyzorigin/cybench.git ../cybench-bench/cybench |
| 40 | + |
| 41 | +# 2. Install the standard CTF tool chain on host |
| 42 | +brew install upx binwalk foremost wireshark qemu # macOS; apt equivalents on Linux |
| 43 | +pip install -r requirements.txt # just `openai` and `scapy` |
| 44 | + |
| 45 | +# 3. OpenAI key |
| 46 | +echo "OPENAI_API_KEY=sk-..." > .env |
| 47 | + |
| 48 | +# 4. Run the headline 11-task subset |
| 49 | +python run_cybench.py \ |
| 50 | + --task-list task_lists/cybench_official_offline.txt \ |
| 51 | + --model gpt-5 --max-iters 25 |
| 52 | +``` |
| 53 | + |
| 54 | +See [PAPER.pdf §Appendix A](PAPER.pdf) for the full reproduction recipe (Phase 1 + Phase 2 + same-task gpt-4o baseline + o3 escalation). |
| 55 | + |
| 56 | +## Directory layout |
| 57 | + |
| 58 | +``` |
| 59 | +benchmarks/cybench/ |
| 60 | +├── README.md # this file |
| 61 | +├── PAPER.pdf # 17-page paper (academic-style) |
| 62 | +├── PAPER.html # source for the PDF |
| 63 | +├── run_cybench.py # the harness (single file, ~700 LoC) |
| 64 | +├── requirements.txt # openai + scapy |
| 65 | +├── task_lists/ |
| 66 | +│ ├── cybench_official_offline.txt # 11-task official subset |
| 67 | +│ └── offline_easy.txt # 9-task curated slice (Phase 1) |
| 68 | +└── results/ |
| 69 | + ├── SCORECARD.md # per-task scorecard, all configurations |
| 70 | + ├── REPORT.md # academic-style writeup |
| 71 | + ├── REPORT.html # one-pager with charts |
| 72 | + ├── LEADERBOARD_PR.md # cybench.github.io submission package |
| 73 | + └── transcripts/ |
| 74 | + ├── unguided/ # Phase 2 unguided + 1 retry |
| 75 | + ├── subtask_guided/ # Phase 2 subtask-guided |
| 76 | + ├── o3_escalation/ # Phase 2 o3 model attempts |
| 77 | + ├── phase1_curated/ # Phase 1 gpt-5 + retries |
| 78 | + └── gpt4o_baseline/ # Phase 1 same-task gpt-4o |
| 79 | +``` |
| 80 | + |
| 81 | +Per-task transcripts capture every LLM turn, every shell command, every observation, and every parsed answer — fully auditable. |
| 82 | + |
| 83 | +## Comparison to the public leaderboard |
| 84 | + |
| 85 | +| Rank | Model | Tasks | Unguided % | |
| 86 | +|---:|---|---:|---:| |
| 87 | +| 1 | Claude Mythos Preview | 35 | 100.0% | |
| 88 | +| 2 | Claude Opus 4.7 | 35 | 96.0% | |
| 89 | +| 3 | Claude Opus 4.6 | 37 | 93.0% | |
| 90 | +| 4 | Claude Opus 4.5 | 39 | 82.0% | |
| 91 | +| → | **ZAK + GPT-5/o3 (this work, Phase 2 best)** | **11** | **81.8%** | |
| 92 | +| 5 | Muse Spark | 40 | 65.4% | |
| 93 | +| → | **ZAK + GPT-5 (this work, Phase 2 unguided p@2)** | **11** | **72.7%** | |
| 94 | +| 6 | Claude Sonnet 4.5 | 39 | 60.0% | |
| 95 | +| 7 | Grok 4 | 40 | 43.0% | |
| 96 | +| 13 | OpenAI o3-mini | 40 | 22.5% | |
| 97 | +| 18 | OpenAI GPT-4o | 40 | 12.5% | |
| 98 | + |
| 99 | +**Honest caveat:** the 11-task subset is 27.5% of the full benchmark and excludes web/pwn entirely. It is not directly rank-comparable to entries with `Count=35–40`. The two missing categories require Docker challenge containers; we plan to extend coverage on a properly-provisioned host. |
| 100 | + |
| 101 | +## What's NOT in this benchmark (and why) |
| 102 | + |
| 103 | +- **Web and pwn tasks** — every offline candidate in these categories on cybench's official list either requires Docker (challenge containers) or has malformed metadata in the upstream repo. |
| 104 | +- **The full 40 tasks** — would require working Docker for x86 Linux containers (~30 GB free disk minimum) plus ~$25–30 in API costs and 6–10 hours of wall time. Planned as a follow-up. |
| 105 | +- **Subtask-guided pass@1 numbers** — we report subtask-guided pass@2; first-pass-only numbers are available in the per-task JSON transcripts. |
| 106 | +- **Multiple seeds** — single trial per configuration with one retry (pass@2). pass@k with k≥3 would tighten confidence intervals. |
| 107 | + |
| 108 | +## Citation |
| 109 | + |
| 110 | +```bibtex |
| 111 | +@techreport{sarkar2026zakcybench, |
| 112 | + title = {ZAK + GPT-5 on CyBench: A Two-Phase Evaluation Reaching 100\% on a Curated Offline Slice and 81.8\% on the Official Strict-Offline Subset}, |
| 113 | + author = {Sarkar, Sanket}, |
| 114 | + institution = {Zeron, Inc.}, |
| 115 | + year = {2026}, |
| 116 | + month = {May}, |
| 117 | + url = {https://github.com/securezeron/zeron-agent-development-kit/tree/main/benchmarks/cybench} |
| 118 | +} |
| 119 | +``` |
| 120 | + |
| 121 | +## License |
| 122 | + |
| 123 | +Apache-2.0 (matches the parent [zak repo](../../LICENSE)). Per-task transcripts and PAPER.pdf released under CC-BY-4.0. |
| 124 | + |
| 125 | +## Contact |
| 126 | + |
| 127 | +Sanket Sarkar <sanketsarkar@zeron.one> · Zeron, Inc. |
| 128 | + |
| 129 | +For questions, errata, or to request additional model evaluations on the same slice, open an issue on this repo. |
0 commit comments