Skip to content
Back to search

kali-pentest

SkillWorks with Claude CodeGitHub

Kali Linux penetration testing skill for AI agents (Claude Code, OpenClaw, Hermes Agent). 200+ CLI tools, 15 scenario playbooks. Autonomously plans attack paths, selects tools, and integrates results across phases to adapt the penetration strategy — with human approval gates for high-risk actions.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/x-glacier-kali-pentest/badge.svg)](/listings/x-glacier-kali-pentest)

HTML

<a href="/listings/x-glacier-kali-pentest"><img src="/api/listings/x-glacier-kali-pentest/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Install the skill

Copy the skill directory into your AI agent's skills folder:

cp -r kali-pentest /path/to/your/agent/skills/kali-pentest

| Agent | Skills path | |---|---| | Claude Code | `~/.claude/skills/` (personal) or `.claude/skills/` (project) | | OpenClaw | `~/.openclaw/skills/` | | Hermes Agent | `~/.hermes/skills/` |

2. Provide Kali access

The agent needs a Kali Linux environment. Three options:

- **Local mode**: the agent runs directly on a Kali system — tools are invoked via bash without SSH or Docker overhead. Ideal when the AI agent itself is running on a Kali host. Documentation: [Kali installation guide](https://www.kali.org/docs/installation/), [Local mode guide](kali-pentest/references/environment/local-mode.md).

- **Server mode (preferred for remote)**: full Kali over SSH — avoids Docker networking, raw-socket, wireless, and GPU limitations. Documentation: [Kali installation guide](https://www.kali.org/docs/installation/), [Server mode guide](kali-pentest/references/environment/server-mode.md).

- **Docker mode**: pre-build a persistent container with tools installed. Best for CLI information gathering, vulnerability scanning, web/API and cloud-native testing, and reporting. Documentation: [Kali Docker guide](https://www.kali.org/docs/containers/using-kali-docker-images/), [Docker mode guide](kali-pentest/references/environment/docker-mode.md).

Tell the agent how to connect:

Kali tools are available locally (this machine is Kali).

Or use a remote Kali server (SSH key recommended):

Kali server: ssh -i ~/.ssh/kali_key root@192.168.1.100

Or use Docker locally:

The persistent Docker container `kali-pentest` is initialized with the full toolset.

*For OpenClaw and similar AI assistants, you can also configure Kali connection details in TOOLS.md so the agent reads them automatically without asking each time.*

3. Invoke

Use natural language to assign a penetration testing task. The agent confirms scope and proceeds autonomously.

**Slash command**:

For Claude Code and compatible agents.

/kali-pentest

**Conversational**:

For OpenClaw, Hermes Agent, and other AI assistants.

Tested Models

The skill workflow has been optimized and tested with:

- `claude-opus-4.6` - `claude-sonnet-4.6` - `deepseek-v4-pro` - `qwen3.6:27b` — local fallback for air-gapped environments (requires context length ≥ 128K)

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 356 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. English | [简体中文](README.zh.md)
  2. # kali-pentest
  3. A penetration testing skill built on Kali Linux for AI agents such as Claude Code, OpenClaw, and Hermes Agent. Currently includes 269 CLI tools across 14 categories. Built-in coverage matrices, zero-findings fallbacks, and objective stopping conditions for each scenario ensure testing depth.
  4. Unlike traditional automated penetration testing tools, the AI agent connects to a Kali environment via SSH or Docker, then autonomously plans the attack path based on the target, selects tools, integrates and analyzes results across phases to adapt the penetration strategy, and produces a structured report — with mandatory authorization checks and human approval gates for high-risk actions.
  5. > [!WARNING]
  6. > **Authorized Use Only** — This project is intended solely for authorized penetration testing, security research, and educational purposes. Always obtain explicit written permission before testing any target. Unauthorized access to computer systems is illegal.
  7. ---
  8. ## Demo
  9. A simulated end-to-end penetration test with mock data.
  10. **Targets**: 192.168.1.101 (Ubuntu 24 — 8 services) + 192.168.1.102 (Windows Server 2022 — 8 services).
  11. Initial phases — connectivity verification, host discovery, and port scanning:
  12. ![screenshot-1](demo/screenshot-1.png)
  13. Deep testing phase — vulnerability detection and zero-findings fallback:
  14. ![screenshot-2](demo/screenshot-2.png)
  15. **Attack chain discovered**: Redis no-auth → SSH shell → SUID privesc → root → path traversal reads MSSQL creds → xp_cmdshell → credential reuse → domain admin → secretsdump
  16. <a href="https://x-glacier.github.io/kali-pentest/demo/player.html">
  17. <picture>
  18. <img src="https://img.shields.io/badge/▶_Play_simulation-asciinema-d40000?style=for-the-badge&logo=asciinema&logoColor=white" alt="Play simulation">
  19. </picture>
  20. </a>
  21. Open [`demo/player.html`](https://x-glacier.github.io/kali-pentest/demo/player.html) in a browser to watch the recording with the asciinema player. Or play from the command line:
  22. ```bash
  23. # Install asciinema if needed: pip install asciinema
  24. asciinema play demo/pentest-simulation.cast
  25. ```
  26. **Report attachments**:
  27. - [`demo/simulation-report.md`](https://x-glacier.github.io/kali-pentest/demo/simulation-report.md) — Full Markdown report with evidence, reproduction steps, and remediation
  28. - [`demo/simulation-report.html`](https://x-glacier.github.io/kali-pentest/demo/simulation-report.html) — Beautified HTML report (dark theme, attack chain diagram, severity badges)
  29. ---
  30. ## Workflow
  31. ### Overall Workflow
  32. ```mermaid
  33. flowchart LR
  34. A[Receive Task] --> B[Step 1: Environment]
  35. B --> C[Step 2: Plan]
  36. C --> D[Step 3: Execute]
  37. D --> E[Step 4: Analyze & Iterate]
  38. E -->|Adapt strategy| D
  39. E --> F[Step 5: Report]
  40. C --- C1[Confirm authorization & scope]
  41. C --- C2[Plan attack path & select depth]
  42. C --- C3[Select playbook from decision tree]
  43. E --- E1[Integrate results across phases]
  44. ```
  45. ### Execution Detail (Step 3)
  46. ```mermaid
  47. flowchart TD
  48. PB[Select Playbook] --> CAT[Read category README]
  49. CAT --> TOOL[Select tool & run]
  50. TOOL --> OUT[Collect output]
  51. OUT --> EVAL{Findings?}
  52. EVAL -->|Yes| NEXT{New target type?}
  53. EVAL -->|No| DEEPER[Escalate: deeper scan or alternate tool]
  54. NEXT -->|AD| AD[active-directory.md]
  55. NEXT -->|Web app| WEB[web-application.md]
  56. NEXT -->|Credentials| PWD[password-audit.md]
  57. NEXT -->|Initial access| POST[post-exploitation.md]
  58. NEXT -->|No| ITER[Next iteration]
  59. AD --> ITER
  60. WEB --> ITER
  61. PWD --> ITER
  62. POST --> ITER
  63. DEEPER --> ITER
  64. ITER --> TOOL
  65. ```
  66. ---
  67. ## Getting Started
  68. ### 1. Install the skill
  69. Copy the skill directory into your AI agent's skills folder:
  70. ```bash
  71. cp -r kali-pentest /path/to/your/agent/skills/kali-pentest
  72. ```
  73. | Agent | Skills path |
  74. |---|---|
  75. | Claude Code | `~/.claude/skills/` (personal) or `.claude/skills/` (project) |
  76. | OpenClaw | `~/.openclaw/skills/` |
  77. | Hermes Agent | `~/.hermes/skills/` |
  78. ### 2. Provide Kali access
  79. The agent needs a Kali Linux environment. Three options:
  80. - **Local mode**: the agent runs directly on a Kali system — tools are invoked via bash without SSH or Docker overhead. Ideal when the AI agent itself is running on a Kali host.
  81. Documentation: [Kali installation guide](https://www.kali.org/docs/installation/), [Local mode guide](kali-pentest/references/environment/local-mode.md).
  82. - **Server mode (preferred for remote)**: full Kali over SSH — avoids Docker networking, raw-socket, wireless, and GPU limitations.
  83. Documentation: [Kali installation guide](https://www.kali.org/docs/installation/), [Server mode guide](kali-pentest/references/environment/server-mode.md).
  84. - **Docker mode**: pre-build a persistent container with tools installed. Best for CLI information gathering, vulnerability scanning, web/API and cloud-native testing, and reporting.
  85. Documentation: [Kali Docker guide](https://www.kali.org/docs/containers/using-kali-docker-images/), [Docker mode guide](kali-pentest/references/environment/docker-mode.md).
  86. Tell the agent how to connect:
  87. ```
  88. Kali tools are available locally (this machine is Kali).
  89. ```
  90. Or use a remote Kali server (SSH key recommended):
  91. ```
  92. Kali server: ssh -i ~/.ssh/kali_key root@192.168.1.100
  93. ```
  94. Or use Docker locally:
  95. ```
  96. The persistent Docker container `kali-pentest` is initialized with the full toolset.
  97. ```
  98. *For OpenClaw and similar AI assistants, you can also configure Kali connection details in TOOLS.md so the agent reads them automatically without asking each time.*
  99. ### 3. Invoke
  100. Use natural language to assign a penetration testing task. The agent confirms scope and proceeds autonomously.
  101. **Slash command**:
  102. For Claude Code and compatible agents.
  103. ```
  104. /kali-pentest
  105. ```
  106. **Conversational**:
  107. For OpenClaw, Hermes Agent, and other AI assistants.
  108. ### Tested Models
  109. The skill workflow has been optimized and tested with:
  110. - `claude-opus-4.6`
  111. - `claude-sonnet-4.6`
  112. - `deepseek-v4-pro`
  113. - `qwen3.6:27b` — local fallback for air-gapped environments (requires context length ≥ 128K)
  114. ---
  115. ## Usage Examples
  116. The agent supports three testing depths — **Quick** (fast check), **Standard** (default), and **Deep** (maximum coverage). Control it with natural language in your task description:
  117. | Phrase in your prompt | Depth |
  118. |---|---|
  119. | "quick scan", "fast check" | Quick |
  120. | *(no qualifier)* | Standard |
  121. | "full assessment", "comprehensive", "deep" | Deep |
  122. **Example 1** (Quick) — "quickly scan":
  123. ```
  124. Kali tools are available locally (this machine is Kali).
  125. Target: 10.0.0.0/24
  126. Quickly scan the target network for open ports along with their service/protocol names and versions, then produce a report.
  127. I have authorization.
  128. ```
  129. **Example 2** (Standard) — no depth qualifier:
  130. ```
  131. The persistent Docker container `kali-pentest` is initialized with the full toolset.
  132. Use Docker mode to run a web application penetration test against http://192.168.1.50 and produce a detailed report.
  133. I have authorization.
  134. ```
  135. **Example 3** (Deep) — "in-depth":
  136. ```
  137. Kali server: ssh -i ~/.ssh/kali_key root@192.168.1.100
  138. First run a full port scan and service fingerprinting against 192.168.1.50, then plan and execute an in-depth penetration test based on the results — do not overlook any potential weakness. After testing, produce a detailed report.
  139. I have authorization.
  140. ```
  141. > [!TIP]
  142. > A thorough, deep penetration test may require multiple conversation turns to complete. If the agent finishes too early or coverage is insufficient, you can point out the issue directly, or follow up with:
  143. > - "Did you fully utilize Kali Linux tools during the penetration test?"
  144. > - "Are the current pentest results comprehensive and deep enough?"
  145. > - "Check the playbook's Stop When conditions — have all checklist items been satisfied?"
  146. <details>
  147. <summary>More examples (API, cloud, mobile, wireless, source code, VoIP/ICS)</summary>
  148. ```
  149. Target domain: corp.example.com, domain controller 10.0.0.5
  150. Perform an Active Directory security assessment covering enumeration, Kerberoasting, ACL abuse, and certificate template checks.
  151. ```
  152. ```
  153. Target API: https://api.example.com, OpenAPI spec at /tmp/openapi.yaml
  154. Perform an API security assessment covering authentication, authorization, and schema-driven testing.
  155. ```
  156. ```
  157. Target: Kubernetes cluster context prod-audit and container registry registry.example.com
  158. Run a read-only cloud-native security assessment and produce a findings report.
  159. ```
  160. ```
  161. Target app: /tmp/app.apk with test account user@example.com
  162. Perform an Android application security assessment, including static analysis, runtime checks, and backend endpoint mapping.
  163. ```
  164. ```
  165. Authorized SSID: CorpWiFi, BSSID: AA:BB:CC:DD:EE:FF, channel 6
  166. Perform a wireless security assessment including passive discovery, handshake capture, WPS detection, and evil twin testing.
  167. ```
  168. ```
  169. Target repository: /tmp/source-repo (including Git history)
  170. Perform a source code and dependency audit including secret scanning, SAST, and CI/CD pipeline security checks.
  171. ```
  172. ```
  173. Target: SIP service 10.10.20.15 and Modbus host 10.10.30.20
  174. Conservative read-only VoIP/ICS protocol assessment. Do not place calls or write PLC/Modbus values.
  175. ```
  176. </details>
  177. ---
  178. ## Architecture
  179. ### Directory Structure
  180. ```
  181. demo/ ← Simulation recording and report attachments
  182. ├── pentest-simulation.cast ← asciicast v2 recording
  183. ├── player.html ← Browser-based asciinema player
  184. ├── simulation-report.md ← Full Markdown report
  185. └── simulation-report.html ← Beautified HTML report
  186. kali-pentest/
  187. ├── SKILL.md ← Agent entry point: planning, execution, error handling
  188. └── references/
  189. ├── playbooks/ ← 16 scenario workflows (AD, web, internal, cloud, wireless, ...)
  190. ├── environment/ ← Server mode and Docker mode setup
  191. ├── information-gathering/ ← 48 tools
  192. ├── vulnerability/ ← 17 tools
  193. ├── sniffing-spoofing/ ← 10 tools
  194. ├── web/ ← 38 tools
  195. ├── exploitation/ ← 24 tools
  196. ├── password/ ← 21 tools
  197. ├── wireless/ ← 27 tools
  198. ├── cloud-native/ ← 8 tools
  199. ├── rfid-nfc/ ← 5 tools
  200. ├── voip-ics/ ← 8 tools
  201. ├── reverse-engineering/ ← 17 tools
  202. ├── forensics/ ← 23 tools
  203. ├── post-exploitation/ ← 22 tools
  204. └── reporting/ ← 1 tool + report template
  205. ```
  206. The `kali-pentest-zh/` directory is the Chinese mirror and stays structurally synchronized with `kali-pentest/`.
  207. ### Document Layering
  208. The skill uses a four-layer document hierarchy. Each layer has a distinct responsibility, and the agent reads top-down:
  209. | Layer | Files | Responsibility |
  210. |-------|-------|----------------|
  211. | Entry point | `SKILL.md` | Global workflow (Steps 1–5), execution standards, general testing principles |
  212. | Scenario workflows | `playbooks/*.md` | Phase-by-phase procedures, decision trees, concrete command pipelines, depth-enforcement directives, stopping conditions |
  213. | Tool selection | `<category>/README.md` | Category overview, tool comparison, selection guidance |
  214. | Tool reference | `<category>/tools/<name>.md` | Parameters, command examples, installation, notes, official links |
  215. General principles live in `SKILL.md` (brief, no code blocks). Scenario-specific implementations live in playbooks (concrete commands, test matrices, coverage requirements). The layered structure prevents duplication while ensuring both global coverage and per-scenario depth.
  216. ### Depth Enforcement
  217. Each playbook includes bold-labeled directives at key workflow decision points to prevent the agent from doing shallow, surface-level work:
  218. - **Coverage requirements** — test ALL discovered items (endpoints, services, credentials), not just a sample.
  219. - **Zero-findings fallback** — escalate or manually verify when automated tools report no findings.
  220. - **Coverage matrices** — build explicit item × test matrices and complete every cell.
  221. - **Attack escalation** — progress through multiple attack techniques of increasing depth.
  222. Every playbook has objective, verifiable stopping conditions — not "testing is complete" but specific artifacts, matrices, and checklists that must be filled. Every confirmed finding must include the complete reproducible command and its actual output as evidence.
  223. ### Cross-Reference Logic
  224. Playbooks form a connected graph. When a workflow phase discovers targets that belong to a different scenario (e.g., AD signals during internal network scanning, API endpoints during web testing), the playbook directs the agent to switch. All such handoffs are listed in each playbook's `Cross-References` section.
  225. Reusable methodology (e.g., the scanning procedures in `internal-network.md` and protocol enumeration in `internal-network-protocols.md`) can be referenced from other playbooks.
  226. ### Playbooks
  227. 16 scenario workflows with phases, decision trees, risk gates, and stopping conditions:
  228. | Playbook | Scenario |
  229. |---|---|
  230. | `internal-network.md` | Host discovery, port scanning, service enumeration, pivoting |
  231. | `internal-network-protocols.md` | SMB, MSRPC, SNMP, SMTP, DNS, database, RDP protocol-specific enumeration |
  232. | `external-attack-surface.md` | OSINT, subdomain enumeration, exposed service scanning |
  233. | `web-application.md` | OWASP Top 10, CMS, injection, auth, business logic |
  234. | `api-security.md` | REST, GraphQL, gRPC, WebSocket, JWT, BOLA/IDOR |
  235. | `active-directory.md` | Kerberoasting, ADCS, relay, ACL abuse, DCSync |
  236. | `password-audit.md` | Hash cracking, spraying, credential reuse, capture |
  237. | `wireless-assessment.md` | WPA/WPA3, WPS, evil twin, Bluetooth/BLE |
  238. | `cloud-native-assessment.md` | AWS/Azure/GCP IAM, Kubernetes, containers, serverless |
  239. | `mobile-application.md` | Android/iOS static + dynamic analysis, SSL pinning bypass |
  240. | `post-exploitation.md` | Privilege escalation, lateral movement, persistence, C2 |
  241. | `forensics-triage.md` | Disk imaging, memory forensics, log analysis, steganography |
  242. | `rfid-nfc.md` | NFC/RFID cloning, smart cards, firmware extraction |
  243. | `voip-ics.md` | VoIP/SIP, ICS/OT/Modbus, IPMI/BMC (safety-first) |
  244. | `source-code-audit.md` | Secret scanning, SAST, dependency audit, CI/CD checks |
  245. | `reporting-workflow.md` | Evidence packaging, CVSS scoring, report generation |
  246. ### Tool Selection Criteria
  247. All tools are selected for autonomous agent operation:
  248. - **CLI-automatable only** — GUI-only tools and interactive debuggers are excluded
  249. - **Headless binary analysis included** — `strings`, `checksec`, `radare2` one-shot, Ghidra Headless
  250. - **CLI alternatives preferred** — e.g., `tshark` instead of Wireshark
  251. ---
  252. ## Disclaimer
  253. This project is provided as-is for educational purposes and authorized security testing. Users are solely responsible for obtaining written authorization and complying with applicable laws and regulations. The authors assume no liability for damage caused by this project.
  254. ## Vulnerability Disclosure
  255. Security vulnerabilities discovered during authorized testing must be reported privately to the asset owner through agreed-upon channels. Do not publicly disclose vulnerability details before the owner has had reasonable time to remediate. Follow [responsible disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure) practices and any coordinated disclosure agreements in your engagement scope.
  256. ## Contributing
  257. Issues and pull requests are welcome.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.