arXiv:2610.02206cs.CLOct 2026

Manuscript Offprint

arXiv:2610.02206

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Pengfei Li 1,∗^{1,*}, Naufal Suryanto 1,∗^{1,*}, Sicheng Zhang 1^{1}, Muzammal Naseer 1,2^{1,2}

1^{1}Khalifa University, 2^{2}University of Western Australia, ∗^{*}Equal contribution

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.

Project Page: https://risys-lab.github.io/KaliBench/

Github: https://github.com/RISys-Lab/KaliBench

Analyst Request

"Scan host 192.168.1.100 using TCP Connect scan on ports 21 through 25 and 80, and display only open ports."

Understand Intent

Understand context & Recall tools

Port-scanning

Nmap tool

TCP connect scan

Tool Invocation

Schema-based function call

nmap(scan_type="TCP connect", ports="21-25,80", open_only=true, target="192.168.1.100")

Exact CLI Command

Execute & Observe

Run generated command

Execute:

nmap -sT -p 21-25,80 --open 192.168.1.100

Observe:

open ports, service hints, stderr, exit code

KaliBench

I. Data Example

Fine-grained, schema-free, executable, and verifiable CLI benchmark.

Natural Language User Query

"Scan host ..."

Command Decomposition

Tool_name: nmap

Optional_args: {--open": null, "-sT": null,

"-p": "21-25,80"}

Positional_args: ["192.168.1.100"]

Exact Kali Command (Ground Truth)

nmap -sT -p 21-25,80

--open 192.168.1.100

II. Benchmark Coverage

8,504

Query-Command Pairs

1,642

Kali Linux Tools

23

Capability Dimensions

5

Security Phases

III. Fine-grained Eval

Tool Selection

Optional Arguments

Positional Arguments

Arg Order & Syntax

Exact Match

IV. Model Improvement

Gemma-3-it 27B

RedSage-ins 8B (Base)

GPT-OSS 120B

Qwen3-Coder-Next

RedSage-K-SFT-GRPO-8B (Ours)

DeepSeek-V3.2 685B

GLM-5.2 753B

Ours 8B model approaches

685B MoE performance

V. Exact Commands Remain Hard

No evaluated open-weight model

exceeds 42% exact-command

accuracy without tool hints.

Exact Command Correct (%)

Qwen3-Coder-

Next 80B

79.9

25.2

RedSage-K-SFT-GRPO (Ours)

69.4

8B

DeepSeek-V3.2

84.5

685A37B

33.0

GLM-5.2

74.8

753B

Hinted Mode

Unrestricted Mode

Figure 1: Why KaliBench Matters? KaliBench enables fine-grained, verifiable evaluation and runtime-free reward training for translating analyst intent into executable Kali commands.

1 Introduction

Large language models (LLMs) are increasingly adopted in cybersecurity workflows, ranging from interactive assistants to autonomous agents [40]. Early benchmarks in this domain primarily focus on knowledge-based assessment, testing models' understanding of cybersecurity concepts via multiple-choice [36, 19] or structured-answer questions [14, 3]. More recent benchmarks move toward end-to-end agentic evaluation, measuring model performance in complex environments such as autonomously solving CTF-style challenges [32, 45]. While these benchmarks provide valuable insight into what LLMs know and how they behave in integrated workflows, they do not directly evaluate whether models can generate correct invocations of concrete cybersecurity tools in isolation.

This limitation is consequential because modern security operations rely heavily on large, heterogeneous command-line toolchains. Kali Linux, a widely used platform among cybersecurity practitioners, provides access to over 2,000 pre-installed security tool packages [31]. In practice, analysts must translate high-level goals (e.g., “scan this subnet for SMB misconfigurations”) into precise command-line invocations of tools such as Nmap for scanning, Metasploit for exploitation, and Volatility for memory forensics. Although LLMs with function-calling capabilities aim to automate this process, CLIs are unforgiving: minor errors in argument order, flag spelling, alias misuse, or tool misinterpretation can invalidate execution. This motivates a central question: Can current LLMs reliably translate natural-language security requests into exact, executable CLI commands?

While function-calling benchmarks for LLMs have matured rapidly [17, 10, 21, 20, 28], evaluating cybersecurity tool invocation poses distinct challenges. Existing benchmarks primarily assume schema-defined tools, in which functionality and parameters are explicitly specified via JSON schemas or APIs. In contrast, cybersecurity tooling is dominated by CLIs, such as the Kali Linux toolset, where enumerating hundreds of tool schemas in a model prompt is impractical in typical deployment settings due to context length limitations. As a result, Natural-Language-to-CLI (NL-to-CLI) evaluation is effectively schema-free: models must infer appropriate tools and arguments and generate syntactically correct, executable commands rather than populate structured fields.

To address this gap, we develop KaliBench, a fine-grained benchmark for NL-to-CLI cybersecurity tool use on Kali Linux. As shown in Fig. 1, KaliBench maps analyst intent to exact CLI commands, decomposing tool selection and argument construction for fine-grained, verifiable evaluation. It organizes tools across capability dimensions and security phases and is constructed via a manuscript-grounded pipeline. To ensure data quality, we employ a multi-stage verification process combining LLM-based validation, sandboxed execution, and human-in-the-loop refinement, producing semantically correct and executable commands.

KaliBench provides fine-grained supervision over tool selection and argument construction. We evaluate models under three settings, unrestricted, restricted, and hinted, which vary the degree of tool information provided. This structured formulation further enables runtime-free verifiable rewards, allowing training without command execution. Using this framework, we evaluate 24 configurations of general-purpose and security-focused open-weight models and find that performance remains limited, with argument construction as the primary bottleneck. We further show that Supervised Fine-Tuning (SFT) and Reinforcement Learning with Verifiable Rewards (RLVR) improve an 8B model and achieve performance competitive with substantially larger models. Our main contributions are summarized as follows:

• A fine-grained benchmark for schema-free NL-to-CLI evaluation. KaliBench is, to the best of our knowledge, the first benchmark for evaluating LLMs on cybersecurity tool invocation in schema-free CLI settings, comprising 8,504 query-command pairs over 23 capability dimensions and five security phases, split into 5,000 evaluation and 3,504 training samples after deduplication.

• A verified and executable dataset. We construct a high-quality dataset through a multi-stage verification pipeline that ensures both semantic correctness and practical executability.

• Runtime-free verifiable rewards. We show that deterministic CLI structure enables verifiable reward signals without runtime execution, supporting scalable reinforcement learning.

• Fine-grained evaluation and training gains. We evaluate over 20 LLMs under three settings and identify argument construction as the primary bottleneck. Training with supervised fine-tuning and reinforcement learning using KaliBench rewards improves an 8B model’s mean Total Score across the three evaluation modes by 7.5 percentage points.

Figure

Figure 2: KaliBench end-to-end pipeline for NL-to-CLI evaluation on Kali Linux. The benchmark is constructed via LLM-based data generation, multi-round verification-regeneration, and representative-sample selection. Evaluation applies alias-aware parsing and fine-grained scoring over tools, arguments, and dimensional categories.

References (31)