KaliBench: A Fine-Grained Benchmark for Cybersecurity Tool Use on Kali Linux with Runtime-Free Verifiable Rewards

Pengfei Li, Naufal Suryanto, Sicheng Zhang, Muzammal Naseer

Khalifa University · University of Western Australia

Published October 1, 2026 · on the feed October 2, 2026 · ▲ 8 · arXiv 2610.02206

LLM training & RLSafety, alignment & securityAgents Code arXiv ↗Hugging Face ↗Weights ↗Dataset ↗

The abstract

LLMs are increasingly applied to cybersecurity workflows, where they are expected to translate analysts' intent into tool invocations. However, existing evaluations focus on knowledge-based assessments or end-to-end agentic tasks, and do not directly measure LLMs' ability to generate executable commands for real-world cybersecurity tools. This gap is critical because cybersecurity operations rely on strict command-line interfaces (CLIs), where minor syntax errors, incorrect flag--value bindings, or argument misordering can invalidate execution. We introduce KaliBench, a fine-grained benchmark and dataset for natural-language--to--CLI translation on Kali Linux, comprising 8,504 query--command pairs spanning 1,642 tools across 23 capability dimensions and 5 security phases. KaliBench is constructed via a manuscript-grounded pipeline with deterministic canonicalization and alias-aware evaluation, enabling precise and reproducible assessment of tool selection and argument construction. To ensure both semantic correctness and practical executability, we develop a multi-stage verification pipeline that combines LLM-based validation, sandboxed terminal execution, and human-in-the-loop refinement. Building on these fine-grained, deterministic signals, KaliBench further enables runtime-free verifiable rewards for training. Across three evaluation modes and 24 configurations of general-purpose and security-focused open-weight models, no open-weight model exceeds 42% exact-command accuracy in the unrestricted setting, highlighting the difficulty of accurate CLI-based cybersecurity tool use without explicit tool hints. We further show that supervised fine-tuning and reinforcement learning with verifiable rewards derived from KaliBench significantly improve an 8B model and achieve performance comparable to a 685B MoE model.

The Brief

2:57

A short podcast summary of the paper. Written and voiced by AI.

Transcript

KaliBench. A Fine-Grained Benchmark for Cybersecurity Tool Use on Kali Linux with Runtime-Free Verifiable Rewards. By Pengfei Li and three others, from Khalifa University and the University of Western Australia. Published on the first of October. Its code repository is public and real: about thirty source files.

Language models are increasingly used in cybersecurity workflows, where the job is to translate an analyst's intent into a tool invocation. Current evaluations either test security knowledge or run end-to-end agentic tasks. Neither directly measures whether a model can write an executable command for a real cybersecurity tool. That matters because these operations run through strict command-line interfaces. A minor syntax error, a flag bound to the wrong value, or arguments in the wrong order can each be enough to make the command fail. A model can understand exactly what the analyst wants and still produce something the tool refuses to run, and knowledge tests would never notice.

KaliBench is a fine-grained benchmark and dataset for translating natural language into command-line invocations on Kali Linux. It assesses two things precisely and reproducibly: whether the model picks the right tool, and whether it builds the arguments correctly. Those are the two places where a command line goes wrong, and the benchmark keeps them separate so that a failure can be traced to one or the other.

It contains eight thousand five hundred and four query and command pairs, spanning one thousand six hundred and forty-two tools, grouped into twenty-three capability dimensions and five security phases. Construction follows a manuscript-grounded pipeline with deterministic canonicalization and alias-aware evaluation. Canonicalization and alias handling mean that two commands written differently but meaning the same thing can be scored as the same, which is what lets the grading stay exact without being brittle.

To make sure each command is both semantically correct and actually runs, a multi-stage verification pipeline combines validation by a language model, execution in a sandboxed terminal, and refinement with a human in the loop. Because the resulting signals are fine-grained and deterministic, KaliBench can also supply verifiable rewards for training without needing to run the commands at all.

Evaluation covers three modes and twenty-four configurations of general-purpose and security-focused open-weight models. In the unrestricted setting, no open-weight model exceeds forty-two percent exact-command accuracy, which shows how hard this is without explicit hints about which tool to use. Training on KaliBench, with supervised fine-tuning and with reinforcement learning on its verifiable rewards, significantly improves an eight billion parameter model, bringing it to performance comparable with a six hundred and eighty-five billion parameter mixture-of-experts model.

KaliBench is both a test and a training signal. As a test it isolates the narrow step where intent becomes a command line, and grades it exactly. As a signal it lets a small model close much of the distance to one many times its size, without a live runtime in the loop.

Paper Quest · 7 chapters · about 40 min

Play this paper

Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.

Chapter 1 🧩 · The problem

Every quest starts with a wall. Here it is a command line that refuses anything but the exact command.

You are building an assistant for security analysts. An analyst types a request, like scanning one host on a few ports and showing only open ones, and the assistant must produce the command.

The road ahead

  1. 1 · The problem ~6 min Security work runs through strict command lines, and nobody yet measures whether a model writes the exact command a tool will accept.
  2. 2 · What came before ~3 min
  3. 3 · The key idea ~9 min Build verified request-command pairs from tool manuals, grade each command part by part after normalizing aliases, and reuse that grading as a training reward.
  4. 4 · Choose your own research ~3 min
  5. 5 · Build the method ~8 min Generate pairs from manuscripts, filter them with a language model, a sandbox and human review, then post-train a small model on rewards from comparison.
  6. 6 · The experiment ~6 min You’ll guess: Given only the request, with no hints about which tool to use, what is the best exact-command accuracy any open-weight model reaches?
  7. 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Join free to play the whole quest ›

Free, with Google or an email address. Your stars and progress are kept.

KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.