- Executive Summary
- Core Capabilities & Features
- System Architecture
- Technology Stack
- Directory Structure & Module Breakdown
- Prerequisites & System Requirements
- Installation & Setup Guide
- Configuration & Environment Variables
- Database Schema & Models
- RESTful API Documentation
- Machine Learning & Deep Learning
- Automated Investigations & Threat Hunting
- Advanced Analytics & BI
- Deception Environment & Shadow Nodes
- Alerting & Notification System
- Frontend Architecture & Components
- Deployment Guide (Render, Docker, AWS)
- Security & Compliance
- Troubleshooting & FAQ
- Contributing
- License
HoneyCloud is a state-of-the-art, production-ready honeypot orchestration and Security Operations Center (SOC) intelligence platform. Designed to seamlessly mimic vulnerable enterprise infrastructure, HoneyCloud attracts malicious actors, traps them in heavily monitored deception environments, and leverages advanced Machine Learning (ML) algorithms to classify their behavior in real-time.
By acting as a decoy, HoneyCloud shifts the asymmetrical advantage back to the defenders. It safely logs zero-day exploits, brute-force attempts, unauthorized access, and malicious payloads without exposing the actual production network.
- Proactive Defense: Don't wait for attackers to hit your real servers. Lure them into HoneyCloud.
- High-Fidelity Intelligence: Every alert generated by HoneyCloud is a guaranteed threat, eliminating alert fatigue.
- Automated Threat Modeling: Real-time ML models map attacks to the MITRE ATT&CK framework automatically.
- Enterprise Reporting: Generate beautiful, SOC-compliant PDF, CSV, and Excel reports instantly.
- Shadow Nodes: Deploy lightweight, high-interaction decoy nodes across multiple geographic regions.
- Protocol Emulation: Emulate SSH, FTP, HTTP, HTTPS, MySQL, Redis, and custom proprietary protocols.
- Vulnerability Simulation: Purposefully expose mock vulnerabilities (e.g., Log4j, outdated Apache) to attract specific threat actors.
- Behavioral ML Engine: Uses Random Forest and Isolation Forest to classify attacks as
benign,anomaly, ormalicious. - Deep Learning Engine: Advanced neural network architectures for robust threat detection and anomaly classification.
- Dynamic Risk Scoring: Calculates threat severity (0-100) based on payload toxicity, IP reputation, and attack velocity.
- Automated Labeling: Automatically labels incoming payloads using Natural Language Processing (NLP) techniques.
- Real-Time Telemetry: Live WebSockets stream attack data directly to a React-based interactive dashboard.
- Global Threat Map: Visualize the geographical origin of attacks using integrated GeoIP databases.
- Attack Timelines & Investigations: Scroll through chronological timelines of attacker movements and perform deep automated investigations.
- Advanced Metrics: Extensive data modeling, trend analysis, and database optimization for rapid querying.
- Subscription Management: Full support for multi-tenant SaaS platforms with automated billing and subscription tiers.
- Production Optimized: Advanced deployment optimizers and database partitioning for high availability.
- Telegram Bot Integration: Receive instant push notifications to your mobile device for
HIGHandCRITICALalerts. - Email Dispatcher: Automated email alerts powered by Resend API.
- Custom Webhooks: Forward events to Splunk, Datadog, or your internal SIEM.
- PDF Generation: Create visually stunning, SOC-ready PDF incident reports utilizing ReportLab.
- Excel & CSV Exports: Download raw data for data science and offline analysis.
- Recycle Bin Management: Safely soft-delete and manage historical event logs without breaking audit trails.
HoneyCloud is built on a modern, decoupled microservices architecture.
- Attacker probes the exposed IP address.
- Deception Routers (Shadow Nodes) intercept the traffic.
- Traffic is forwarded to the FastAPI Backend.
- The ML Engine analyzes the payload and assigns a Threat Score.
- The Database (SQLite/PostgreSQL) stores the immutable attack log.
- The Alert System triggers Telegram/Email notifications.
- The React Frontend pulls the data for SOC analysts.
[ Attacker ]
|
v
[ Reverse Proxy / Load Balancer ]
|
+---> [ Shadow Node (SSH Decoy) ]
|
+---> [ Shadow Node (HTTP Decoy) ]
|
v
[ FastAPI Backend (Core API) ] <---> [ ML Threat Engine (Scikit-Learn) ]
|
+---> [ Database (SQLite/PG) ]
|
+---> [ Notification Service (Telegram/Email) ]
|
v
[ React SOC Dashboard ]
- Framework: React 18
- Build Tool: Vite
- Styling: Tailwind CSS (Vanilla CSS fallbacks available)
- Icons: Lucide React
- Routing: React Router DOM
- Charts: Recharts
- Framework: FastAPI (Python 3.10+)
- Server: Uvicorn / Gunicorn
- Database ORM: SQLAlchemy
- Authentication: JWT (JSON Web Tokens)
- Machine Learning: Scikit-Learn, Pandas, NumPy
- Report Generation: ReportLab (PDF), OpenPyXL (Excel)
- Background Tasks: Celery / Asyncio
- Geolocation: GeoIP2
The repository is divided into two primary directories: backend and frontend.
HoneyCloud-X/
βββ backend/
β βββ app/
β β βββ api/ # API Routing & Controllers
β β β βββ routes/
β β β β βββ alerts.py # Alert configuration endpoints
β β β β βββ auth.py # Login, JWT, User Management
β β β β βββ enhancements.py # SaaS and advanced analytics features
β β β β βββ events.py # Attack event ingestion
β β β β βββ health.py # Infrastructure health checks
β β β β βββ investigation.py # Attack investigations
β β β β βββ ml.py # ML engine operations
β β β β βββ recycle_bin.py # Event soft delete management
β β β β βββ reports.py # PDF/Excel/CSV Generation
β β β β βββ shadow_nodes.py # Deception nodes management
β β β β βββ telegram.py # Telegram Bot integration
β β βββ core/ # Core configuration and security
β β βββ deception_engine/ # Threat deception processing
β β βββ deception_env/ # Emulated vulnerability environments
β β βββ investigation_engine/ # Automated event investigations
β β βββ services/ # Business logic
β β βββ tasks/ # Background workers (Celery/Async)
β β βββ advanced_analytics.py # Advanced metrics and statistics
β β βββ advanced_security.py # Security hardening
β β βββ alert_system.py # Event-driven alert dispatcher
β β βββ database_optimizer.py # Database performance tuning
β β βββ deep_learning_engine.py # Advanced AI/ML threat detection
β β βββ init_saas.py # SaaS environment initialization
β β βββ main.py # FastAPI Application Factory
β β βββ ml_engine.py # Core Machine Learning pipeline
β β βββ models.py # SQLAlchemy Database Models
β β βββ production_optimizer.py # Production deployment optimizers
β β βββ saas_api.py # SaaS subscription logic
β β βββ schemas.py # Pydantic Validation Schemas
β β βββ stream_processor.py # Real-time event streaming
β β βββ subscription_manager.py # Tenant management
β β βββ threat_intelligence.py # Threat enrichment
β βββ requirements.txt # Python dependencies
β βββ honeycloud.db # SQLite Database (Auto-generated)
β
βββ frontend/
β βββ src/
β β βββ components/ # Reusable React UI Components
β β β βββ Navbar.jsx
β β β βββ ParticlesBackground.jsx
β β β βββ Sidebar.jsx
β β βββ pages/ # Main Route Views
β β β βββ AttackDetails.jsx # Granular attack data
β β β βββ Dashboard.jsx # Primary SOC View
β β β βββ Investigations.jsx # Investigation tracking
β β β βββ Login.jsx # Authentication Portal
β β β βββ RecycleBin.jsx # Deleted events manager
β β β βββ Reports.jsx # Report Generation UI
β β β βββ Settings.jsx # System Configuration
β β βββ context/ # React Context Providers
β β βββ App.jsx # Root React Component
β β βββ main.jsx # React DOM Entry
β βββ package.json # Node dependencies
β βββ tailwind.config.js # Tailwind configuration
β βββ vite.config.js # Vite configuration
To run HoneyCloud successfully, ensure your environment meets the following specifications:
- CPU: 2 Cores (4+ recommended for ML processing)
- RAM: 2 GB (4 GB recommended)
- Storage: 10 GB SSD
- OS: Linux (Ubuntu/Debian preferred), macOS, or Windows 10/11
- Python: Python 3.9, 3.10, or 3.11
- Node.js: Node 18.x or higher
- Package Managers:
pipandnpm
git clone https://github.com/YourOrg/HoneyCloud-X.git
cd HoneyCloud-X- Navigate to the backend directory:
cd backend - Create and activate a Python Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\ScriptsοΏ½ctivate
- Install Python dependencies:
(Note: For Render/Cloud deployment, heavy ML libraries like TensorFlow are excluded by default to prevent OOM errors).
pip install -r requirements.txt
- Start the FastAPI Server:
python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
- Open a new terminal and navigate to the frontend directory:
cd frontend - Install Node dependencies:
npm install
- Start the Vite Development Server:
npm run dev
- Access the SOC Dashboard at
http://localhost:5173.
HoneyCloud uses .env files for secure configuration. Create a .env file in the backend/ directory.
| Variable | Type | Default | Description |
|---|---|---|---|
APP_NAME |
String | HoneyCloud |
Name of the application |
DEBUG |
Boolean | False |
Enable detailed traceback logs |
DATABASE_URL |
String | sqlite:///./honeycloud.db |
Connection string for SQLAlchemy |
JWT_SECRET_KEY |
String | changeme |
256-bit secret for JWT signing |
JWT_EXPIRE_MINUTES |
Integer | 60 |
Token expiration time |
TELEGRAM_BOT_TOKEN |
String | None |
Bot token provided by @BotFather |
TELEGRAM_CHAT_ID |
String | None |
Chat ID for alert dispatch |
EMAIL_ENABLED |
Boolean | False |
Enable Resend API email alerts |
RESEND_API_KEY |
String | None |
Resend API Key |
ALERT_EMAIL_TO |
String | None |
Destination email for alerts |
HoneyCloud utilizes a normalized relational database schema.
Manages multi-tenant workspaces.
id(PK, Integer)name(String, 255)plan(String, 50) - free, starter, pro, enterpriseis_active(Boolean)
Manages operator authentication.
id(PK, Integer)username(String, 50)hashed_password(String, 255)role(String, 20) - admin, operator, viewerorganization_id(FK, Integer)
The core ledger of all intercepted malicious activity.
id(PK, Integer)timestamp(DateTime, UTC)source_ip(String, 45)service_name(String, 100) - e.g., SSH, HTTPmethod(String, 10) - e.g., GET, POSTpayload(Text) - Raw dump of attacker payloadseverity(String, 20) - LOW, MEDIUM, HIGH, CRITICALthreat_score(Float) - 0.0 to 100.0ai_label(String, 20) - benign, anomaly, maliciouslocation(JSON) - GeoIP resolution datais_deleted(Boolean) - Soft delete flag
FastAPI automatically generates interactive Swagger documentation. When the backend is running, visit:
π http://localhost:8000/docs
POST /api/auth/login- Authenticates user and returns an access token.
- Payload:
OAuth2PasswordRequestForm - Response:
{ "access_token": "ey...", "token_type": "bearer" }
GET /api/events- Retrieves paginated attack events.
- Query Params:
limit,offset,severity
POST /api/events/simulate- Injects synthetic attack events for testing the SOC dashboard.
GET /api/reports/generate- Generates comprehensive PDF, CSV, or Excel reports.
- Query Params:
format(pdf|csv|excel),limit(int) - Response: Download URL to the generated file.
POST /api/telegram/test- Sends a test alert to the configured Telegram chat.
HoneyCloud does not rely purely on static signatures. It utilizes an embedded ML pipeline and an advanced Deep Learning engine to evaluate threats.
When an event arrives, the Threat Routing Engine analyzes it:
- Feature Extraction: Extracts payload length, temporal features, service features, SQL injection keywords, script tags, and path traversal strings (
../). - Model Inference: Passes features to a pre-trained
RandomForestClassifier. - Anomaly Detection: Passes features to an
IsolationForestto detect zero-day anomalies that don't match known signatures. - Scoring: Calculates a mathematical
threat_score. - Severity Mapping:
- 0 - 30:
LOW - 30 - 60:
MEDIUM - 60 - 80:
HIGH - 80 - 100:
CRITICAL
- 0 - 30:
Our optional Deep Learning package (powered by TensorFlow) introduces:
- LSTM Networks: Recurrent neural networks (RNN) analyzing sequential attack events over time to detect multi-stage persistent threats.
- CNN 1D (Convolutional Neural Networks): Analyzes payload text as one-dimensional sequence data, extracting complex non-linear spatial features from HTTP payloads or SSH commands.
- Autoencoders: Neural networks trained purely on benign traffic to perfectly reconstruct it. When a zero-day payload arrives, the reconstruction error spikes, flagging it immediately.
- NLP Tokenization: Tokenizes payload sequences using the
TokenizerAPI for embedding layers.
The ml_trainer.py background service monitors the database. Every 24 hours (or upon accumulating 50+ new events), it automatically retrains the Scikit-Learn models using the latest empirical data to improve accuracy.
When complex attacks occur, HoneyCloud acts as an automated Level 1 SOC Analyst via the investigation_engine:
- Correlation Engine: Aggregates disjointed logs across HTTP, SSH, and MySQL mimicking that originate from the same subnet or display similar behavioral entropy.
- Timeline Analyzer: Builds a sequential graph of attacker actions, calculating the exact time delta between probing, exploiting, and post-exploitation behavior.
- Profile Builder: Automatically generates a comprehensive "Attacker Profile" linking known IPs, User-Agents, and TTPs to track repeat offenders across long timeframes.
- MITRE Mapper: Dynamically parses payload characteristics and maps them to MITRE ATT&CK Matrix techniques (e.g., T1595 Active Scanning, T1110 Brute Force).
HoneyCloud provides rich, proactive analytics to forecast attacks before they scale.
- Predictive Forecasting: Uses time-series analysis on historical data (moving averages, rolling windows) to predict upcoming attack volumes.
- Trend Analysis: Identifies shifts in geographical origins, targeted services, and severity distributions over 7-day, 14-day, and 30-day windows.
- Actionable Insights: The system generates automated natural language insights, providing severity context, confidence scores, and specific remediation recommendations.
- Database Optimization: A background
database_optimizer.pyensures all queries fueling these analytics remain highly performant, employing automatic indexing and query analysis.
The deception environment is the net that catches the attackers.
- Web App Decoy (Port 80/443): Simulates a vulnerable eCommerce platform, logging SQL injection attempts and XSS probes.
- SSH Decoy (Port 22): Simulates an open SSH port. Captures brute-force credential stuffing attacks.
- Database Decoy (Port 3306): Simulates an exposed MySQL database to capture unauthorized connection attempts.
To enable external routing, point your domain or load balancer to the HoneyCloud server IP.
HoneyCloud ensures SOC analysts never miss a critical breach.
- Message
@BotFatheron Telegram and create a new bot. - Obtain the HTTP API Token.
- Add the bot to your SOC group chat and retrieve the Chat ID.
- Update your
.env:TELEGRAM_BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 TELEGRAM_CHAT_ID=-1001234567890
- Sign up at Resend.com.
- Generate an API Key.
- Update your
.env:EMAIL_ENABLED=true RESEND_API_KEY=re_123456789 ALERT_EMAIL_TO=soc@yourcompany.com
The frontend is a strictly typed React application emphasizing aesthetics, usability, and speed.
- Dark Mode First: Designed specifically for SOC analysts working in dark environments to reduce eye strain.
- Glassmorphism: Utilizes subtle blurs and transparencies to create a deep, layered UI.
- Micro-Animations: Employs Framer Motion / CSS transitions for smooth feedback.
<ThreatMap />: A D3/Leaflet component mapping source IPs geographically.<EventTable />: A high-performance data grid with sorting, filtering, and pagination.<ReportGenerator />: An intuitive modal allowing users to select PDF/Excel/CSV formats and define date ranges.
- Push your repository to GitHub.
- Log in to Render and select New Web Service.
- Connect your GitHub repository.
- Build Command:
pip install -r requirements.txt(Ensure heavy ML libs like TensorFlow are removed from requirements.txt for the free tier). - Start Command:
uvicorn app.main:app --host 0.0.0.0 --port $PORT - Add your Environment Variables.
- Click Deploy.
(Dockerfile provided in repository)
docker build -t honeycloud .
docker run -p 8000:8000 --env-file .env honeycloud- Data Isolation: Attack data is strictly segregated from configuration data.
- Immutable Logs: Attack events are designed to be append-only. Deletions are soft-deletes (
is_deleted = True) to maintain audit trails. - JWT Security: Tokens expire hourly and require strong signatures.
- MITRE ATT&CK: Alerts are mapped directly to MITRE tactics (e.g.,
T1595 - Active Scanning) to assist you in compliance reporting.
Q: Why does the PDF show 100/100 for all Risk Scores?
A: Ensure you have restarted the backend after pulling the latest updates. The string matcher requires .strip() to successfully format risk scores.
Q: Render deployment is stuck on "Deploying" and timing out.
A: Render's Free Tier has a 512MB RAM limit. If tensorflow or torch are in your requirements.txt, the server will OOM (Out of Memory) and crash silently. Remove them from requirements.txt; HoneyCloud will safely fall back to basic ML models.
Q: Why does the dashboard take 50 seconds to load sometimes? A: Cloud providers (like Render) spin down free instances after 15 minutes of inactivity. The 50-second delay is the server booting back up.
Q: How do I clear the Recycle Bin? A: Currently, items in the recycle bin are retained for audit purposes. You can permanently delete them by accessing the database directly or waiting for the 30-day auto-purge cycle.
We welcome contributions from the cybersecurity community!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
When a request enters the HoneyCloud ecosystem, it undergoes a rigorous lifecycle:
- Ingestion Layer: The ASGI server (Uvicorn) receives the incoming TCP/HTTP connection.
- Middleware Processing:
CORSMiddlewarevalidates cross-origin requests.RateLimitMiddlewarechecks the IP against Redis (if configured) or in-memory token buckets.
- Authentication: The
get_current_userdependency intercepts the request, decodes the JWT, verifies the signature againstJWT_SECRET_KEY, and checks database validity. - Routing: FastAPI's internal router matches the path and method to the correct controller.
- Business Logic: The controller delegates complex tasks (like report generation or ML inference) to the
services/layer. - Persistence: SQLAlchemy ORM translates Python objects to SQL queries and commits to the database.
- Response: Data is serialized via Pydantic schemas and returned as JSON.
The Threat Routing Engine relies on several engineered features:
payload_length: Integer length of the raw payload.special_char_ratio: Float representing the density of non-alphanumeric characters.sql_keyword_count: Integer count of words like SELECT, UNION, DROP.xss_keyword_count: Integer count of words like <script>, alert, javascript:.entropy: Float measuring the Shannon entropy of the payload string, highly effective for detecting obfuscated shells.
HoneyCloud supports various topologies depending on enterprise needs:
- Standalone: Frontend, Backend, and DB on a single EC2/VPS. Best for small businesses.
- Distributed Sensors: Backend hosted centrally; lightweight Python forwarding scripts deployed across global endpoints.
- High Availability (HA): Backend scaled via Kubernetes, Redis for Celery task queuing, and PostgreSQL for distributed data consistency.
Co-authored by Anand Bora and Ganesh Kambli.

