KaliBench Measures Whether LLMs Can Actually Type the Right Security Command

KaliBench Measures Whether LLMs Can Actually Type the Right Security Command

6 min read

A new benchmark tests natural-language-to-CLI translation across 1,642 Kali Linux tools, and the headline finding is sobering: no open-weight model clears 42% exact-command accuracy without hints. Here is what that means for anyone wiring LLMs into security workflows.

TL;DR: KaliBench shows that open-weight models are bad at producing exact, executable security commands (under 42% accuracy with no tool hints), but training an 8B model on its verifiable rewards pushes it up to a 685B model’s level, which tells you the problem is fixable with the right data, not just bigger models.

The benchmark is KaliBench: A Fine-Grained Benchmark for Cybersecurity Tool Use on Kali Linux with Runtime-Free Verifiable Rewards, posted to arXiv under both cs.AI and cs.CL. It targets a narrow, practical question that most eval suites skip: when you tell a model what you want in plain English, can it emit the exact command-line invocation that a real tool will accept and run?

That sounds trivial until you remember how CLIs actually behave. A flag bound to the wrong value, arguments in the wrong order, a misspelled subcommand, and the whole thing fails or, worse, silently does something else. KaliBench is built to catch exactly those failures.

What does KaliBench actually test?

The dataset is 8,504 query-command pairs covering 1,642 tools across 23 capability dimensions and 5 security phases. In plain terms: a wide slice of the Kali Linux toolkit, from reconnaissance through exploitation, each paired with a natural-language request and the correct command to satisfy it.

The clever part is how they score it. Instead of asking a judge model “is this roughly right,” KaliBench uses deterministic canonicalization and alias-aware evaluation. That means it normalizes equivalent commands (different flag orderings, known aliases) so a correct answer written a slightly different way still counts, while a genuinely wrong one does not. The construction pipeline is “manuscript-grounded,” meaning it is built from tool documentation rather than vibes, then verified through a multi-stage process: LLM validation, sandboxed terminal execution, and human-in-the-loop refinement.

a plain-language request on one side funneling through a filter into a single precise command-line string on the other

This matters because the two dominant styles of security eval both miss the mark here. Knowledge quizzes test whether a model knows what nmap does. End-to-end agentic tasks test whether a whole system can complete a mission, which bundles planning, memory, and tool use into one fuzzy score. Neither isolates the specific skill of translating intent into a command that runs. KaliBench does, and that isolation is what makes the number usable.

Why is a 42% ceiling the real story?

Across 24 configurations of general-purpose and security-focused open-weight models, in three evaluation modes, no open-weight model exceeded 42% exact-command accuracy in the unrestricted setting. “Unrestricted” meaning no explicit tool hints: the model has to pick the right tool and construct the arguments on its own.

Sit with that. More than half the time, the best open-weight models you can run today produce a command that is not exactly correct when nobody hands them the tool name. If you have been assuming a capable local model can just drive your security tooling from natural language, this is the receipt that says: not reliably, not yet.

The caveat worth naming: “exact-command accuracy” is a strict metric by design. A command that is functionally fine but not canonically identical could still be marked wrong if it falls outside the alias handling. The paper’s deterministic approach is meant to minimize that, but no normalization catches every valid variant. So treat 42% as a tight lower bound on a demanding metric, not as “models fail 58% of real tasks.” Still, for a domain where a wrong flag can mean scanning the wrong subnet, strictness is the point. You want the eval to be harsher than production, not kinder.

One more thing I would flag: the paper reports on open-weight models. The abstract does not give numbers for frontier closed models like Claude or GPT-class systems, so I will not pretend to know how they score. If someone cites a closed-model KaliBench number, ask where it came from.

Can a small model close the gap with training?

Here is the part that flips the story from gloomy to interesting. Because KaliBench produces fine-grained, deterministic signals, those signals double as rewards. The authors use them for both supervised fine-tuning and reinforcement learning with verifiable rewards, and they report that an 8B model trained this way reaches performance comparable to a 685B MoE model.

a small gear and a very large gear turning at the same speed, connected by a tuned belt

That is an 85x parameter gap closed by better training data on a narrow task. It is the clearest recent example I have seen of the pattern that keeps showing up: for a bounded domain with a checkable right answer, verifiable rewards beat raw scale. You do not need the giant model if you can define correctness crisply and train against it.

The phrase “runtime-free” in the title is doing quiet work too. Normally, RL with verifiable rewards means spinning up an environment, executing the command, and checking the result, which is slow and, with security tools, potentially dangerous. KaliBench’s deterministic canonicalization lets you verify correctness without executing anything. That makes the training loop cheaper and safer, which is what makes the 8B result practical rather than a lab curiosity.

What should an operator do with this?

If you are building anything that turns analyst intent into tool calls, the headline is a reality check, not a reason to quit. Three concrete moves.

First, do not ship natural-language-to-CLI as an autonomous step for security tooling right now. Keep a human confirming the exact command before execution, or constrain the model to a whitelist of parameterized templates where it fills slots rather than writing free-form commands. The 42% ceiling is your justification when someone pushes for full autonomy.

Second, if you have a narrow, high-value command surface, the 8B result is your playbook. Build a small verifiable dataset for your tools, canonicalize equivalent commands, and fine-tune or run RLVR against it. You may not need a frontier model at all, which changes your cost and your deployment options (local, air-gapped, no data leaving the box).

Third, steal the eval design even if you never touch Kali. The useful idea is deterministic, alias-aware scoring with canonicalization, applied to any domain where “correct” is checkable. That is how you get an honest number instead of an LLM judge grading on a curve.

The catch most readers will miss: the 8B-matches-685B result is specific to this benchmark’s distribution. A model trained on KaliBench-style rewards gets very good at KaliBench-style commands. It does not automatically generalize to tools or phrasings outside that training set, and it says nothing about the planning and judgment a real security engagement demands. KaliBench measures one skill precisely, which is exactly its value and exactly its limit. Use it to fix the typing problem. Do not confuse a model that types the right command with one that knows which command to want.