Strategic-Automation/violin

GitHub: Strategic-Automation/violin

基于 Hermes Agent 的无插件监督式渗透测试 Profile,通过 31 个 playbook 和多层安全机制实现从侦察到报告的自动化授权测试流程。

Stars: 10 | Forks: 1

Violin

Violin ☤ — 监督式 Agentic Hermes 渗透测试 Profile

Release Ready License: MIT Hermes >= 0.18.0 Kali Linux Parrot OS

31 个 playbook · 8 份参考文档 · 0 个插件 · 0 个 broker · 100% 使用 Hermes 内置工具

Violin 是一个**无插件的 Hermes Agent profile**,专为监督下且经过授权的渗透测试设计——涵盖从侦察、安全的漏洞验证到报告生成的全过程。它仅使用 Hermes 的内置工具集、基于技能的 playbook 和轻量级的 guard 脚本。无需自定义插件代码,无需 broker 服务,也无需外部编排器。 ``` hermes profile install https://github.com/StrategicAutomation/violin hermes -p violin ``` ## 功能
🔬 31 个方法论文档7 个阶段 playbook(范围界定 → 侦察 → 漏洞利用 → 报告)+ 24 个针对特定漏洞类别的 playbook,覆盖 OWASP Top 10、OWASP API Top 10、LLM Top 10 及更多标准。
🛡️ 多层安全机制交互式范围界定(8个问题)→ 范围验证 → 机器守卫检查 → 用户批准关卡 — 每一条触及目标的指令在执行前都会经过验证。
🧠 自主工具发现检测已安装的工具,搜索替代方案,阅读文档,并请求安装缺失的工具。绝不默默跳过任何一步。
🌐 浏览器与网络研究使用浏览器工具集进行网站枚举(登录表单、控制面板、DOM 检查)。使用 Web 工具集进行 CVE 查找、漏洞利用搜索和 OSINT。
📋 证据驱动报告提供包含截图、工具输出、请求/响应对的可重现证据。结构化的 CVSS 3.1 评分体系,附带 L1–L4 严重性级别。
🔗 Hermes 原生继承您现有的 Hermes provider/model。无需额外的 API 密钥,无需为单独的 profile 配置凭证,绝无绑定限制。
## 快速开始 ``` # 安装 profile hermes profile install https://github.com/StrategicAutomation/violin # 启动一个 session hermes -p violin # 让 Violin 问 8 个 scoping 问题,然后运行你的测试 > Run a pentest against example.com ```
前提条件 - **Hermes Agent >= 0.18.0** — 已安装并配置在您的 PATH 环境变量中 - **已配置 Hermes provider** — Violin 继承您常规的 Hermes provider/model。无需为 Violin 单独配置 API 密钥。 - **推荐使用 Kali Linux 或 Parrot OS** — 同时也支持 Docker Kali、WSL、macOS、Windows 以及远程跳板机(范围界定阶段会自动适应您的环境)。
设置为默认 profile ``` hermes profile use violin ```
## 授权测试工作流 ``` flowchart LR A["1. Scoping"] --> B["2. Recon"] B --> C["3. Vuln Research"] C --> D["4. Exploitation"] D --> E["5. Reporting"] E --> F["6. Retrospective"] A -.->|"clarify"| G("Approval Gate") B -.->|"guard check"| G C -.->|"guard check"| G D -.->|"clarify + guard"| G style A fill:#1a1a2e,stroke:#e94560,stroke-width:2px style B fill:#16213e,stroke:#0f3460,stroke-width:2px style C fill:#1a1a2e,stroke:#e94560,stroke-width:2px style D fill:#16213e,stroke:#0f3460,stroke-width:2px style E fill:#1a1a2e,stroke:#e94560,stroke-width:2px style F fill:#16213e,stroke:#0f3460,stroke-width:2px style G fill:#2d2d2d,stroke:#ffd700,stroke-width:2px ``` ### 各阶段执行内容
阶段操作安全关卡
1. 范围界定通过 clarify 提出 8 个问题 — 目标类型、测试模式、风险容忍度、授权情况用户批准
2. 侦察被动 OSINT → 技术栈检测 → 主动扫描守卫 + 批准
3. 漏洞研究CVE 查找、漏洞利用搜索、攻击面分析守卫检查
4. 漏洞利用针对各类漏洞进行安全的 PoC 验证守卫 + 用户批准
5. 报告证据汇总、CVSS 评分、修复建议
6. 复盘差距分析、更新 playbook 覆盖范围强制执行
## 架构 ``` graph TB subgraph "Your Machine" HE["Hermes Agent"] VI["Violin Profile"] GUARD["violin_guard.py"] end subgraph "Violin Skills" SK["SKILL.md"] PB["31 Playbooks"] REF["8 References"] TEMP["2 Templates"] end subgraph "Hermes Built-in Tools" T["terminal"] W["web"] B["browser"] F["file"] CE["code_execution"] S["skills"] CL["clarify"] D["delegation"] V["vision"] TD["todo"] end LLM["Your LLM Provider"] HE -->|"hermes -p violin"| VI VI -->|"loads"| SK SK -->|"routes to"| PB PB -->|"uses"| T & W & B & F VI -->|"validates via"| GUARD HE -->|"calls"| T & W & B & F & CE & S & CL & D & V & TD HE -->|"inherits"| LLM style HE fill:#2d2d2d,stroke:#ffd700,stroke-width:2px style VI fill:#1a1a2e,stroke:#e94560,stroke-width:2px style GUARD fill:#16213e,stroke:#0f3460,stroke-width:2px ``` ## 工具集
已启用 10 个与渗透测试相关的 Hermes 工具集 | # | 工具集 | 用途 | |---|---------|---------| | 1 | `terminal` | 运行渗透测试工具、发现工具、阅读文档 | | 2 | `web` | CVE 研究、漏洞利用搜索、OSINT、工具发现 | | 3 | `browser` | 网站枚举 — 表单、DOM、截图、链接抓取 | | 4 | `file` | 证据、报告、范围文档 | | 5 | `code_execution` | 解析输出、编写自定义漏洞利用脚本 | | 6 | `skills` | 加载渗透测试 playbook | | 7 | `todo` | 跟踪测试阶段和任务 | | 8 | `clarify` | 请求用户批准和做出决策 | | 9 | `delegation` | 并行侦察和漏洞利用开发 | | 10 | `vision` | 截图分析和视觉证据 |
会话与记忆隔离 Violin 在设计上实现了完全隔离: - `memory.memory_enabled: false` — 不进行全局 MEMORY.md 的读取/写入 - `memory.user_profile_enabled: false` — 不进行全局 USER.md 访问 - `session_search` 未启用 — 无法搜索无关的聊天记录 - 测试项目的连续性记录保存在项目文件中(范围界定文档、证据、笔记、报告) - 每次执行测试时开启一个新的 Hermes 对话,以保持清晰的边界
## 安全模型
多层安全架构 ``` flowchart LR subgraph "Layer 1" A["8 Scoping Questions"] B["Written Authorisation"] end subgraph "Layer 2" C["violin_guard.py validate-scope"] end subgraph "Layer 3" D["violin_guard.py check-command"] end subgraph "Layer 4" E["clarify approval gate"] end subgraph "Layer 5" F["Standards & Blocked Actions
in references/standards.md"] end A --> B --> C --> D --> E --> F ``` - **仅限授权测试** — 在范围界定完成并获得批准之前,绝不进行任何探测 - **批准关卡** — 范围界定、主动侦察和漏洞利用阶段都需要通过 `clarify` 获得用户的明确批准 - **机器检查** — 每一条触及目标的指令在执行前都会经过 `violin_guard.py` 处理(退出码 0=允许,1=拦截,2=需要人工审查) - **默认非破坏性** — 漏洞利用仅限于安全、可重现的 PoC - **证据优先** — 每一项发现都有可重现的工具输出、截图、请求/响应对作为支撑 - **基于安全框架** — 每一项操作均符合 PTES、OWASP WSTG 或 NIST SP 800-115 标准 有关批准层级、被拦截的操作、证据处理、速率限制和范围白名单的完整策略,请参见 `skills/pentest/references/standards.md`。
被拦截的操作 | 操作 | 默认状态 | |--------|---------------| | 凭证攻击 (暴破、密码喷洒) | ❌ 已拦截 — 需要获得 RoE (测试规则) 的明确豁免 | | 社会工程学 (钓鱼、语音钓鱼) | ❌ 已拦截 | | 超出证明范围的后续漏洞利用 | ❌ 已拦截 | | 权限维持 (后门、cron、服务) | ❌ 已拦截 | | 隐蔽/规避 (反取证、篡改日志) | ❌ 已拦截 | | 恶意软件部署 | ❌ 已拦截 | | 破坏性 payload (DROP TABLE、rm -rf) | ❌ 已拦截 | | 数据窃取 | ❌ 已拦截 — 仅限最小限度的 PoC 证据 |
## Playbook 库
7 个核心阶段 playbook | 阶段 | Playbook | 描述 | |-------|----------|-------------| | 范围界定 | `playbooks/scoping.md` | 范围定义、测试规则、目标验证 | | 侦察 | `playbooks/recon.md` | 被动与主动侦察、资产枚举、技术栈检测 | | 漏洞研究 | `playbooks/vuln-research.md` | CVE 查找、手动分析、工具扫描 | | 漏洞利用 | `playbooks/exploitation.md` | PoC 开发、漏洞利用实施、证据捕获 | | 后渗透 | `playbooks/post-exploitation.md` | 有限操作:仅证明访问权限范围,不进行横向移动 | | 报告 | `playbooks/reporting.md` | 发现文档、风险评级、修复建议、执行摘要 | | 工具 | `playbooks/tools.md` | 工具安装、发现与管理 |
24 个针对特定漏洞类别的 playbook | 漏洞类别 | Playbook | OWASP 映射 | |---------------------|----------|---------------| | SQL 注入 (SQLi) | `playbooks/sqli.md` | A03:2021 — Injection | | 跨站脚本攻击 (XSS) | `playbooks/xss.md` | A03:2021 — Injection | | 命令注入 | `playbooks/command-injection.md` | A03:2021 — Injection | | SSRF | `playbooks/ssrf.md` | A10:2021 — SSRF | | 服务端模板注入 (SSTI) | `playbooks/ssti.md` | A03:2021 — Injection | | 路径遍历 | `playbooks/path-traversal.md` | A01:2021 — Broken Access Control | | IDOR / 访问控制 | `playbooks/idor-access-control.md` | A01:2021 | | 身份验证绕过 | `playbooks/auth-bypass.md` | A07:2021 — Auth Failures | | JWT 攻击 | `playbooks/jwt-attacks.md` | A07:2021 — Auth Failures | | 不安全的反序列化 | `playbooks/deserialization.md` | A08:2021 — Integrity Failures | | XML 外部实体 (XXE) | `playbooks/xxe.md` | A05:2021 — Security Misconfig | | NoSQL 注入 | `playbooks/nosql-injection.md` | A03:2021 — Injection | | LLM 提示词注入 | `playbooks/llm-prompt-injection.md` | OWASP LLM Top 10 | | 业务逻辑缺陷 | `playbooks/business-logic.md` | A04:2021 — Insecure Design | | API 安全 | `playbooks/api-security.md` | OWASP API Top 10 | | 输入验证 | `playbooks/input-validation.md` | A04:2021 — Insecure Design | | 密码学问题 | `playbooks/cryptographic-issues.md` | A02:2021 — Crypto Failures | | 安全配置错误 | `playbooks/security-misconfiguration.md` | A05:2021 — Security Misconfig | | 基于隐蔽性的安全 | `playbooks/security-through-obscurity.md` | A05:2021 — Security Misconfig | | 未经验证的重定向 | `playbooks/redirects-unvalidated.md` | A01:2021 — Broken Access Control | | 反自动化 | `playbooks/anti-automation.md` | OWASP Automated Threats | | 可观测性缺失 | `playbooks/observability-failures.md` | A09:2021 — Logging Failures | | 供应链 | `playbooks/supply-chain.md` | A06:2021 — Vulnerable Components | | CSRF | `playbooks/csrf.md` | A01:2021 — Broken Access Control |
8 份参考文档 | 参考文档 | 路径 | |-----------|------| | 方法论 (PTES/OWASP/NIST) | `references/methodology.md` | | CVE 研究 API | `references/cve-apis.md` | | 工具发现 | `references/tool-discovery.md` | | 工具目录 | `references/tool-catalog.md` | | Kali/Parrot 工具路径 | `references/kali-parrot-paths.md` | | 操作标准 | `references/standards.md` | | 复盘 | `references/retrospective.md` | | 真实场景覆盖率矩阵 | `references/real-world-coverage-matrix-template.yaml` |
2 个模板 | 模板 | 路径 | |----------|------| | 范围界定文档 (YAML) | `templates/scope-template.yaml` | | 渗透测试报告 (Markdown) | `templates/report-template.md` |
## 仓库布局 ``` violin/ ├── .hermes.md # Project-level agent context ├── SOUL.md # Agent identity — senior pentester persona ├── config.yaml # Profile config (toolsets, safety, memory) ├── distribution.yaml # Hermes distribution manifest ├── LICENSE # MIT License ├── README.md # This file ├── assets/ # Brand assets (logo) ├── scripts/ # Guard & smoke tests │ ├── violin_guard.py # Scope, command & release validation │ ├── smoke-test.sh # Kali/Parrot release smoke │ ├── smoke-test.ps1 # Windows supplemental smoke │ └── kali.sh # Docker Kali helper └── skills/pentest/ # Pentest methodology ├── SKILL.md # Orchestrator skill ├── playbooks/ # 31 playbooks ├── references/ # 8 reference documents └── templates/ # 2 templates (scope, report) ``` ## 版本验证 ``` # 运行所有 release 检查 python scripts/violin_guard.py check-release # 或者使用 smoke tests ./scripts/smoke-test.sh --no-install # Linux/macOS .\scripts\smoke-test.ps1 -NoHermes # Windows ``` 守卫检查会验证以下内容:YAML 结构、是否包含全部 31 个 playbook、必要章节是否、无失效的证据路径、所有 Markdown 引用均能正常解析、分发清单涵盖所有所属文件。 ## 可选:Kali Docker 容器
在任意操作系统上一次性配置完整的 Kali 工具链 ``` # 创建 container docker pull kalilinux/kali-rolling docker create -it --name kali-pentest \ -v /path/to/violin/engagements:/engagements \ kalilinux/kali-rolling bash docker start kali-pentest # 安装 tools(约 600 个 packages,5-10 分钟) docker exec kali-pentest apt update docker exec kali-pentest apt install -y kali-linux-headless # 验证 docker exec kali-pentest nmap --version ``` 将 `scripts/kali.sh` 用作简写:可以使用 `kali nmap -sV target.com` 来代替 `docker exec kali-pentest nmap -sV target.com`。
## 可选的 MCP 服务器
使用社区 MCP 服务器增强 Violin | MCP 服务器 | 安装命令 | 用途 | |-----------|---------|---------| | `onlinecybertools-mcp-server` | `npx -y onlinecybertools-mcp-server` | 280+ OSINT/侦察工具 — whois、SSL 检查、JWT 解码、网络诊断、哈希计算 | | `runyourempire/4DA` | `npx -y @runyourempire/4DA` | 实时 CVE 扫描、依赖健康状况、升级规划 | 安装后,将其添加到 `config.yaml` 的 `mcp_servers:` 配置项下。详情请参阅 [Hermes MCP 文档](https://hermes-agent.nousresearch.com/docs/user-guide/features/mcp)。
## 安全 有关报告漏洞的信息,请参阅 [SECURITY.md](SECURITY.md)。 ## 许可证 MIT — 详见 [LICENSE](LICENSE)。
标签:逆向工具