Hermes 的智能体渗透测试配置文件:31 个 playbook,涵盖授权侦察、Web/访问控制攻击、安全漏洞利用验证,以及带防护门的基于证据的报告。
<p align="center">
<img src="https://assets.kitploit.com/production/public/readmes/50022/55f1c11f1fa53cb32838b487d5b5b6f1745b609c7123ce0a2b28ff21108c765b.png" alt="Violin" width="256"/>
</p>
<h1 align="center">Violin ☤ — 受监督的智能体式 Hermes 渗透测试配置</h1>
<p align="center">
<a href="https://github.com/Strategic-Automation/violin"><img src="https://img.shields.io/badge/Status-Release%20Ready-2ea44f?style=for-the-badge" alt="Release Ready"></a>
<a href="https://github.com/Strategic-Automation/violin/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue?style=for-the-badge" alt="License: MIT"></a>
<a href="https://hermes-agent.nousresearch.com/"><img src="https://img.shields.io/badge/Hermes-%3E=0.21.5-FFD700?style=for-the-badge" alt="Hermes >=0.21.5"></a>
<a href="https://www.kali.org/"><img src="https://img.shields.io/badge/Kali%20Linux-557C94?style=for-the-badge&logo=kali-linux&logoColor=white" alt="Kali Linux"></a>
<a href="https://www.parrotsec.org/"><img src="https://img.shields.io/badge/Parrot%20OS-2E8B57?style=for-the-badge" alt="Parrot OS"></a>
<a href="https://strategic-automation.github.io/violin/"><img src="https://img.shields.io/badge/Site-Landing%20page-FF3B4A?style=for-the-badge" alt="Landing page"></a>
<a href="https://github.com/Strategic-Automation/violin/stargazers"><img src="https://img.shields.io/github/stars/Strategic-Automation/violin?style=for-the-badge&color=FFD166" alt="GitHub stars"></a>
</p>
<p align="center">
<b>35 个操作手册 · 19 份参考资料 · 14 个模板 · 必需的执行防护 · Hermes 原生</b>
</p>
Violin 是一个 **Hermes 原生的智能体式渗透测试配置**,用于受监督、经授权的渗透测试——从侦察、安全漏洞验证到报告。它使用 Hermes 内置的工具集、七个路由技能,以及在目标执行边界处必需的 `violin_guard` 插件。独立 CLI 支持发布检查、诊断和管理恢复;目标命令通过该插件运行。Violin 不添加任何配置专属凭据,并继承 Hermes 中已配置的提供方和工具后端。
<p align="center">
<a href="#quick-start">快速开始</a> ·
<a href="#engagement-lifecycle">工作流程</a> ·
<a href="#guard-tools">防护工具</a> ·
<a href="#benchmarks">基准测试</a> ·
<a href="https://strategic-automation.github.io/violin/">落地页</a> ·
<a href="https://github.com/Strategic-Automation/violin/discussions">讨论区</a> ·
<a href="#development">开发</a>
</p>
<p align="center">
<strong>关注 Violin?</strong>
<a href="https://github.com/Strategic-Automation/violin/stargazers">为仓库加星</a>
以便于查找,并帮助其他安全工程师发现受监督的智能体式渗透测试。
</p>
### 社区收录
Violin 已被收录于社区精选合集,包括
[awesome-ai-security](https://github.com/gmh5225/awesome-ai-security)、
[awesome-hermes-skills](https://github.com/ZeroPointRepo/awesome-hermes-skills)、
[awesome-hermes-agent](https://github.com/Anil-matcha/awesome-hermes-agent) 和
[awesome-infosec](https://github.com/onlurking/awesome-infosec)。
第三方报道:
[Starlog 技术分析](https://starlog.is/articles/cybersecurity/strategic-automation-violin) 和
[“Violin: Supervised Agentic Penetration Testing Profile for Hermes Agent”](https://hamradio.my/violin-supervised-agentic-pentest-profile-hermes/)。
如需独立评估,请使用
[评审工具包](https://strategic-automation.github.io/violin/review.html),其中
汇集了基准测试路径、已知限制、评审背景,以及与自主渗透测试智能体设计的事实性对比。
---
<table>
<tr><td width="240"><strong>受保护的目标执行</strong></td><td>在目标命令启动前,会执行范围、阶段、PTT、技能、假设、历史记录和同步检查。</td></tr>
<tr><td><strong>持久化交战状态</strong></td><td>PTT 任务、假设、命令历史、检查点、证据和报告在上下文压缩后依然保留。</td></tr>
<tr><td><strong>有证据支撑的发现</strong></td><td>类型化提交将每个已验证的发现与经过身份验证的执行回执绑定。</td></tr>
<tr><td><strong>按路由选择的方法论</strong></td><td>渗透测试编排器会选择针对性的 Web、身份、API、业务逻辑、LLM 安全和错误配置操作手册。</td></tr>
<tr><td><strong>有界执行</strong></td><td>单条命令、命令突发、后台进程、批量审查、心跳检查和取消操作共享同一状态模型。</td></tr>
<tr><td><strong>可验证的发布</strong></td><td>插件注册、模式、技能快照、文档契约、lint、格式化和完整测试套件均受发布门禁约束。</td></tr>
</table>
## 快速开始
### 安装配置文件
```bash
hermes profile install https://github.com/Strategic-Automation/violin
hermes -p violin plugins disable violin_guard
hermes -p violin plugins enable violin_guard --no-allow-tool-override
hermes -p violin
```
Guard 依赖在 `plugins/violin_guard/plugin.yaml` 中声明。插件名称、目录和启用配置均使用 `violin_guard`,因此 Hermes 无需目录变通即可解析其依赖。将依赖安装到开发用的 `.venv` 中并不会将其安装到 Hermes。即使配置文件已启用该插件,上述禁用/启用循环也会强制进行依赖准入。安装后验证注册情况:
```bash
hermes -p violin plugins doctor ~/.hermes/profiles/violin/plugins/violin_guard --ci
hermes -p violin tools list
```
Plugin Doctor 应报告 12 个工具和 5 个钩子,并且 `violin_guard` 应显示为已启用的工具集。安装后,在开始参与之前重启 Hermes。重新安装该配置文件以迁移较旧的 `violin-guard` 安装。
然后从一个已授权的目标开始,让 Violin 在任何目标交互之前收集范围:
```text
Run an authorized penetration test against example.com.
```
### 要求
- [Hermes Agent](https://hermes-agent.nousresearch.com/) 0.21.5 或更高版本(容器固定使用 `v2026.9.24` 发布提交)
- 本地开发需要 Python 3.11 和 `uv`
- 预期的安全工具环境需要 Kali Linux 或 Parrot OS
- 书面授权和已批准的范围
Violin 不选择模型或提供商。请在 Hermes 中配置这些内容。对于
一个能力足够的默认选项,可在本地使用 **Qwen3.8 27B**,或通过
托管提供商使用 **DeepSeek V4 Flash**。
## 参与生命周期
```mermaid
flowchart LR
S[Scope] --> R[Recon]
R --> V[Vulnerability research]
V --> E[Exploit validation]
E --> P[Reporting]
P --> X[Retrospective]
G[Violin Guard] -. validates .-> R
G -. validates .-> V
G -. validates .-> E
```
1. 初始化任务并批准 `scope/scope.yaml`。
2. 使用 `violin_record_ptt` 选择一个活跃的 PTT 任务及其路由技能。
3. 使用 `violin_exec` 或 `violin_exec_burst` 运行目标命令。
4. 随着证据改变假设状态,更新假设。
5. 使用 `violin_review_batch` 审查每个有界命令批次。
6. 提交经过验证的发现并生成最终报告。
7. 完成回顾总结。
完整的阶段模型为:
```text
SCOPING → RECON → VULN_RESEARCH → EXPLOITATION
→ POST_EXPLOITATION / PRIVESC / FLAGS
→ REPORTING → RETROSPECTIVE
```
在新阶段开始工作,需要在该阶段下创建一个 PTT 任务。现有任务不会在阶段分区之间移动。
## 防护工具
该插件从一个类型化注册表中注册了十二个 Hermes 工具:
| 工具 | 用途 |
|---|---|
| `violin_record_ptt` | 创建、启动、刷新、关闭或取消 PTT 任务 |
| `violin_record_hypothesis` | 创建或更新限定范围的假设 |
| `violin_submit_finding` | 提交与其签名执行回执绑定的已验证发现 |
| `violin_exec` | 执行一条受防护的命令 |
| `violin_exec_burst` | 执行一个有边界的命令文件 |
| `violin_exec_status` | 读取后台执行状态 |
| `violin_exec_cancel` | 取消已跟踪的后台执行 |
| `violin_review_batch` | 审查已完成的批次并确定状态 |
| `violin_rebind_pending_batch` | 在确认后重新绑定待处理批次 |
| `violin_heartbeat_done` | 清除已完成的心跳审查 |
| `violin_target` | 解析已批准的评估目标 |
| `violin_status` | 说明当前任务、技能和阻塞项 |
`violin_exec` 是通用的目标命令边界。不存在针对特定工具的执行适配器或二进制允许列表。已安装的非交互式工具只有在参与门禁通过后才能运行。
原始终端钩子是一种尽力而为的安全网,而非网络隔离。仅将 `terminal` 用于主机本地的准备和管理。
## 安全模型
```mermaid
flowchart LR
A[Written authorization] --> B[Approved scope]
B --> C[Active phase task]
C --> D[Skill and hypothesis gates]
D --> E[Guarded execution]
E --> F[Evidence receipt]
F --> G[Batch review]
```
- 在范围批准和引导验证完成之前,不得与目标进行任何交互。
- 不得为目标命令执行原始 shell。
- 未经明确书面授权,不得执行任何破坏性、干扰性、凭据获取、持久化、隐蔽或第三方操作。
- 原始证据保留在 `$ENG_DIR/evidence/<phase>/` 下。
- 机密信息、转储数据和证明输出不得存放在 `$ENG_DIR/state/` 中。
- 上下文压缩后,从当前 Hermes 对话中的 engagement 文件恢复。
详细策略见
[`skills/pentest/references/standards.md`](https://github.com/strategic-automation/violin/blob/master/skills/pentest/references/standards.md)。
## Engagement 状态
`init-engagement` 会创建规范的工作结构:
```text
$ENG_DIR/
├── scope/
│ └── scope.yaml
├── state/
│ ├── ptt.md
│ ├── history.md
│ └── checkpoint.json
├── hypotheses.md
├── evidence/
├── reporting/
└── retrospective/
```
### 从 Violin 3.3 升级
Violin 4.0 将执行器状态存储在 `state/runtime.json` 中,并且不会迁移
3.3 的 `sync.json`、`counts.json` 或 `heartbeat.json` 文件。请在新目录中
启动新的任务;将 3.3 目录保留为历史记录。
复用其目录会保留旧版状态文件,因此 Violin 4.0
将拒绝该目录。
### 技能交付
技能按需加载。对于已路由的技能,首次调用 `violin_record_ptt` 可能返回
`skill_prepared` 而不更改 PTT。在 Hermes
交付技能内容后,重复该转换以绑定回执并应用
任务变更。`violin_status` 会报告确切的恢复操作。
诸如 `.skill-loaded-*` 之类的标记文件并不能证明技能已交付。
## 已路由技能
| 技能 | 覆盖范围 |
|---|---|
| `pentest` | 范围、生命周期、侦察、利用、报告、收尾 |
| `web-app` | 注入、SSRF、路径遍历、反序列化、客户端缺陷 |
| `identity-auth` | 认证、授权、IDOR、JWT、CSRF、密码学 |
| `api-testing` | REST、SOAP、GraphQL、WebSocket |
| `business-logic` | 工作流、定价、优惠券、配额、推荐、竞态条件 |
| `llm-security` | 提示注入、MCP、JSON-RPC |
| `misconfig` | 部署、错误处理、可观测性、隐蔽性 |
编排器仅加载当前任务所需的阶段材料和专家手册。
## 管理 CLI
CLI 不能替代受保护的目标执行。
```bash
python scripts/violin_guard.py --help
python scripts/violin_guard.py init-engagement engagements/example --host example.com
python scripts/violin_guard.py check-bootstrap --eng-dir engagements/example
python scripts/violin_guard.py status --eng-dir engagements/example
python scripts/violin_guard.py generate-closeout --eng-dir engagements/example
python scripts/violin_guard.py check-release
```
`check-command` 暴露用于诊断的准入检查,并且不会执行所提供的命令。
## 架构
```text
plugins/violin_guard/
├── core/
│ ├── commands/ shell parsing, targets, HTTP proof
│ ├── engagement/ state, PTT, phases, hypotheses, bootstrap
│ ├── evidence/ findings, history, receipts, redaction
│ └── skills/ skill policy and receipts
├── gates/ command, scope, hypothesis, terminal policies
├── engine/ execution, runtime backend, code audit, release checks
├── handlers/ public Hermes tool handlers
├── hooks.py Hermes lifecycle hooks
└── registry.py registered tool definitions
skills/ orchestrator, routed skills, playbooks, references
benchmark/ runner, scorer, proof checks, calibration fixtures
scripts/ administrative CLI and platform smoke tests
tests/ runtime, integration, documentation, release tests
```
## 基准测试
该仓库包含 Escape Duck Store 定义,以及已知良好和已知不良的评分器测试样本。校准证明评分器能够处理这些测试样本;但它并不能证明实时智能体的召回率、工作流完成情况或报告质量。
```bash
uv run python -m benchmark.score --calibrate known-good
uv run python -m benchmark.score --calibrate known-bad
uv run python -m benchmark.run \
--target http://localhost:<published-port> \
--provider <provider> \
--api-base <openai-compatible-base-url> \
--model <model-id> \
--target-isolation-id escape-duck-store-2026-04:<image-digest-or-reset-id>
```
在发布评分之前,请先阅读[基准测试方法](https://github.com/strategic-automation/violin/blob/master/docs/BENCHMARKS.md)。
它定义了可信结果所需的证明、可复现性、私有评估和披露
要求。
## 开发
```bash
uv sync --dev
uv run pytest
uv run ruff check .
uv run ruff format --check .
uv run python scripts/violin_guard.py check-release
```
发布门禁会检查版本表面、隔离插件导入、已注册工具、生成的 schema、技能快照、文档契约、Ruff 以及完整测试套件。
平台冒烟测试:
- `scripts/smoke-test.sh` — Linux 和 Kali/Parrot 发布冒烟测试
- `scripts/smoke-test.ps1` — Windows 引导、作用域和目标解析冒烟测试;技能交付和目标执行需要 Hermes
贡献规则参见 [CONTRIBUTING.md](https://github.com/strategic-automation/violin/blob/master/CONTRIBUTING.md),私有漏洞报告参见 [SECURITY.md](https://github.com/strategic-automation/violin/blob/master/SECURITY.md)。
## 负责任使用
Violin 用于经授权的安全评估。操作者需对范围、审批、目标所有权、数据处理和当地法律负责。
## 支持 Violin
Violin 是由 Strategic Automation Ltd 维护的开源项目。
如果 Violin 对您或您的组织有帮助,您可以
[赞助其持续开发](https://github.com/sponsors/Strategic-Automation)。
赞助支持持续开发、测试、文档、兼容性工作和发布。
Violin 仍以 MIT 许可证提供。赞助不包含保证支持、功能优先权或对安全策略的影响力。
## 许可证
MIT — 参见 [LICENSE](https://github.com/strategic-automation/violin/blob/master/LICENSE)。