AlexMatei1/honey-strike
GitHub: AlexMatei1/honey-strike
Stars: 0 | Forks: 0
# 🐝 HoneyStrike
### *A multi-protocol honeypot platform with a learning game on top.*
Capture real attackers across **SSH / HTTP / FTP / RDP / TLS / Telnet / SMTP / Redis**, enrich every session with **geo-IP + abuse reputation + tool fingerprint + MITRE ATT&CK attribution + threat score**, send alerts, render PDF reports, and let your operators **learn to attack and defend by typing real code** — all in one `docker compose up -d`.
[](https://honeystrike.icelegends.cloud)
[](https://github.com/AlexMatei1/honey-strike/actions/workflows/ci.yml)








## Table of contents
- [Why](#why)
- [What's inside](#whats-inside)
- [Live screenshots — the dashboard tour](#live-screenshots--the-dashboard-tour)
- [Architecture](#architecture)
- [Data flow — what happens when an attacker connects](#data-flow--what-happens-when-an-attacker-connects)
- [Tech stack](#tech-stack)
- [Quick start (development)](#quick-start-development)
- [Production deploy](#production-deploy)
- [Project layout](#project-layout)
- [API surface](#api-surface)
- [`honeystrike` CLI](#honeystrike-cli)
- [The learning platform (Phase 7)](#the-learning-platform-phase-7)
- [Multiplayer (Phase 6)](#multiplayer-phase-6)
- [Testing](#testing)
- [Roadmap & phases](#roadmap--phases)
- [Security](#security)
- [Acknowledgements](#acknowledgements)
## Why
Most honeypots stop at "log the bytes." HoneyStrike is built around a different idea: **what you capture is only useful if you can read it, score it, and act on it within seconds.**
So the platform is end-to-end:
1. **Convincing** fake services that respond well enough to make real scanners + brute-force tools commit to a session.
2. **Enrichment pipeline** that turns raw events into ranked, attributed sessions in <2 s.
3. **Operator-grade UI**: live attack map, session detail with replay scrubber, PDF reports, STIX 2.1 / TAXII 2.1 feed for SIEMs.
4. **Game layer**: an operator who has *typed* the Hydra brute-force loop themselves recognises it on the dashboard at a glance.
The result is one repo that works as a production honeypot, a SOC training platform, and a competitive attack/defend game between friends running their own instances.
## What's inside
| ### 🎣 Capture layer - **8 honeypot listeners** (SSH, HTTP, FTP, RDP, TLS-sniffer, Telnet, SMTP, Redis) - Convincing canned responses + **3 CTF-style canary tokens** (fake AWS key, fake /etc/passwd entry, fake admin token) - Per-IP rate limiting; granted-after-N policy on SSH ### 🔬 Intelligence pipeline - **Geo-IP + AbuseIPDB** lookups, cached in Redis - **7 tool-signature rules** (Hydra, sqlmap, Nikto, Masscan, …) - **7 MITRE ATT&CK rules** (T1110.001 / T1110.004 / T1190 / T1083 / T1592 / T1595.001 / T1078) - **Threat-score formula** (abuse 40% + tools 30% + TTPs 50% + privilege bonus) - **ML anomaly score** (Isolation Forest, sklearn) for outlier detection - **STIX 2.1 bundle** + **TAXII 2.1 root** for SIEM ingest ### 📣 Output layer - **Alerts** to Telegram, Slack, email, Discord, structured log - **PDF / HTML reports** per session (WeasyPrint) - **REST API + WebSocket live feed** (`/api/ws/live`) | ### 🖥 Operator dashboard - Live world-map of attacks (Leaflet) with severity-colored markers - Sessions list + filters (service, severity, time) - Per-session detail page with timeline, payload preview, TTPs, alerts - **🎬 Replay theater** — animated playback of a captured session - **📡 War Room** — full-screen takeover view for demos - 👤 **Profile** with rank, XP, **15 badges**, lesson progress, activity log ### 🎮 Learning platform - **5+ typing lessons** that walk you through writing real attack runners or detector rules - Animated **mascot reactions** on every keystroke (correct / wrong / sleep) - Defender lessons run the reference rule against a fixture and **grade your guess** - **Fire-live button**: launch the attack you just typed at your own honeypot - **Command palette (⌘K)** to jump anywhere, fire any scenario, open any session - **Honey-warm + cyber-terminal theme** with a floating dock, honeycomb hex background, live threat-level viewport border ### 🤝 Multiplayer & PvP - **In-app duels** — challenge another member to a timed 1-v-1; attacker fires scenario waves, defender labels each to block it, winner takes XP (`/play/duel`) - **Open PvP arena** — a Lead opens a window; anyone fires, everyone races to label the shared feed; live scoreboard (`/play/arena`) - **Cross-instance lobby** (FastAPI + SQLite) — `honeystrike challenge bob` from one VPS to another; correct labels block the attacker's IP; Discord summary - **Accounts & roles** — self-service sign-up, 🛡 SOC Lead vs 🔍 Analyst, email verification, admin + self-service password reset |
Paramiko · :22"]:::honeypot HTTP["http-honeypot
FastAPI · :80"]:::honeypot FTP["ftp-honeypot
pyftpdlib · :21"]:::honeypot RDP["rdp-honeypot
asyncio · :3389"]:::honeypot TLS["tls-sniffer
JA3 · :443"]:::honeypot end subgraph Stores["internal-net (no egress)"] Redis[("Redis 7
streams + cache + blocklist")]:::store Postgres[("Postgres 16
events · fingerprints
ttp_matches · alerts · reports")]:::store end subgraph Workers["intel-net (egress to enrichment APIs)"] FP["FingerprintWorker
(consumer-group: intel)"]:::worker ALERT["AlertingWorker"]:::worker REPORT["ReportWorker"]:::worker end subgraph APIs["api-net"] API["dashboard-api
FastAPI · :8001"]:::api LOBBY["lobby-api
FastAPI · :8002"]:::api end subgraph EXT["External"] MM["MaxMind GeoLite2"]:::ext AB["AbuseIPDB"]:::ext TG["Telegram / Slack /
Email / Discord"]:::ext DASH["Browser / SIEM"]:::ext end Attacker --> SSH & HTTP & FTP & RDP & TLS SSH -.->|XADD events| Redis HTTP -.-> Redis FTP -.-> Redis RDP -.-> Redis TLS -.-> Redis Redis -->|XREADGROUP intel| FP FP -->|GeoLite2| MM FP -->|abuse score| AB FP -->|fingerprint+ttps| Postgres Postgres --> ALERT ALERT --> TG Postgres --> REPORT REPORT --> Postgres Postgres <--> API Redis <-->|blocklist| API LOBBY <-->|HTTPS| DASH API <-->|HTTPS + WS| DASH API -->|is_blocked?| Redis Redis -.->|drop connection| SSH & HTTP & FTP & RDP & TLS Three Docker networks isolate concerns: | Network | Members | Egress? | |---|---|---| | `honeypot-net` | The 5 listeners + Redis (Redis-only reachable, not its data — XADD only) | ❌ | | `intel-net` | Workers + Redis + Postgres + MaxMind/AbuseIPDB calls | ✅ to those two APIs | | `internal-net` | Postgres + Redis + workers + dashboard-api | ❌ | | `api-net` | dashboard-api, lobby-api, Caddy reverse proxy | ✅ (operators reach in via TLS) | See [`docs/architecture.md`](docs/architecture.md) for full Mermaid diagrams (component / sequence / network-isolation) and [`docs/11_Infrastructure_Topology.md`](docs/11_Infrastructure_Topology.md) for the prose version. ## Data flow — what happens when an attacker connects attacker listener Redis FingerprintWorker Postgres AlertingWorker │ │ │ │ │ │ 1. TCP connect ───────────► │ │ │ │ │ │ is_blocked(ip)? ─►│ │ │ │ │ ◄── 0 (proceed) ── │ │ │ │ │ SESSION_OPEN event ─► XADD │ │ │ 2. SSH brute-force loop ───► │ │ │ │ │ │ 7× SSH_AUTH_ATTEMPT ─► XADD │ │ │ │ │ ── XREADGROUP ──────►│ │ │ │ │ │ + GeoLite2 lookup │ │ │ │ │ + AbuseIPDB call │ │ │ │ │ + 7 tool sigs │ │ │ │ │ + 7 MITRE rules │ │ │ │ │ + threat score │ │ │ │ │ INSERT fingerprint ──►│ │ │ │ │ INSERT ttp_matches ──►│ │ │ SSH_COMMAND (whoami)─► XADD │ │ │ │ │ │ │ trigger alert? │ │ │ │ │ ──── poll ────────────►│ │ │ │ │ │ │ SESSION_CLOSE │ │ │ │ POST Telegram/Slack │ │ │ │ │ POST Discord webhook │ │ │ │ ◄── dispatch_alert ────│ browser /api/ws/live ◄────┴─────────────────────┴─── new session msg ───┴────────────────────────┘ │ │ defender clicks 🚫 Block on /sessions/
| Layer | Stack |
|---|---|
| Honeypot listeners | Python 3.13 · asyncio · Paramiko (SSH) · FastAPI (HTTP) · pyftpdlib (FTP) · raw asyncio (RDP TPKT/X.224) · custom TLS sniffer (JA3) |
| Workers | Python 3.13 · Redis-streams consumer groups · scikit-learn (Isolation Forest) · WeasyPrint (PDF) · structlog · prometheus-client |
| Persistence | PostgreSQL 16 (TIMESTAMPTZ, JSONB, inet) · Redis 7 (streams + cache + blocklist) · SQLite (lobby only, per-instance) |
| API + UI | FastAPI (async, OpenAPI 3.1) · SQLAlchemy 2.0 async · Pydantic v2 · WebSocket · Jinja2 templates · vanilla JS · Leaflet map · Chart.js · Google Fonts (Space Grotesk + Inter + JetBrains Mono) |
| Intelligence | MaxMind GeoLite2 · AbuseIPDB · MITRE ATT&CK v15 STIX 2.1 bundle · JA3 client-hello fingerprinting · custom tool-signature rule engine |
| Output | STIX 2.1 bundles + TAXII 2.1 collections · Telegram / Slack / Discord / SMTP alert channels · PDF + HTML reports |
| CLI | Typer + Rich · single `honeystrike` entrypoint with `attack`, `defend`, `lobby`, `login` subapps |
| Infra | Docker Compose v2 · Caddy reverse proxy w/ ACME · Alembic migrations · GitHub Actions CI (quality + unit + integration + migrations + dep-audit + container-scan) |
| Observability | structlog JSON logs · Prometheus metrics endpoint · pre-built Grafana dashboard JSON |
**Made for SOC training, CTFs, friendly competition, and catching the real thing.**
`docker compose up -d` and open `http://localhost:8001/login`.