straightchlorine/honeywatch

GitHub: straightchlorine/honeywatch

一个基于 Cowrie 的 SSH 蜜罐监控系统,提供实时攻击可视化、威胁情报分析和公共只读 API。

Stars: 12 | Forks: 0

# Honeywatch 带有攻击可视化和威胁分析功能的 SSH honeypot。 | | 健康状态 | 正常运行时间 (24小时) | |-----------|:------:|:------------:| | Dashboard | [![](https://status.codextechnologies.org/api/v1/endpoints/external_honeywatch-dashboard/health/badge.svg)](https://status.codextechnologies.org/endpoints/external_honeywatch-dashboard) | [![](https://status.codextechnologies.org/api/v1/endpoints/external_honeywatch-dashboard/uptimes/24h/badge.svg)](https://status.codextechnologies.org/endpoints/external_honeywatch-dashboard) | | API | [![](https://status.codextechnologies.org/api/v1/endpoints/external_honeywatch-api/health/badge.svg)](https://status.codextechnologies.org/endpoints/external_honeywatch-api) | [![](https://status.codextechnologies.org/api/v1/endpoints/external_honeywatch-api/uptimes/24h/badge.svg)](https://status.codextechnologies.org/endpoints/external_honeywatch-api) | ## 架构 ``` graph LR subgraph honeypot["Honeypot VPS"] Cowrie[Cowrie SSH :22] -.->|HTTP only| Egress[egress-proxy] Cowrie -->|JSON logs| Ingestor Ingestor -->|INSERT as honeywatch_ingestor| PG[(Postgres)] API[Flask API] -->|SELECT as honeywatch_api| PG Grafana --> PG Nginx[nginx
binds TS_IP only] --> API Nginx --> Grafana end subgraph k3s["Hetzner k3s (ArgoCD managed)"] Traefik[Traefik + cert-manager] --> Dashboard[Dashboard SPA] Traefik -->|/api/*| TSE[ts-egress sidecar] end Net((Internet)) -->|HTTPS
honey.piotrkrzysztof.dev| Traefik TSE -.->|Tailnet| Nginx ``` honeypot VPS 运行着 Cowrie、ingestor、Postgres、Flask API、Grafana, 以及一个仅绑定到 Headscale tailnet 接口的内部 nginx。 Cowrie 没有直接的互联网出口;出站流量被强制通过 一个 tinyproxy sidecar(`egress-proxy`)。 Dashboard 通过 tailnet 上的 Tailscale egress pod 将 `/api/*` 路由到 honeypot 的 nginx。所有的 k8s 清单,包括 ArgoCD 的 `Application`, 都位于 `k8s/` 中。 ## 主要功能 - 运行 Cowrie SSH honeypot,捕获暴力破解尝试 - 捕获 SSH 客户端情报:客户端 HASSH、提供的公钥指纹,以及 direct-tcpip(端口转发/中继)尝试,用于聚类和威胁分析 - 将 Cowrie 的 JSON 事件日志提取到 PostgreSQL 中 - 分析捕获的凭据:热门用户名/密码对、分布式僵尸网络 IP 扇出、密码长度/字符集组成,以及 Cowrie 接受率 - 提供 Vue 3 Dashboard - 暴露公共只读 REST API(Flask + flask-smorest,OpenAPI 3.1) - 接入 Grafana 作为 Postgres 查询 UI,用于临时探索和指标分析 ## 本地运行 前置条件:Docker、[just](https://github.com/casey/just)、[uv](https://docs.astral.sh/uv/)、pnpm 10.x。 ``` cp .env.example .env just dev # bring up the full stack (build + detached) just logs # tail logs; `just logs api ingestor` to filter just attack # SSH into cowrie on :2222 to generate events just down # stop the stack ``` ### Dashboard 开发 ``` just dev-dashboard # Vite dev server on http://localhost:5173 just test-dashboard-unit # vitest run just test-dashboard-e2e # playwright (preview server on :4173, axe smoke) just openapi-regen # regenerate api/openapi.json + dashboard TS SDK ``` 有关完整的命令列表,请参阅 `justfile`。 ## URL - Dashboard:http://localhost:8080 - API:http://localhost:5000(文档位于 `/api/v1/swagger` 和 `/api/v1/redoc`) - Grafana:http://localhost:3000 ## 致谢 本产品包含由 MaxMind 创建的 GeoLite 数据,可从 https://www.maxmind.com 获取。
标签:ADCS攻击, Docker, Grafana, SSH安全, 威胁分析, 安全防御评估, 测试用例, 网络测绘, 自动化侦查工具, 蜜罐, 证书利用, 请求拦截, 逆向工具