Overview
ThreatGraph is an enterprise-scale threat intelligence and automated incident response system deployed on AWS EC2. It combines high-throughput Kafka streaming with hybrid Temporal Graph Neural Networks (GNNs) and Transformers to detect stealthy lateral movement across network hosts with sub-second latency.
The Problem
Traditional Security Information and Event Management (SIEM) tools evaluate incoming log entries as isolated tabular events. They frequently miss sophisticated advanced persistent threats (APTs) that execute low-and-slow lateral movement across distributed enterprise subnets.
My Contribution
Engineered an end-to-end telemetry pipeline processing 10k+ network flows/sec via Kafka on AWS EC2. Developed a spatial-temporal GNN model achieving a 0.91 F1-score on imbalanced attack datasets and integrated a RAG-powered MITRE ATT&CK SOC analyst agent for automated host containment.
Architecture
Spatial-Temporal GNN + Transformer Engine
Constructs dynamic temporal graphs where nodes represent IP addresses/ports and directed edges encode network flows. Combines Graph Convolutional Networks (GCNs) with self-attention to capture multi-hop lateral movement patterns.
High-Throughput Kafka Stream Pipeline
Consumes 10,000+ network flow records per second from distributed sensors on AWS EC2, dispatching batched subgraphs to FastAPI inference workers with sub-second response times.
RAG MITRE ATT&CK Analyst
Embeds MITRE ATT&CK enterprise techniques into FAISS vector storage. When an anomalous graph pattern is detected, the LLM agent retrieves relevant tactics, techniques, and remediation procedures.
3D Force-Graph Topology & Containment
Visualizes enterprise network graphs in real time. Security operators can inspect compromise trajectories and trigger automated Zero-Trust host isolation via firewall API triggers.
Engineering Decisions & Tradeoffs
Graph Neural Networks over traditional tabular tree models
Rationale: Tabular classifiers miss relational topology across connected hosts. GNNs aggregate contextual neighbor embeddings across multiple network hops to surface coordinated intrusions.
Tradeoff: Higher computational footprint during dynamic subgraph construction compared to tabular inference.
Zero-Trust automated host micro-isolation
Rationale: Human SOC response times average several hours, during which ransomware spreads laterally. Automated quarantine upon high-confidence detection halts spread in milliseconds.
Tradeoff: Requires stringent precision thresholds (PR-AUC 92%) to avoid accidental disruption of legitimate enterprise operations.
Challenges & Solutions
Handling severe class imbalance in intrusion datasets (<0.1% attacks)
Utilized focal loss optimization and dynamic temporal subgraph sampling to ensure the model learned distinct anomaly representations without false-alarm saturation.
Sub-second graph update latency under 10k flows/sec
Maintained incremental sliding-window neighborhood buffers in Redis rather than re-computing global topology matrices on every packet.
Evidence & Results
- ›10,000+ network flows per second sustained throughput on AWS EC2
- ›0.91 F1-Score and 92% PR-AUC on benchmark intrusion scenarios
- ›Sub-second alert dispatch with RAG MITRE ATT&CK incident runbooks
- ›Live deployment running at http://threatgraph.duckdns.org/
