HipsDestroyerFTW/wolfwatch

GitHub: HipsDestroyerFTW/wolfwatch

一个自托管的AI驱动暗网威胁情报平台,整合多个免费OSINT数据源实现自动化威胁监控与智能分析。

Stars: 0 | Forks: 0

# WolfWatch — 暗网威胁情报平台 AI 驱动的暗网监控平台,持续扫描 13+ 个免费威胁情报源,使用 Claude AI 分析发现结果,并通过实时仪表板呈现可操作的结果。 为 **Wolf Industries** 打造 —— 完全自托管,支持 Docker,零付费依赖(用于 AI 报告的 Anthropic API key 除外)。 ![Python](https://img.shields.io/badge/Python-3.10+-blue) ![FastAPI](https://img.shields.io/badge/FastAPI-0.115-green) ![Docker](https://img.shields.io/badge/Docker-Compose-blue) ![License](https://img.shields.io/badge/License-MIT-yellow) ## 功能特性 - **13+ 免费情报源** — Ahmia (Tor)、AlienVault OTX、crt.sh、urlscan.io、Shodan InternetDB、abuse.ch ThreatFox & URLhaus、GreyNoise、Phishtank、HIBP 等 - **AI 驱动分析** — Claude AI 对威胁进行分类,提取 IOC(电子邮件、IP、凭据),并生成执行威胁报告 - **Tor 代理池** — HAProxy 背后的 3 个 Tor 实例,用于并行 .onion 爬取 - **SpiderFoot OSINT** — 拥有 200+ 模块的 OSINT 自动化平台及独立 Web UI - **SearXNG 元搜索** — 自托管搜索聚合器,覆盖 70+ 引擎,包括暗网索引 - **Redis 缓存** — 用于扫描结果的持久化缓存层 - **自动调度** — APScheduler 每 15 分钟对到期目标运行一次扫描 - **单页仪表板** — 实时威胁可视化,无需构建步骤 - **6 种目标类型** — 域名、电子邮件、IP 地址、关键词、品牌、.onion URL ## 架构 ``` ┌─────────────────────────────────────────────────────────────┐ │ Docker Compose Stack │ │ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ Tor #1 │ │ Tor #2 │ │ Tor #3 │ │ │ └────┬─────┘ └────┬─────┘ └────┬─────┘ │ │ └──────────┬───┴──────────┘ │ │ ┌─────┴─────┐ │ │ │ HAProxy │ :9050 (SOCKS5 load balancer) │ │ └─────┬─────┘ │ │ │ │ │ ┌───────────────┼────────────────────────────────────────┐ │ │ │ WolfWatch App (:8000) │ │ │ │ │ │ │ │ FastAPI ─► Crawler ─► 13+ Sources ─► AI Analyzer │ │ │ │ │ │ │ │ │ │ │ │ ▼ ▼ ▼ ▼ │ │ │ │ SQLite Scheduler Findings Claude API │ │ │ └───────────────┼────────────────────────────────────────┘ │ │ │ │ │ ┌───────┐ ┌───┴───────┐ ┌──────────────┐ │ │ │ Redis │ │ SpiderFoot│ │ SearXNG │ │ │ │ :6379 │ │ :5001 │ │ :8888 │ │ │ └───────┘ └───────────┘ └──────────────┘ │ └─────────────────────────────────────────────────────────────┘ ``` ## 快速开始 ### 选项 1:Docker Compose(推荐) ``` # 克隆 repo git clone https://github.com/HipsDestroyerFTW/wolfwatch.git cd wolfwatch # 配置环境 cp .env.example .env # 编辑 .env 并添加你的 ANTHROPIC_API_KEY # 启动 full stack docker-compose up --build ``` 就这样。打开: - **仪表板**:http://localhost:8000 - **SpiderFoot OSINT**:http://localhost:5001 - **SearXNG 搜索**:http://localhost:8888 - **API 文档**:http://localhost:8000/docs ### 选项 2:本地开发(无 Docker) ``` # Requirements: Python 3.10+, Tor daemon 在端口 9050 (可选) git clone https://github.com/HipsDestroyerFTW/wolfwatch.git cd wolfwatch # Quick start ./run.sh # 或手动操作 pip install -r requirements.txt cp .env.example .env # 编辑 .env 填入你的 ANTHROPIC_API_KEY python3 -m uvicorn backend.main:app --host 0.0.0.0 --port 8000 --reload ``` ## 配置 所有配置均通过 `.env` 文件或环境变量完成。 | 变量 | 必需 | 默认值 | 描述 | |---|---|---|---| | `ANTHROPIC_API_KEY` | 是 | — | 用于 AI 威胁分析的 Claude API key | | `HIBP_API_KEY` | 否 | — | 用于电子邮件泄露检查的 Have I Been Pwned key | | `TOR_PROXY_HOST` | 否 | `127.0.0.1` | Tor SOCKS5 主机(由 Docker 自动设置) | | `TOR_PROXY_PORT` | 否 | `9050` | Tor SOCKS5 端口 | | `COMPANY_NAME` | 否 | `Wolf Industries` | 您的公司名称(用于 AI 分析) | | `COMPANY_DOMAINS` | 否 | `wolfindustries.com` | 逗号分隔的公司域名 | | `DEFAULT_SCAN_INTERVAL_HOURS` | 否 | `6` | 扫描间隔的默认小时数 | | `MAX_CONCURRENT_CRAWLS` | 否 | `3` | 最大并行扫描任务数 | | `GREYNOISE_API_KEY` | 否 | — | 来自 greynoise.io 的免费社区 key | | `PHISHTANK_API_KEY` | 否 | — | 来自 phishtank.org 的免费 key | | `REDIS_URL` | 否 | — | Redis 连接 URL(由 Docker 自动设置) | | `SPIDERFOOT_URL` | 否 | — | SpiderFoot API URL(由 Docker 自动设置) | | `SEARXNG_URL` | 否 | — | SearXNG API URL(由 Docker 自动设置) | ## 数据来源 所有来源均为**免费** —— 无需付费订阅。 | 来源 | 目标类型 | 需要 API Key? | 发现内容 | |---|---|---|---| | **Ahmia (Tor)** | 全部 | 否 | 针对您目标的暗网搜索结果 | | **AlienVault OTX** | 域名, IP, 电子邮件 | 否 | 威胁脉冲、恶意软件、被动 DNS | | **crt.sh** | 域名 | 否 | 证书透明度 —— 揭示子域名 | | **urlscan.io** | 域名, IP, 品牌, 关键词 | 否 | 历史网站扫描和元数据 | | **Shodan InternetDB** | IP | 否 | 开放端口、CVE、主机名 | | **abuse.ch ThreatFox** | 域名, IP | 否 | 恶意软件 IOC 数据库 | | **abuse.ch URLhaus** | 域名, IP | 否 | 已知恶意 URL | | **GreyNoise** | IP | 可选 | IP 噪音/威胁分类 | | **Phishtank** | Onion URL | 可选 | 钓鱼 URL 检测 | | **HIBP** | 电子邮件 | 可选 | 电子邮件泄露和粘贴历史 | | **SearXNG** | 全部 | 自托管 | 跨 70+ 引擎的元搜索 | | **SpiderFoot** | 域名, IP, 电子邮件, 品牌 | 自托管 | 200+ OSINT 模块 | | **Direct Tor Fetch** | Onion URL | 否 | 原始 .onion 页面内容 | ## API 参考 Base URL: `http://localhost:8000/api` ### 目标 | Method | Endpoint | 描述 | |---|---|---| | `GET` | `/api/targets` | 列出所有目标 | | `POST` | `/api/targets` | 创建新目标 | | `GET` | `/api/targets/{id}` | 获取目标详情 | | `PATCH` | `/api/targets/{id}` | 更新目标 | | `DELETE` | `/api/targets/{id}` | 删除目标 | | `POST` | `/api/targets/{id}/toggle` | 激活/停用 | ### 扫描 | Method | Endpoint | 描述 | |---|---|---| | `GET` | `/api/scans` | 列出扫描历史 | | `GET` | `/api/scans/{id}` | 获取扫描详情 | | `POST` | `/api/scans/trigger/{id}` | 手动触发扫描 | ### 发现结果 | Method | Endpoint | 描述 | |---|---|---| | `GET` | `/api/findings` | 列出发现结果(可过滤) | | `GET` | `/api/findings/{id}` | 获取发现详情 | | `PATCH` | `/api/findings/{id}/acknowledge` | 标记为已确认/误报 | | `DELETE` | `/api/findings/{id}` | 删除发现结果 | ### 仪表板 | Method | Endpoint | 描述 | |---|---|---| | `GET` | `/api/dashboard/stats` | 汇总的仪表板 KPI | | `GET` | `/api/dashboard/report/{id}` | AI 生成的威胁报告 | | `GET` | `/api/health` | 健康检查 | ### 创建目标(示例) ``` curl -X POST http://localhost:8000/api/targets \ -H "Content-Type: application/json" \ -d '{ "name": "Company Domain", "target_type": "domain", "value": "example.com", "description": "Monitor our main domain on the dark web", "scan_interval_hours": 6, "tags": ["production", "critical"] }' ``` 目标类型:`domain`、`email`、`ip_address`、`keyword`、`brand`、`onion_url` ## 扩展 ### 添加更多 Tor 实例 编辑 `docker-compose.yml` 以添加更多 Tor 节点: ``` tor-4: image: dperson/torproxy:latest restart: unless-stopped environment: - TZ=UTC ``` 然后将新节点添加到 `infra/haproxy.cfg`: ``` backend tor_pool server tor4 tor-4:9050 check inter 30s fall 3 rise 2 ``` ### GPU 加速 SpiderFoot 如果您有 NVIDIA GPU,请取消注释 `docker-compose.yml` 中的 GPU 部分。 ### 多应用 Worker 在反向代理后运行多个应用实例: ``` app: build: . deploy: replicas: 3 ``` ## 项目结构 ``` wolfwatch/ ├── backend/ │ ├── main.py # FastAPI app entry point │ ├── config.py # Pydantic settings from .env │ ├── database.py # SQLAlchemy engine + session │ ├── models.py # ORM models (Target, Scan, Finding, AlertRule) │ ├── schemas.py # Pydantic request/response schemas │ ├── routers/ │ │ ├── targets.py # Target CRUD endpoints │ │ ├── scans.py # Scan trigger + history │ │ ├── findings.py # Findings query + acknowledge │ │ └── dashboard.py # Stats + AI threat reports │ └── services/ │ ├── crawler.py # 13+ data source orchestrator │ ├── analyzer.py # Claude AI threat analysis │ ├── scan_runner.py # Core scan execution logic │ └── scheduler.py # APScheduler background jobs ├── frontend/ │ └── index.html # Single-page dashboard (no build step) ├── infra/ │ ├── haproxy.cfg # Tor proxy pool load balancer config │ └── searxng-settings.yml # SearXNG meta search engine config ├── docker-compose.yml # Full stack orchestration ├── Dockerfile # Python 3.12 container ├── requirements.txt # Python dependencies ├── run.sh # Local dev launcher ├── .env.example # Environment variable template └── CLAUDE.md # AI coding assistant instructions ``` ## 工作原理 1. 通过仪表板或 **创建目标**(域名、电子邮件、IP 等) 2. **扫描自动运行**每 15 分钟一次,或手动触发 3. **爬虫**并行访问所有适用的免费情报源 4. **Claude AI** 分析每个结果 —— 分类威胁级别、提取 IOC、评估风险 5. **发现结果**显示在仪表板上,威胁级别包括:严重、高危、中危、低危、信息 6. **生成报告** —— 每个目标一键生成 AI 威胁情报报告 7. **风险评分**自动更新:`max(recent) * 0.7 + avg(recent) * 0.3` ## 许可证 MIT License —— 随意使用。 由 **Wolf Industries** 使用 Claude AI 构建。
标签:Atomic Red Team, AV绕过, BeEF, Claude AI, Docker, ESC4, FastAPI, HTTP/HTTPS抓包, IOC提取, OSINT, Python, SearXNG, SpiderFoot, Tor, 人工智能, 代理池, 品牌保护, 威胁情报, 安全仪表盘, 安全防御评估, 实时处理, 密码管理, 开发者工具, 态势感知, 态势感知平台, 搜索引擎查询, 数据泄露检测, 无后门, 暗网监控, 爬虫, 用户模式Hook绕过, 网络安全, 请求拦截, 逆向工具, 隐私保护