CASE STUDY // 06•Cyber Deception, Threat Intelligence & Active Defense

GhostChat & Sentinel

GhostChat & Sentinel is an enterprise-grade deception technology and threat intelligence honeypot that emulates an anonymous onion-routed communication service to attract, isolate, categorize, and alert on malicious reconnaissance, scanner activity, and injection exploits.

01

Project Overview

GhostChat & Sentinel is an enterprise-grade deception technology and threat intelligence honeypot that emulates an anonymous onion-routed communication service to attract, isolate, categorize, and alert on malicious reconnaissance, scanner activity, and injection exploits.

02

Problem Statement

Modern defensive security perimeters rely excessively on reactive firewall logs and post-compromise alerts. Security Operations Centers (SOCs) lack realistic, high-interaction deception infrastructure that can safely attract, analyze, and de-anonymize automated scanners (Nikto, sqlmap, Nuclei, Nmap), brute-force bots, and sophisticated manual attack payloads. Traditional honeypots often suffer from two critical hazards: weaponization risk (where attacker commands or payloads might be executed against other systems) and cross-talk communication (where malicious actors abuse decoy messaging channels to exchange real attack payloads).

03

Objectives & Scope

Project Objectives

  • 01Construct an authentic, high-interaction decoy emulating an anonymous zero-knowledge chat application
  • 02Log full-fidelity request streams (UTC timestamps, IPs, headers, query parameters, and truncated bodies)
  • 03Implement zero-execution heuristic detection for SQLi, XSS, Path Traversal, SSRF, and vulnerability scanners
  • 04Deploy canary secrets across decoy lures to trap credential harvesters with zero false positives
  • 05Enforce 100% passive safety: isolate decoy messages per session and eliminate weaponized command evaluation
  • 06Deliver an isolated, password-protected SecOps administration dashboard on port 9090 with live telemetry and data exports

Scope & Boundary

High-interaction web decoy emulation, full-fidelity HTTP/WebSocket request capture, heuristic signature detection, deterministic canary token triggering, session-isolated sandboxed messaging, non-root container packaging, and SecOps telemetry console. Active offensive retaliation and persistent command execution are explicitly out of scope.

04

Threat Model & Requirements

Adversary Capability: External scanners, automated vulnerability frameworks (sqlmap, Nikto, Nuclei), credential stuffers, and penetration testers probing for web vulnerabilities. Defensive Boundaries: All incoming strings are treated as immutable text and never executed. Decoy chat messages are sandboxed to the visitor's session cookie. Rate limits (180 RPM) prevent disk exhaustion. The admin console on port 9090 is bound to loopback and shielded with bcrypt and HMAC signatures.

05

Architecture

The platform operates across two separate security domains: (1) Decoy Surface on port 8000/8080 mimicking GhostChat, equipped with landing pages, onion status trackers, and trapped endpoints (/.env, /wp-login.php, /robots.txt). Incoming requests pass through Sentinel ASGI middleware for logging and classification before synthetic responses are generated with spoofed Nginx/Express headers. (2) SecOps Admin Console on port 9090 querying SQLite telemetry to visualize attack vectors, top target paths, visitor sessions, and canary alarms, with full CSV/JSON incident streaming.

FIG 1.0 // PROJECT LAUNCH FILM & EXECUTION TEASER (1080P)
GhostChat & Sentinel Launch Film
0.0s / 20.0s30 FPS
SOUND: OFF (CLICK UNMUTE)
|
|
FIG 1.1 // SYSTEM ARCHITECTURE & FLOW
+-------------------------------------------------------------------+
|               GHOSTCHAT & SENTINEL DECEPTION ARCHITECTURE          |
+-------------------------------------------------------------------+
|                                                                   |
|   [Attacker / Scanners]               [SecOps Analyst (Loopback)] |
|          |                                         |              |
|          v (Port 80/8080)                          v (Port 9090)  |
|   +-----------------------+              +---------------------+  |
|   |  GhostChat Decoy UI   |              |  Sentinel Dashboard |  |
|   |  - Ephemeral Webchat  |              |  - Telemetry Stream |  |
|   |  - Fake Auth Lures    |              |  - Attack Heatmaps  |  |
|   |  - Canary Traps       |              |  - Canary Alarms    |  |
|   +-----------+-----------+              +----------+----------+  |
|               |                                     |             |
|               v                                     v             |
|   +-----------------------+              +---------------------+  |
|   | Sentinel Interceptor  |              | Session Auth Guard  |  |
|   | - Heuristic Analyzer  |              | - Bcrypt / HMAC-256 |  |
|   | - Canary Correlator   |              | - XSS Sanitizer     |  |
|   | - Sliding Rate Guard  |              | - CSV/JSON Export   |  |
|   +-----------+-----------+              +----------+----------+  |
|               |                                     |             |
|               +------------------+------------------+             |
|                                  |                                |
|                                  v                                |
|                      +-----------------------+                    |
|                      |  SQLite Storage Engine|                    |
|                      |  - log_entries        |                    |
|                      |  - visitor_sessions   |                    |
|                      |  - sandboxed_messages |                    |
|                      +-----------------------+                    |
|                                                                   |
+-------------------------------------------------------------------+
FIG 1.2 // ARCHITECTURAL KNOWLEDGE TREE & SYSTEM DECOMPOSITION

GhostChat & Sentinel Architecture Decomposition

Production-grade web deception honeypot and telemetry platform emulating an onion-routed anonymous messaging network with real-time heuristic attack detection, canary tokens, session-isolated sandboxing, and an authenticated SecOps operations dashboard.

SUBSYSTEMS:
PROJECT

GhostChat & Sentinel Platform

.
CATEGORY

GhostChat Decoy Subsystem

.
FRAMEWORK
↗

FastAPI Decoy Core

.
COMPONENT

Sandboxed Chat Engine

.
SECURITY CONTROL

Server Camouflage & Jitter

.
COMPONENT

High-Interaction Recon Traps

.
CATEGORY

Sentinel Telemetry & Detection Engine

.
ALGORITHM

Heuristic Signature Analyzer

.
SECURITY CONTROL

Deterministic Canary Token System

.
SECURITY CONTROL

Sliding-Window Anti-DoS Guard

.
DATABASE
↗

SQLAlchemy & SQLite Storage

.
CATEGORY

SecOps Admin Operations Console

.
SECURITY CONTROL

Bcrypt & HMAC-SHA256 Auth

.
COMPONENT

XSS-Sanitized Payload Inspector

.
SERVICE

Streaming CSV / JSON Exporter

.
NODES: 15 ACTIVE•SCALE: 35%PAGE SCROLL: NORMAL
06

Implementation

Engineered an enterprise-grade deception technology platform coupling 'GhostChat' (a high-interaction decoy emulating an anonymous zero-knowledge onion-routed chat network) with 'Sentinel' (a high-throughput telemetry, heuristic threat classification, and canary alarming engine). Developed with FastAPI, SQLAlchemy, and SQLite, the platform captures full-fidelity request streams (headers, cookies, payload bodies up to 8 KB) with sub-1ms overhead. Integrated an asynchronous pattern recognition engine identifying SQLi, XSS, Path Traversal/LFI, Command Injection, and 13+ scanner tools, scoring threats across LOW, MEDIUM, and HIGH severity. Deployed deterministic canary tokens (.env, config.json, hidden vault URLs) that trigger instant high-priority alerts upon external reuse. Built an isolated, session-authenticated SecOps Admin Dashboard on port 9090 providing real-time telemetry streaming, interactive attack distribution bars, payload inspection with strict XSS sanitization, and CSV/JSON incident exports. Decoy chat messaging is strictly sandboxed per visitor session to eliminate cross-talk abuse.

07

Technologies & Rationale

FastAPI & Starlette Middleware

High-throughput asynchronous ASGI pipeline intercepting all incoming HTTP and WebSocket requests, logging full client headers and body fragments before synthetic response dispatch with sub-2ms latency overhead.

Sentinel Heuristic Engine

Zero-execution regex pattern matching covering SQL injection, XSS vectors, Directory Traversal, and 13+ automated scanner user-agents (sqlmap, Nikto, Nuclei, Nmap, GoBuster) without executing any untrusted code.

Deterministic Canary Tokens

Fake API keys, AWS credentials, and hidden management URLs embedded within decoy environment files (/.env, /config.json) that generate zero false-positive alerts when probed by threat actors.

Session-Scoped Chat Sandboxing

Incoming decoy chat transmissions are scoped exclusively to the sender's session cookie (gc_sid), preventing malicious actors from communicating with or phishing other visitors through the honeypot.

Anti-DoS Sliding Rate Limiter

Sliding-window request limiter capping clients at 180 RPM/IP alongside strict 8 KB body truncation, protecting the backend from disk-exhaustion denial-of-service attacks.

Bcrypt & HMAC-SHA256 Auth

Guards the administrative operations console with bcrypt password verification and tamper-proof HMAC session tokens on isolated loopback port 9090.

XSS-Sanitized Inspection Modal

Strict HTML entity encoding ensures that SecOps analysts can inspect raw malicious attacker payloads without triggering stored XSS in the browser.

08

Testing Methodology

Automated test suite implemented in tests/test_honeypot.py using Pytest and Starlette TestClient. 12 comprehensive unit and integration tests verified landing page integrity, banner spoofing (Server: nginx/1.18.0), cookie-scoped chat message sandboxing, fake auth responses, scanner lures (/.env, /robots.txt, /backup.zip), SQL injection detection, XSS detection, path traversal detection, vulnerability scanner user-agent detection, canary token triggers, dashboard redirect protection, and CSV/JSON export endpoints. All 12/12 tests passing with zero failures.

09

Results & Evidence

Demonstrated sub-2ms request classification overhead under load. Successfully intercepted and tagged live simulated SQL injection probes, trapped automated scanner signatures, and fired canary token triggers while preserving complete host and visitor safety.

10

Limitations & Trade-offs

Heuristic signatures require ongoing pattern updates for emerging polyglot evasion techniques. TLS/JA3 fingerprinting requires an upstream terminating reverse proxy. Passive design intentionally foregoes active counter-measures to avoid legal or operational liability.

11

Future Improvements

Implement automated JA3/JA4 TLS client fingerprinting extraction. Add MaxMind GeoLite2 offline database integration for local country/city resolution. Build dynamic decoy personality switching (e.g., WordPress, Next.js, Django personas).

12

Resources & Code

VIEW REPOSITORY ON GITHUB ↗

Repository URL: https://github.com/prajwalk-cyber/ghostchat-honeypot