How melopheelo12/shield works
SHIELD is a honeypot and security-observability dashboard. Attackers reach isolated SSH, HTTP and FTP decoys; captured events are ingested, grouped into sessions, enriched, scored with explainable rules, stored and surfaced through alerts and the dashboard. The dashboard also supports live events, analytics, threat mapping, defense controls, exports and an isolated training sandbox. Several subsystem links below follow the README or source-index references; unsampled implementation details are not asserted.
Main entry points: app.py Collector API · App.tsx Dashboard app · client.ts API client · ssh.py SSH decoy
Components 26
Decoy capture
- SSH decoy
src/shield/decoys/ssh.py - HTTP decoy
src/shield/decoys/http.py - FTP decoy
src/shield/decoys/ftp.py
Event processing
- Event schema
src/shield/common/schema.py - Session tracking
src/shield/collector/ingest/session_tracker.py - Threat enrichment
src/shield/collector/enrichment - Rule scoring
src/shield/collector/defender/engine.py
Persistence and alerts
- Repository interface
src/shield/collector/repositories/base.py - PostgreSQL store
src/shield/collector/repositories/postgres.py - Alert manager
src/shield/collector/alerts/manager.py - Alert channels
src/shield/collector/alerts/channels.py
Collector API
- Collector API
src/shield/collector/api/app.py - Live event stream
src/shield/collector/realtime.py - Training sandbox
src/shield/collector/sandbox.py
Dashboard
- Dashboard app
dashboard/src/App.tsx - Authentication
dashboard/src/api/auth.ts - API client
dashboard/src/api/client.ts - Attack journal
dashboard/src/pages/Attacks.tsx - Analytics overview
dashboard/src/pages/Overview.tsx - Threat map
dashboard/src/pages/ThreatMap.tsx - Defense controls
dashboard/src/pages/Defense.tsx - Sandbox UI
dashboard/src/pages/Sandbox.tsx - Live stream client
dashboard/src/hooks/useWebSocket.ts
Other components
- Internet attackers
- Dashboard operator
- Threat intelligence APIs
Connections 32
- Internet attackers → SSH decoy: probes
- Internet attackers → HTTP decoy: probes
- Internet attackers → FTP decoy: probes
- SSH decoy → Collector API: sends events
- HTTP decoy → Collector API: sends events
- FTP decoy → Collector API: sends events
- Collector API → Event schema: validates events
src/shield/collector/api/app.py - Collector API → Session tracking: groups events
src/shield/collector/api/app.py - Collector API → Threat enrichment: enriches events
src/shield/collector/api/app.py - Collector API → Rule scoring: scores events
src/shield/collector/api/app.py - Collector API → Repository interface: queries and writes
src/shield/collector/api/app.py - Repository interface → PostgreSQL store: implements storage
src/shield/collector/repositories/postgres.py - Collector API → Alert manager: evaluates thresholds
- Alert manager → Alert channels: dispatches notices
src/shield/collector/alerts/service.py - Threat enrichment → Threat intelligence APIs: looks up intelligence
- Collector API → Live event stream: serves live events
src/shield/collector/api/app.py - Collector API → Training sandbox: exposes training
src/shield/collector/api/app.py - Dashboard operator → Dashboard app: uses dashboard
dashboard/src/App.tsx - Dashboard app → Authentication: checks session
dashboard/src/App.tsx - Dashboard app → Attack journal: routes to
dashboard/src/App.tsx - Dashboard app → Analytics overview: routes to
dashboard/src/App.tsx - Dashboard app → Threat map: routes to
dashboard/src/App.tsx - Dashboard app → Defense controls: routes to
dashboard/src/App.tsx - Dashboard app → Sandbox UI: routes to
dashboard/src/App.tsx - Attack journal → API client: requests data
- Analytics overview → API client: requests statistics
- Threat map → API client: requests geography
- Defense controls → API client: uses API
- Sandbox UI → API client: uses API
- API client → Collector API: calls endpoints
- Dashboard app → Live stream client: provides event stream
dashboard/src/App.tsx - Live stream client → Live event stream: opens WebSocket