Jcapreol/sentinel

GitHub: Jcapreol/sentinel

一个开源的多智能体 AI SOC 分析师终端工具,将原始安全警报在数十秒内转化为带证据链、置信度和盲区说明的结构化判定。

Stars: 0 | Forks: 0

# SENTINEL [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/6b520358f3111520.svg)](https://github.com/Jcapreol/sentinel/actions/workflows/ci.yml) SENTINEL 是一个开源的、基于 MIT 许可的多智能体 AI SOC 分析师终端工具。它接收原始安全警报、日志行或 IOC,并在 30 秒内生成经过多方印证的结构化判定。 它运行两个独立的分析智能体 —— Watchman(Claude 行为分析)和 Cipher(VirusTotal + AbuseIPDB 威胁情报)—— 并将独立来源的数量映射到人类可读的置信度层级(Investigating / Probable / Confirmed)。 JSON 输出在所有 v1.x 版本中保持稳定,并且可以通过 `jq` 等标准工具直接解析,无需 SENTINEL 专用的库。 ## 演示 针对凭证转储警报的实际运行: ``` $ sentinel "Sysmon Event ID 10: C:\Users\Public\update.exe (unsigned) accessed lsass.exe with GrantedAccess 0x1410 on WORKSTATION-42" [sentinel] Analyzing alert... Verdict: Probable Confidence tier: 2 Watchman findings: - Unsigned/unknown binary executing from Public user directory attempting privileged access - Direct access to lsass.exe process indicates potential credential dumping - GrantedAccess value 0x1410 includes PROCESS_QUERY_INFORMATION and PROCESS_VM_READ permissions commonly used in credential theft - Execution from C:\Users\Public\ directory suggests persistence mechanism or staging location - lsass.exe targeting is characteristic of lateral movement and privilege escalation attacks Named blind spot: - No external IOCs found — verify alert contains an external IP address, domain, or file hash Execution time: 2.57 seconds ``` 两个独立的智能体分析了该警报。Watchman 标记了行为 TTP(lsass 访问 + 来自全局可写目录的未签名二进制文件)。Cipher 没有找到可印证的外部 IOC —— 它会明确告诉你这一点,以便你确切知道下一步该检查什么,而不是静默忽略这一缺失。 ## 安装 ``` git clone https://github.com/Jcapreol/sentinel.git cd sentinel pip install -e . ``` 设置你的 API 密钥: **macOS / Linux:** ``` export ANTHROPIC_API_KEY=your_anthropic_key export VIRUSTOTAL_API_KEY=your_virustotal_key export ABUSEIPDB_API_KEY=your_abuseipdb_key ``` **Windows (PowerShell):** ``` $env:ANTHROPIC_API_KEY="your_anthropic_key" $env:VIRUSTOTAL_API_KEY="your_virustotal_key" $env:ABUSEIPDB_API_KEY="your_abuseipdb_key" ``` 运行: ``` sentinel "Unusual outbound traffic to 185.220.101.45 on port 443 from prod-db-01" ``` 或者通过 stdin 管道传入: ``` echo "Brute force attempt from 185.220.101.45 on SSH" | sentinel ``` ## 示例 JSON 输出 SENTINEL 每次运行都会向 stdout 写入结构化的 JSON。无论处于何种置信度层级或智能体错误状态,所有 8 个字段都会始终存在。 ``` { "verdict": "Probable", "confidence_tier": 2, "methodology": [ {"agent": "watchman", "status": "success", "error": null}, {"agent": "cipher", "status": "success", "error": null} ], "citations": [ { "source": "watchman", "finding": "Suspicious outbound connection to known Tor exit node on non-standard port" }, { "source": "cipher", "finding": "VirusTotal: 185.220.101.45 flagged by 12 engines as malicious, 2 as suspicious" }, { "source": "cipher", "finding": "AbuseIPDB: 185.220.101.45 abuse confidence 97% from 234 reports" } ], "blind_spots": [], "source_independence_confirmed": true, "execution_time_seconds": 4.231, "timestamp": "2026-05-11T18:42:03.456789+00:00" } ``` 通过管道传递给 `jq` 以提取任意字段: ``` sentinel "alert text" | jq '.verdict' sentinel "alert text" | jq '.blind_spots[].reason' ``` ## 置信度层级的工作原理 SENTINEL 统计结构上独立的印证来源 —— 而非原始数据点。Watchman(LLM 行为分析)和 Cipher(社区威胁信誉)属于不同的独立性组别,因此只要两者都成功返回,即可达到层级 2,而不管它们各自返回了多少具体的发现。 | 层级 | 标签 | 来源 | |------|-------|---------| | 1 | Investigating | 0–1 个独立来源返回了数据 | | 2 | Probable | 2 个独立来源相互印证 | | 3 | Confirmed | 3+ 个独立来源相互印证 | 当某个来源无法提供结果时,总是会明确指出该盲区 —— 这样你就能知道置信度的上限,以及需要检查什么来提升它。 ## 数据处理 SENTINEL 不会在分析 API 之外存储或传输你的事件数据。 任何警报内容、IOC 或日志行都不会在任何时候被写入磁盘。唯一的外部传输是发送到 Anthropic API(Watchman 行为分析)和 VirusTotal/AbuseIPDB API(Cipher 威胁情报),这是生成判定所必需的。 ## 连接要求 SENTINEL 需要连接互联网以访问 Anthropic 和 VirusTotal API。v1 版本不支持隔离网络(Air-gapped)环境。 ## 速率限制 **VirusTotal 免费套餐:** 每分钟 4 次请求,每天 500 次请求。 如果 SENTINEL 触及了 VirusTotal 的速率限制,Cipher 将返回一个指定的盲区(`"VirusTotal rate limit reached — reputation data unavailable"`),并且分析会仅使用 Watchman 的结果继续进行。升级到 VirusTotal Premium 可解除此限制。 ## 许可证 MIT —— 详见 [LICENSE](LICENSE)。
标签:AbuseIPDB, AI安全分析师, API安全, Ask搜索, Cloudflare, EDR, IOC分析, JSON输出, lsass访问监控, MITRE ATT&CK, MIT协议, PE 加载器, PyRIT, SecOps, SOC自动化, Sysmon, VirusTotal, 云安全架构, 凭据转储检测, 协议分析, 可信度评估, 多智能体系统, 威胁情报, 安全告警研判, 安全运营, 开发者工具, 开源安全工具, 扫描框架, 攻击溯源, 权限提升, 横向移动检测, 端点安全, 网络安全, 脆弱性评估, 自动化响应, 补丁管理, 证据链, 逆向工具, 逆向工程平台, 隐私保护, 黑盒检测