hifisol/ares-watchtower-public

GitHub: hifisol/ares-watchtower-public

一个聚合 Wazuh、RITA、Zeek 等多源安全数据的轻量级威胁监控仪表板,专为家庭实验室 SOC 环境设计。

Stars: 0 | Forks: 0

# Ares Watchtower **检测工程与威胁狩猎仪表板** Ares Watchtower 是一个移动端自适应的 Web 仪表板,可实时查看家庭实验室 SOC 环境中的安全事件。它将来自多个安全工具(Wazuh SIEM、RITA beacon 检测、Zeek 网络监控以及自定义 CVE 丰富化)的数据聚合到一个统一的深色主题界面中。 作为 Ares 威胁狩猎平台的一部分构建,Watchtower 充当运行在裸机和虚拟化基础设施上的多主机安全实验室的监控前端。 ![Python](https://img.shields.io/badge/Python-3.10+-blue) ![Flask](https://img.shields.io/badge/Flask-3.x-green) ![Bootstrap](https://img.shields.io/badge/Bootstrap-5.3-purple) ![License](https://img.shields.io/badge/License-MIT-yellow) ## 功能特性 - **统一概览** — 摘要卡片、严重性分布环形图、24 小时告警时间线、顶级代理条形图以及跨源活动流 - **CVE 丰富化查看器** — 浏览带有 CVSS/EPSS 评分的 CVE,包含风险细分,可按严重性、代理和关键字过滤,展开详情行可显示 CWE ID、受影响产品和参考链接 - **Wazuh 告警浏览器** — 按最低严重性(0–15 滑块)、代理或文本搜索过滤告警;展开任意行以查看完整日志 - **RITA Beacon 监控** — 按分数显示顶级 Beacon 的水平条形图,采用颜色编码渐变(绿到红);支持基于分数的过滤 - **Zeek 网络日志** — 用于 conn/dns/http/ssl/ssh 日志类型的选项卡界面,支持通过实时 SSH 查询进行 IP 过滤 - **自动刷新** — 概览页面通过 AJAX 每 60 秒更新一次,无需整页重载 - **Token 认证** — 简单的基于 Token 的认证,具有 24 小时 Cookie 持久性 - **移动优先** — 响应式网格布局(1/2/4 列断点)、汉堡导航、触摸友好的 44px 目标区域、水平滚动表格 ## 架构 ``` ┌─────────────────────────────────────────────────────────────┐ │ Ares Watchtower (Flask) │ │ wazuh-host / port 5000 │ ├────────────┬────────────┬───────────────┬───────────────────┤ │ Local I/O │ Local I/O │ SSH → hunter │ SSH → hunter │ │ │ │ │ │ ▼ ▼ ▼ ▼ │ Wazuh CVE RITA Zeek │ alerts.json cve_lookups show-beacons conn/dns/http/ │ .json (CLI) ssl/ssh.log │ └────────────┴────────────┴───────────────┴───────────────────┘ ``` **数据源:** | 来源 | 访问方式 | 缓存 TTL | |--------|--------------|-----------| | Wazuh 告警 | 本地文件 (`/var/ossec/logs/alerts/alerts.json`) | 30s | | CVE 丰富化 | 本地文件 (`/var/log/ares/cve_lookups.json`) | 60s | | RITA Beacon | SSH 到威胁狩猎主机 (`rita show-beacons`) | 5 分钟 | | Zeek 日志 | SSH 到威胁狩猎主机(日志文件解析) | 5 分钟 | ## 截图 *深色主题仪表板,具有海军蓝背景、严重性颜色标记和 Chart.js 可视化。旨在与 Wazuh 和其他 SOC 工具的视觉风格保持一致。* ## 技术栈 - **后端:** Python 3.10+, Flask, Gunicorn - **前端:** Bootstrap 5.3 (dark theme), Chart.js 4, vanilla JavaScript - **数据传输:** 本地文件 I/O + SSH (无参数,基于密钥) - **部署:** systemd 服务,单主机 ## 快速开始 ### 前置条件 - Python 3.10+ 且包含 `python3-venv` - Wazuh manager,且本地可访问 `alerts.json` - 到 Zeek/RITA 主机的基于 SSH 密钥的访问(可选 — beacon/网络页面将为空) - CVE 丰富化管道写入 `/var/log/ares/cve_lookups.json`(可选) ### 安装 ``` # 克隆 git clone https://github.com/your-user/ares-watchtower.git cd ares-watchtower # 创建 venv 并安装依赖 python3 -m venv venv source venv/bin/activate pip install -r requirements.txt # 配置 cp config.yaml.example config.yaml # 编辑 config.yaml — 设置 auth_token、host IPs、SSH key 路径 # 运行 (开发) python app.py ``` ### 生产部署 ``` # 安装 systemd 服务 sudo cp ares-dashboard.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable --now ares-dashboard # 访问 # http://:5000/?token= ``` 首次使用 `?token=` 访问时会设置一个 24 小时的认证 Cookie,因此后续访问无需在 URL 中包含 Token。 ## 配置 有关所有可用选项,请参阅 [`config.yaml.example`](config.yaml.example)。关键设置: | 设置 | 描述 | 默认值 | |---------|-------------|---------| | `dashboard.auth_token` | 认证 Token(必填) | `""` (开放访问) | | `dashboard.port` | 监听端口 | `5000` | | `dashboard.refresh_interval` | 自动刷新间隔(秒) | `60` | | `ssh.key_path` | 用于远程主机的 SSH 私钥路径 | `~/.ssh/id_ed25519` | | `wazuh.alerts_path` | Wazuh 告警 JSON 日志路径 | `/var/ossec/logs/alerts/alerts.json` | ## 项目结构 ``` ares-watchtower/ ├── app.py # Flask application, routes, authentication ├── data_loaders.py # Data source readers with in-memory caching ├── requirements.txt # Python dependencies ├── config.yaml.example # Example configuration (no secrets) ├── ares-dashboard.service # systemd unit file ├── ares/ # Shared Ares library (SSH runner, config loader) │ ├── config.py # YAML config loader with property access │ ├── ssh_runner.py # SSH command execution wrapper │ └── tools/ # Tool modules (Zeek, RITA parsers) ├── static/ │ ├── css/dashboard.css # Dark theme, severity colors, responsive overrides │ └── js/dashboard.js # Auto-refresh, table sort/filter, Chart.js config └── templates/ ├── base.html # Bootstrap 5 skeleton, navbar, footer ├── overview.html # Summary cards, charts, activity feed ├── cve.html # CVE enrichment table with expand/collapse ├── alerts.html # Wazuh alerts with level slider filter ├── beacons.html # RITA beacon scores with bar chart └── network.html # Zeek logs with tab navigation ``` ## API | 端点 | 方法 | 描述 | |----------|--------|-------------| | `/` | GET | 概览仪表板 | | `/cve` | GET | CVE 丰富化浏览器 | | `/alerts` | GET | Wazuh 告警浏览器 (`?min_level=N`) | | `/beacons` | GET | RITA Beacon 监控 | | `/network` | GET | Zeek 日志查看器 (`?log_type=conn&filter_ip=x.x.x.x`) | | `/api/overview` | GET | JSON 摘要统计信息(由自动刷新使用) | | `/health` | GET | 健康检查(无需认证) | ## Ares 平台的一部分 Ares Watchtower 是更广泛的 [Ares](https://github.com/hifisol/ares) 威胁狩猎编排器的监控前端,其中包括: - **[Ares CLI](https://github.com/hifisol/ares)** — LLM 驱动的交互式威胁狩猎,支持工具编排(Wazuh, Zeek, RITA, Velociraptor, 威胁情报 API) - **CVE 丰富化管道** — 自定义 Wazuh 集成,使用 CVSS、EPSS、CWE 和风险评分丰富漏洞告警(包含在 Ares 仓库中) - **知识库 (RAG)** — 用于丰富的 AI 辅助分析的摄取 SOC 参考书籍 ## 许可证 MIT
标签:AMSI绕过, Bootstrap, CVE, Flask, GPT, Homelab, HTTP/HTTPS抓包, Python, RITA, Rootkit, Syscall, Wazuh, Web开发, Zeek, 仪表盘, 信标检测, 威胁检测, 安全仪表盘, 安全运营中心, 家庭实验室, 开源, 态势感知, 数字签名, 无后门, 漏洞管理, 网络安全, 网络映射, 逆向工具, 隐私保护