SecureNet AI is a high-performance Network Detection and Response (NDR) platform combining deterministic sliding-window signature rules with a real-time Isolation Forest Machine Learning anomaly detection engine.
┌────────────────────────────┐
│ Traffic Simulator │
│ (Continuous Flow Stream) │
└─────────────┬──────────────┘
│
▼
┌────────────────────────────┐
│ NetworkFlowEvent Buffer │
│ (5000-flow Ring Buffer) │
└─────────────┬──────────────┘
│
▼
┌────────────────────────────┐
│ Feature Extraction │
│ (20-D Behavioral Vector) │
└─────────────┬──────────────┘
│
┌──────────────────────┴──────────────────────┐
│ │
▼ ▼
┌─────────────────────────────┐ ┌─────────────────────────────┐
│ Deterministic Rule Engine │ │ Isolation Forest ML Layer │
│ │ │ │
│ • Port Scan Recon │ │ • 50 Isolation Trees (ψ=128)│
│ • Credential Brute Force │ │ • Unsupervised Partitioning │
│ • Volumetric Botnet Flood │ │ • Feature Z-Score Deviations│
│ • Data Exfiltration │ │ • Bounded 0–100 AI Score │
│ • Subnet Lateral Sweep │ │ • Deterministic Explainers │
└──────────────┬──────────────┘ └──────────────┬──────────────┘
│ │
└──────────────────────┬──────────────────────┘
│
▼
┌────────────────────────────┐
│ Hybrid Risk Engine │
│ (Correlation & Bonus) │
└─────────────┬──────────────┘
│
▼
┌────────────────────────────┐
│ ThreatAlert │
│ (Linked Packet Evidence) │
└─────────────┬──────────────┘
│
┌──────────────────────────────┼──────────────────────────────┐
│ │ │
▼ ▼ ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Real-Time SSE │ │ Resend Email │ │ Dry-Run Safe EDR │
│ In-App Toasts │ │ (High/Crit Batch)│ │ & Mitigation │
└──────────────────┘ └──────────────────┘ └──────────────────┘
- Algorithm: Isolation Forest Ensemble with Tree Sub-Space Isolation + Statistical Manifold Z-Score Deviations.
- Model Version:
isolation-forest-v1 - Feature Version:
v1.0.0 - Training Baseline: 300 sliding-window samples generated from simulated enterprise normal background network traffic.
- Model Artifact: Persisted at
server/src/ml/artifacts/isolation-forest-v1.json. - Dimensions: 20 numerical behavioral features extracted across a 30-second rolling window.
- Explainability: Factual top contributing behavioral deviations calculated from observed feature values vs. baseline statistics.
totalBytes— Total byte volume in windowtotalPackets— Total packet count in windowbytesPerSecond— Average byte transfer ratepacketsPerSecond— Average packet arrival velocityconnectionCount— Total active flows/sessionsuniqueSrcIps— Distinct source IP countuniqueDstIps— Distinct destination IP countuniqueSrcPorts— Distinct ephemeral source port countuniqueDstPorts— Distinct target port countdstPortDiversity— Target port entropy ratioavgPacketsPerFlow— Average packets per socketavgBytesPerFlow— Average payload size per flowtcpRatio— Proportion of TCP flowsudpRatio— Proportion of UDP flowssynRatio— Proportion of SYN connection attemptsfinRstRatio— Proportion of teardown / reset packetsmaxConnsPerSrc— Maximum flow concentration from single sourcemaxConnsPerDst— Maximum flow concentration to single targetmaxDstPerSrc— Maximum hosts probed by single sourcemaxPortsPerSrc— Maximum ports probed by single source
To execute the 10-test comprehensive hybrid engine test suite:
cd server
npx tsx src/test-step7-comprehensive.tsTo retrain the Isolation Forest baseline model:
cd server
npx tsx src/ml/train.tsTo query the live ML engine status:
curl http://localhost:5000/api/ml/statuscd server
npm install
npm run devnpm install
npm run dev