vcnngr/spectra-method
GitHub: vcnngr/spectra-method
SPECTRA 是一个多智能体网络安全框架,通过红蓝对抗、事件响应和GRC评估来增强安全运营效率。
Stars: 0 | Forks: 0
S P E C T R A
Security Protocol Engineering for Cyber Threat Response & Assessment
"攻击。防御。进化。"
28个AI智能体。22个结构化工作流。80,000+行操作安全知识。
一个完整的网络安全团队——即刻可在你的AI IDE中使用。
## 什么是 SPECTRA?
SPECTRA 是一个**面向网络安全运营的多智能体操作系统**。它不是聊天机器人,也不是现有工具的封装。它是由专业人才组成的完整团队——每个成员都有自己的身份、专长和观点。
当**Viper**(红队负责人)和**Commander**(安全运营中心经理)审视同一个目标时,他们看到的是不同的东西。将他们一起放入**作战室**,他们会产生*碰撞*——从而产生任何一方都无法单独获得的洞见。
```
npx spectra-method install --tools claude-code,codex -y
```
## 模块
| 模块 | | 智能体 | 工作流 | 关注点 |
|--------|---|--------|-----------|-------|
| **RTK** | :red_circle: | 7 | 6 | 红队 — 侦察、漏洞利用、应用安全/API、横向移动、数据窃取 |
| **SOC** | :large_blue_circle: | 8 | 6 | 安全运营 — 分诊、威胁狩猎、遥测、身份、检测工程 |
| **IRT** | :orange_circle: | 6 | 5 | 事件响应 — 取证、恶意软件分析、云安全、威胁情报 |
| **GRC** | :white_circle: | 4 | 4 | 治理、风险与合规 — 风险、审计、政策、隐私 |
| **Core** | :zap: | 3 | 11 项技能 | 参与框架、作战室、报告、对决裁决 |
## 快速开始
```
# Full install
npx spectra-method install \
--tools claude-code,codex \
--user-name "YourName" \
--communication-language "English" \
-y
# Then in Claude Code:
/spectra-help # See what's available
/spectra-new-engagement # Create a scoped engagement
/spectra-agent-red-lead # Talk to Viper
/spectra-war-room # Launch Red vs Blue debate
# In Codex:
# Ask Codex to use spectra-help, spectra-new-engagement, spectra-agent-red-lead,
# or spectra-war-room. The installer writes AGENTS.md plus .codex/spectra/.
npx spectra-method party plan --topic "lateral movement detection gap review"
```
## 智能体
### Core :zap:
| 智能体 | 角色 | 专长 |
|-------|---------|-----------|
| **Specter** | 首席信息安全官 | 跨领域监督,战略协调 |
| **Chronicle** | 文档专家 | 为所有模块编写包含完整上下文的报告 |
| **Referee** | 对决裁判 | 红队/蓝队记录关联、评分、公平性审查 |
### RTK :red_circle: 红队工具包
| 智能体 | 角色 | 专长 |
|-------|---------|-----------|
| **Viper** | 红队负责人 | 攻击策略,参与规划 |
| **Ghost** | 侦察专家 | 开源情报,被动/主动侦察 |
| **Razor** | 漏洞利用开发者 | 漏洞研究,漏洞利用链 |
| **Phantom** | 攻击操作员 | 后渗透、横向移动、规避 |
| **Mirage** | 社会工程师 | 钓鱼攻击、借口攻击、安全意识测试 |
| **Blade** | 快速渗透测试员 | 快速漏洞评估 |
| **Forge** | 应用安全/API专家 | 应用安全、API安全、授权、业务逻辑 |
### SOC :large_blue_circle: 安全运营
| 智能体 | 角色 | 专长 |
|-------|---------|-----------|
| **Commander** | 安全运营中心经理 | 运营、指标、升级管理 |
| **Watchdog** | L1 分析师 | 告警分类、指标富化 |
| **Tracker** | L2 调查员 | 事件关联、钓鱼响应 |
| **Hawk** | L3 威胁猎手 | 假设驱动型狩猎,ATT&CK 映射 |
| **Sentinel** | 检测工程师 | Sigma/YARA/Suricata 规则编写 |
| **Shield** | 快速安全运营中心分析师 | 快速分诊和调查 |
| **Keystone** | 身份安全专家 | AD、Entra ID、Okta、IAM、OAuth、权限分析 |
| **Signal** | 遥测工程师 | 日志源覆盖、解析、SIEM 管道就绪度 |
### IRT :orange_circle: 事件响应
| 智能体 | 角色 | 专长 |
|-------|---------|-----------|
| **Dispatch** | 事件处理员 | NIST 800-61 生命周期协调 |
| **Trace** | 取证分析师 | 磁盘/内存/网络/云取证 |
| **Scalpel** | 恶意软件分析师 | 静态/动态分析、逆向工程 |
| **Oracle** | 威胁情报分析师 | 钻石模型、归因、STIX 2.1 |
| **Surge** | 快速响应者 | 紧急分诊和遏制 |
| **Stratus** | 云安全专家 | AWS/Azure/GCP、Kubernetes、SaaS 日志、云取证 |
### GRC :white_circle: 治理、风险与合规
| 智能体 | 角色 | 专长 |
|-------|---------|-----------|
| **Arbiter** | 风险分析师 | NIST 800-30、FAIR、风险量化 |
| **Auditor** | 合规审计师 | ISO 27001、SOC 2、PCI DSS、HIPAA、GDPR |
| **Scribe** | 政策作者 | 政策生命周期、RFC 2119 |
| **Counsel** | 隐私/泄露治理专家 | 隐私影响、泄露治理、法律保留 |
## 工作流
### RTK :red_circle: 杀伤链与应用安全(57步)
| 工作流 | 步骤 | 覆盖范围 |
|----------|-------|----------|
| `spectra-external-recon` | 10 | 开源情报、DNS、WHOIS、Shodan、端口扫描 |
| `spectra-initial-access` | 10 | 钓鱼、漏洞利用、凭据攻击 |
| `spectra-privesc` | 10 | Windows/Linux/AD/云提权 |
| `spectra-lateral-movement` | 10 | PsExec、WMI、Kerberos、云枢轴 |
| `spectra-exfiltration` | 10 | HTTP、DNS隧道、隐写术、DLP规避 |
| `spectra-appsec-assessment` | 7 | 应用/API认证、授权、业务逻辑、修复证据 |
### SOC :large_blue_circle: 检测与响应(44步)
| 工作流 | 步骤 | 覆盖范围 |
|----------|-------|----------|
| `spectra-alert-triage` | 7 | 分类、调查、紫队桥梁 |
| `spectra-detection-lifecycle` | 7 | ATT&CK 映射、Sigma/YARA 编写 |
| `spectra-phishing-response` | 8 | 头信息/载荷分析、指标提取 |
| `spectra-threat-hunt` | 8 | 假设驱动型狩猎、发现验证 |
| `spectra-identity-detection-review` | 7 | AD、Entra ID、Okta、IAM、OAuth、会话和权限路径覆盖 |
| `spectra-telemetry-readiness` | 7 | 日志源覆盖、解析质量、保留策略、蓝队实时就绪度 |
### IRT :orange_circle: 调查(45步)
| 工作流 | 步骤 | 覆盖范围 |
|----------|-------|----------|
| `spectra-incident-handling` | 10 | NIST 800-61 完整生命周期 |
| `spectra-digital-forensics` | 10 | 磁盘、内存、网络、云取证 |
| `spectra-malware-analysis` | 10 | 静态、动态、沙箱、逆向工程 |
| `spectra-threat-intel-workflow` | 8 | 钻石模型、ATT&CK、STIX 2.1 |
| `spectra-cloud-incident-response` | 7 | 云事件分诊、爆炸半径、证据、遏制规划 |
### GRC :white_circle: 治理(28步)
| 工作流 | 步骤 | 覆盖范围 |
|----------|-------|----------|
| `spectra-risk-assessment` | 7 | NIST 800-30/FAIR、皇冠明珠分析 |
| `spectra-compliance-audit` | 7 | 8个框架、差距分析、修复 |
| `spectra-policy-lifecycle` | 7 | 起草、审查、执行、例外管理 |
| `spectra-privacy-breach-assessment` | 7 | 数据泄露、法律保留、通知时钟、治理决策 |
### Core :zap: 编排(7步)
| 工作流 | 步骤 | 覆盖范围 |
|----------|-------|----------|
| `spectra-duel-adjudication` | 7 | 红队/蓝队记录关联、评分、公平性、证据质量 |
## 框架数据
| 框架 | 内容 |
|-----------|---------|
| MITRE ATT&CK | 98 个技术,14 个战术 |
| NIST 800-53 Rev 5 | 54 个控制项,20 个控制族 |
| Sigma 规则 | 35 个检测模板 |
| OWASP Top 10 | 2021 版本 |
| CIS Controls v8 | 18 个控制项,72 项保障措施 |
| 交叉映射 | 40 个 ATT&CK 到 NIST 映射 |
## 命令行界面
```
npx spectra-method install [options]
-d, --directory
Target directory (default: ".")
-m, --modules Module IDs: rtk,soc,irt,grc
--tools IDEs: claude-code, codex (default: claude-code)
--user-name Name for agents
--communication-language Agent language (default: English)
--document-output-language Document language (default: English)
--output-folder Output folder (default: _spectra-output)
--lazy Install core only; add modules later
-y, --yes Accept all defaults
-f, --force Force reinstall
npx spectra-method validate Verify installation
npx spectra-method status Show version and modules
npx spectra-method update Update (preserves configs)
npx spectra-method modules list Show installed/available modules
npx spectra-method modules add rtk Add modules after a lazy install
npx spectra-method engagement validate -e engagement.yaml
npx spectra-method engagement gate -e engagement.yaml -w spectra-external-recon --target-name example.com
npx spectra-method engagement transition -e engagement.yaml -w spectra-external-recon --to in-progress
npx spectra-method report generate -e engagement.yaml --type pentest
npx spectra-method party plan --topic "lateral movement detection gap review" --mode adversarial
npx spectra-method party plan --topic "distributed duel readiness" --mode purple --lanes red,blue,irt,grc,core
npx spectra-method duel init --session ENG-2026-001 --role red
npx spectra-method duel score --session ENG-2026-001
npx spectra-method blue ingest --session ENG-2026-001 --source auth=/var/log/auth.log
npx spectra-method blue tail --session ENG-2026-001 --source auth=/var/log/auth.log --once
npx spectra-method broker export --session ENG-2026-001 --role red --bundle red-bundle.json
npx spectra-method broker import --session ENG-2026-001 --role red --bundle red-bundle.json
```
派对模式为红队、蓝队、事件响应、治理风险与合规、协调员和文书等通道生成确定性子智能体计划。该计划包括输入契约、输出契约、完成标准、模型配置文件类别、质量门、安全门、生成清单、合并契约和辩论回合。它是计划优先的:红队工具包执行仍然需要在任何攻击性工作流操作之前进行参与状态和范围检查。
对决模式将红队、蓝队和裁判视图分开,用于跨不同机器运行的演习。红队和蓝队各自在本地编写角色特定的JSONL记录;裁判计分卡将红队行动与蓝队检测或缓解措施相关联。红队操作安全性被建模为噪声和足迹约束,而日志删除、审计篡改、破坏性清理和禁用安全工具等行为被策略阻止。
蓝队实时适配器将防御性遥测数据只读摄取到蓝队记录中。支持的源类型包括:`auth`、`nginx_access`、`nginx_error`、`postfix`、`dovecot`、`fail2ban`、`suricata_eve`、`wazuh`、`zeek_conn`、`zeek_dns` 和 `zeek_http`。`blue tail --once` 仅读取自存储检查点以来的新字节,因此重复运行不会重复旧检测。部分尾随日志行将被保留,直到出现换行符,这可以防止截断的检测。
红队/蓝队代理支持分离的机器,无需共享文件系统访问。各方从其本地记录中导出签名的JSON包;裁判导入红队和蓝队的包,对事件进行去重,然后运行 `duel score`。导入过程会验证包校验和、事件数量、角色/会话、包模式和事件模式,然后仅保留已知事件字段。代理是离线且基于文件的:它不会打开套接字、部署智能体或修改远程主机。
开发背景:
- [红蓝队起源](docs/development/red-blue-team-origin.md)
- [分布式红蓝对决](docs/development/distributed-red-blue-duel.md)
## 架构
```
project/
├── .claude/skills/ 60 skills as Claude Code slash commands
├── .codex/spectra/ Codex skill index and routing instructions
├── AGENTS.md Codex repo-native SPECTRA adapter block
├── _spectra/ Framework: agents, workflows, configs
│ ├── core/ Engagement framework, skills, scripts
│ ├── rtk/ Red Team Kit
│ ├── soc/ Security Operations
│ ├── irt/ Incident Response
│ ├── grc/ Governance, Risk & Compliance
│ └── _config/ Manifests
└── _spectra-output/ Engagement artifacts
├── engagements/
├── reports/
└── evidence/
```
**智能体自治协议**:仅硬性阻止破坏性载荷(勒索软件、数据擦除器)。其他所有情况:警告 + 服从。由操作员决定。
## 要求
- **AI IDE**:Claude Code、Codex、Cursor 或兼容环境
- **Python**:3.10+
- **Node.js**:18+
## 许可证
MIT
为操作员而生。由操作员打造。
标签:AI-IDE集成, AI智能体, AMSI绕过, DAST, meg, MITM代理, PyRIT, 信息安全, 反取证, 合规管理, 多智能体系统, 威胁响应评估, 威胁情报, 威胁检测, 安全协议工程, 安全工作流, 安全操作, 安全评估, 安全运营中心, 开发者工具, 恶意软件分析, 操作安全, 数据展示, 治理、风险与合规, 管理员页面发现, 红队, 网络威胁响应, 网络安全, 网络映射, 评分系统, 逆向工具, 隐私保护