mcpField
C
cti-domain-research

cti-domain-research

github.com/security-phoenix-demo安全8147 次安装7 周前更新
代码仓库

关于 cti-domain-research

cti-domain-research 是面向威胁情报研究的技能,可在数百个精选安全域名中按主题和来源等级搜索。它能整理近期结果、提取 IOC、TTP 和 CVE,并可选将发现导入 NotebookLM。

主要功能

  1. 01按查询类型路由安全域名
  2. 02按时效和权威性排序结果
  3. 03提取 IOC、TTP 和 CVE
  4. 04生成表格、长报告或 JSON
  5. 05可选导入 NotebookLM

适用场景

  1. 01研究 CVE 和厂商安全公告
  2. 02跟踪威胁组织或恶意软件
  3. 03获取漏洞利用与安全新闻动态

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/security-phoenix-demo/security-skills-claude-code --skill cti-domain-research

安装后在 Claude Code 中输入/cti-domain-research确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
domains.txt
tier-map.json
scripts/
cti-search.md
install.sh

详细介绍

CTI 领域研究

在 300 多个精选安全域名中结构化搜索威胁情报,并可选择导入 NotebookLM。


自定义

配置以下设置,以个性化 CTI 研究工作流。所有设置均为可选项——此技能可使用合理的默认值运行。

设置说明默认值设置方法
搜索提供商使用哪个搜索 APIBrave Search在 .env 中设置 SEARCH_PROVIDER=brave
Brave API 密钥你的 Brave Search API 密钥—(必需)在 .env 中设置 BRAVE_SEARCH_API_KEY=...
SerpAPI 密钥替代搜索提供商—在 .env 中设置 SERPAPI_KEY=...
Google CSE 密钥 + ID替代搜索提供商—在 .env 中设置 GOOGLE_CSE_KEY=... + GOOGLE_CSE_ID=...
NotebookLM 笔记本 ID--notebooklm 标志的目标笔记本—在 .env 中设置 NOTEBOOKLM_NOTEBOOK_ID=...,或使用 --notebook-id 标志
默认结果数量每个层级的结果数10每次查询使用 --count N 标志
默认时间范围搜索回溯时间90 天每次查询使用 --since DAYS 标志
自定义域名添加你自己的安全信息来源内置 595 个编辑 data/domains.txt 和 data/tier-map.json

设置步骤:

  1. 将 .env.example 复制到插件目录中的 .env
  2. 添加你的搜索 API 密钥(推荐 Brave Search——每月免费请求 2,000 次)
  3. 可选:设置你的 NotebookLM 笔记本 ID
  4. 重启 Claude Code
cd ${CLAUDE_PLUGIN_ROOT}
cp .env.example .env
# Edit .env with your API keys

添加自定义域名:

# Add a domain (one per line)
echo "your-security-blog.com" >> data/domains.txt

# Add tier mapping
# Edit data/tier-map.json and add:
# "your-security-blog.com": { "tier": 3, "authority": 70 }

工作流

1. Parse query + flags
2. Select domain tier(s) based on query type
3. Execute scoped web searches (site: operator per domain batch)
4. Deduplicate + rank results by recency and source authority
5. Extract: title, source, date, summary, key IOCs/TTPs/CVEs mentioned
6. [Optional] Push findings to NotebookLM via connector plugin
7. Return structured CTI brief

查询解析

接受自由文本查询。提取:

  • 主题:CVE ID、攻击者名称、恶意软件家族、技术(MITRE ATT&CK)、产品名称
  • 时间筛选:默认 = 最近 90 天;如果指定了“上周 / 上个月 / 去年”,则遵照执行
  • 深度:默认 = 前 10 条结果;--count N 可覆盖此设置
  • 输出格式:默认 = 简要表格 + 项目符号;--full = 长篇简报;--json = 原始 JSON
  • 推送到 NotebookLM:--notebooklm 标志会触发连接器(见下文 NotebookLM 部分)

域名层级

从 references/domains.txt 加载完整域名列表。按层级路由:

层级使用场景示例
Tier 1 — 权威来源CVE、安全公告、政府警报cisa.gov、nvd.nist.gov、msrc.microsoft.com、access.redhat.com、support.apple.com、cert.europa.eu、ncsc.gov.uk
Tier 2 — 厂商研究深度技术分析unit42.paloaltonetworks.com、blog.talosintelligence.com、securelist.com、research.checkpoint.com、thedfirreport.com、blog.google、mandiant.com、secureworks.com、sentinelone.com、crowdstrike.com
Tier 3 — 新闻 + 社区态势感知bleepingcomputer.com、krebsonsecurity.com、therecord.media、thehackernews.com、arstechnica.com、reddit.com/r/cybersecurity、news.ycombinator.com
Tier 4 — 专业来源恶意软件、PoC、OSINTany.run、otx.alienvault.com、vulncheck.com、attackerkb.com、greynoise.io、hunt.io、packetstormsecurity.com

路由逻辑:

  • CVE 查询 → 优先 Tier 1,然后 Tier 2
  • 威胁行为者 / 恶意软件 → 优先 Tier 2,然后 Tier 4
  • 态势 / 新闻 → 优先 Tier 3,然后 Tier 2
  • PoC / 漏洞利用 → Tier 4 + Tier 2
  • 通用查询 → 所有层级,按权威性评分排序

搜索执行

使用带有 site: 限定的网页搜索工具。按批次处理域名,以最大化每次调用的覆盖范围:

# Example batch query construction
query = f'"{subject}" site:bleepingcomputer.com OR site:krebsonsecurity.com OR site:therecord.media'

# For CVEs, always include NVD and MSRC
query = f'{cve_id} site:nvd.nist.gov OR site:msrc.microsoft.com OR site:cisa.gov'

指定 --full 时,并行执行多次搜索:

  1. Tier 1 批次
  2. Tier 2 批次
  3. Tier 3 + 4 批次

结果架构

为每条结果提取:

{
  "title": "...",
  "source": "domain.com",
  "url": "https://...",
  "published": "YYYY-MM-DD",
  "authority_tier": 1,
  "summary": "1-2 sentence distillation",
  "tags": ["CVE-XXXX", "ransomware", "RCE", "MITRE:T1190"],
  "iocs": ["hash", "IP", "domain"],
  "severity": "Critical|High|Medium|Low|Info"
}

输出格式

默认 — CTI 简报(表格 + 项目符号)
## CTI Brief: <query> — <date>

### Key Findings
- [Critical] <1-line finding> — <source> (<date>)
- [High] ...

### Source Table
| Source | Title | Date | Tags |
|--------|-------|------|------|
| bleepingcomputer.com | ... | ... | ransomware, RCE |

### IOC Summary
IPs: ...  Hashes: ...  Domains: ...

### Next Steps
- Patch priority: ...
- Detection: MITRE T-IDs to hunt
- Intel gaps: ...
--full — 长篇简报

添加:执行摘要、逐来源分析段落、MITRE ATT&CK 映射表、建议的检测规则(Sigma 标头模板)。

--json

返回结果对象组成的原始 JSON 数组(架构见上文)。


NotebookLM 集成

设置 --notebooklm 标志后,使用 NotebookLM 连接器插件摄取发现结果。

插件位置(Claude Code): ~/.claude/plugins/notebooklm-connector/
插件仓库: https://github.com/Security-Phoenix-demo/security-skills-claude-code/tree/main/plugins/notebooklm-connector

连接器流程:
1. Collect all result URLs from the search phase
2. Format as source list per plugin spec
3. Call connector to add sources to target NotebookLM notebook
4. Report: N sources added, notebook URL
插件调用模式(Claude Code):
# Check connector is installed
ls ~/.claude/plugins/notebooklm-connector/

# Call connector with source list
node ~/.claude/plugins/notebooklm-connector/index.js \
  --notebook-id "$NOTEBOOKLM_NOTEBOOK_ID" \
  --sources "$(echo $URLS | jq -R -s 'split("\n")')" \
  --title "CTI: $QUERY — $(date +%Y-%m-%d)"
必需的环境变量:
export NOTEBOOKLM_NOTEBOOK_ID="<your-notebook-id>"
# Or pass via --notebook-id flag at query time
回退方案(Claude.ai — 无插件运行时):

如果在 Claude.ai 中运行(无 bash),请提供格式化的来源列表,供用户手动添加到 NotebookLM;如果已知笔记本 ID,还需提供笔记本的直接链接。


斜杠命令(Claude Code)

创建 ~/.claude/commands/cti-search.md 进行安装:

---
description: "Search 300+ security domains for CTI on any topic, CVE, actor, or malware"
argument-hint: "<query> [--count N] [--full] [--json] [--notebooklm] [--notebook-id ID]"
allowed-tools: WebSearch, Bash
---

Search curated security domains for threat intelligence on: $ARGUMENTS

Follow the CTI Domain Research skill (cti-domain-research) exactly.
Domain list: ~/.claude/commands/cti-domains.txt

Flags:
- --count N        : Return N results (default 10)
- --full           : Long-form brief with MITRE mapping
- --json           : Raw JSON output
- --notebooklm     : Push sources to NotebookLM after search
- --notebook-id ID : Target notebook ID (overrides env var)
- --tier 1|2|3|4   : Restrict to specific domain tier
- --since DAYS     : Limit to last N days (default 90)

安装脚本

运行 scripts/install.sh 以:

  1. 将斜杠命令复制到 ~/.claude/commands/
  2. 将域名列表复制到 ~/.claude/commands/cti-domains.txt
  3. 验证 NotebookLM 连接器插件是否存在
  4. 打印设置确认信息

完整详情请参阅 scripts/install.sh。


错误处理

条件行为
域名批次无结果跳过该层级,尝试下一个;如果所有层级都无结果,则发出警告
未安装 NotebookLM 连接器发出警告 + 回退到手动来源列表
搜索遇到速率限制等待 2s 后重试一次;显示部分结果
查询范围过宽(潜在结果超过 1000 条)自动缩小范围,仅查询第 1 和第 2 层级,并建议细化查询
CVE 尚未收录在 NVD 中注明“CVE 可能尚未收录至 NVD——请直接查看供应商公告”

参考文件

  • references/domains.txt — 完整的精选域名列表(300 多个来源,每行一个)
  • references/tier-map.json — 域名 → 层级 + 权威性评分映射
  • scripts/install.sh — 用于安装 Claude Code 斜杠命令的一键安装程序

评论

支持 Markdown