KaliBench: A Fine-Grained Benchmark for Cybersecurity Tool Use on Kali Linux with Runtime-Free Verifiable Rewards
Pengfei Li, Naufal Suryanto, Sicheng Zhang, Muhammad Muzammal Naseer
NeurIPS page · OpenReview · alphaXiv · Open on the map
Category: AI Safety, Security & Alignment › LLM Agent Safety Evaluation · Type: benchmark or dataset · Keywords: benchmark, natural-language-to-CLI, cybersecurity, LLM evaluation, command verification, runtime-free rewards
Areas: AI Agents › Agent Robustness › Agent Failure Attribution; Safety & Security › Cybersecurity › Offensive Cyber Agent Benchmarks; Evaluation & Benchmarks › Language Model and Agent Safety › Adversarial Benchmarks; Benchmarks for LLMs & Agents › Agent Trustworthiness Benchmarks › Agent Security Benchmarks
Summary
KaliBench is a fine-grained benchmark and dataset for evaluating LLMs' ability to translate natural-language queries into executable CLI commands on Kali Linux, featuring deterministic verification and runtime-free rewards.
Explained to a 5-year-old
People want computers to help fix security problems by typing commands. Making sure those commands are exactly right is hard, like solving a tricky puzzle. The paper creates a big collection of puzzles where each puzzle is a question and the right answer is a command. It checks the answers by running them safely and asking people to confirm. This helps teach computers to answer security questions correctly.
Explained to a 5-year-old, longer
Imagine you have a toolbox full of many different security tools, each with its own special commands. You ask a smart robot what command to use, and the robot should give you the exact command that will work. The paper makes a big set of these questions and answers, called KaliBench. It carefully writes down each command so there is only one correct way to write it. Then it tests the robot’s answers by first checking if the answer looks right, then actually running the command in a safe place, and finally asking a person to double-check. This three-step check makes sure the robot learns to give correct commands. The paper also releases this set for everyone to use, so more robots can practice and get better at helping with security.
For a technical reader
The work introduces a benchmark that pairs natural-language queries with executable CLI commands for Kali Linux tools. It uses a deterministic pipeline to canonicalize commands and an alias-aware evaluation to ensure consistency. A verification system combines LLM validation, sandboxed execution, and human review to guarantee correctness. The benchmark provides runtime-free verifiable rewards that can be used to fine-tune and reinforce-learn models, achieving strong performance with relatively small models.
Problem
Existing evaluations of LLMs for cybersecurity do not directly assess their ability to generate correct, executable command-line instructions for real-world security tools, where syntax errors can break execution.
Method
The benchmark constructs a large collection of query-command pairs via a manuscript-grounded pipeline, canonicalizes commands, and evaluates them deterministically. It also implements a multi-stage verification pipeline that combines LLM-based validation, sandboxed terminal execution, and human review to ensure correctness and executability.
Results
Across three evaluation modes and over 20 LLMs, no model exceeds 35% exact-command accuracy without tool hints. Supervised fine-tuning and reinforcement learning with verifiable rewards from the benchmark improve an 8B model to match the performance of a 685B MoE model.
Contributions
A large, fine-grained benchmark and dataset of 8,504 query-command pairs covering 1,642 tools, a deterministic canonicalization and alias-aware evaluation pipeline, and a multi-stage verification process that enables runtime-free verifiable rewards for training.
Practical relevance
By providing a publicly released benchmark with verifiable rewards, KaliBench enables more reliable training and evaluation of LLMs for real-world cybersecurity command generation.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction