PacketSentinel
Initializing DPI Engine...
Connecting...
TOTAL PACKETS
-
processed
THROUGHPUT
-
kilo-pkts / sec
ACTIVE FLOWS
-
tracked 5-tuple flows
FORWARDED
-
-
BLOCKED
-
-
ANOMALIES FLAGGED
-
No anomaly detected

Multi-Threaded Pipeline — Live State

Lock-Free · 5-tuple Hash Routing · Poison-Pill Shutdown

Packet Rate Timeline

60s rolling window · auto-refresh 2s

Traffic Decision Ratio

Forwarded vs. Blocked

Payload Analysis & Anomaly Scoring

Shannon Entropy · Welford Variance · Z-score · TCP Flag Ratio
Shannon Entropy C2 / Tunneling
H(X) = −∑ p(x) · log₂ p(x)
0 bits (uniform)8 bits (max random)
Encrypted C2 & exfil payloads score ≥7.5 bits — normal HTTP sits at 4–6 bits. Based on Bro/Zeek IDS research.
Packet Size Variance DDoS Suspect
σ² via Welford's Online Algorithm (O(1) memory)
0 (identical pkts)High variance
Amplification DDoS floods use fixed-size payloads, yielding near-zero variance. Normal web traffic varies wildly.
SYN / FIN Ratio Port Scan / SYN Flood
ratio = syn_count / max(fin_count + rst_count, 1)
1:1 (normal)High (attack)
Port scanners & SYN floods never complete the 3-way handshake. FIN/RST counts remain at zero. NSL-KDD flag feature.
Byte Volume Z-score Exfiltration
Z = (byte_count − μ) / σ  [population z-score]
Normal rangeZ>3 (outlier)
Exfiltration flows push abnormally large byte totals. Z>3 triggers HIGH_ENTROPY or EXFIL flag. CICIDS2017: Total Fwd Bytes.

DPI Feature Extraction — Per Flow

8 Features · Real-time · Zero Lock · NSL-KDD + CICIDS2017
Feature What It Captures Attack Signal Research Dataset Live Value
Packet Count Number of packets in the flow Port Scan (many 1-pkt flows) NSL-KDD: count -
Total Bytes Total volume of data transferred Exfil (abnormally large) NSL-KDD: num_bytes -
Avg Packet Size Mean payload length per packet DDoS (all pkts identical) CICIDS2017: Avg Fwd Seg Size -
Pkt Size Variance Statistical spread of packet sizes DDoS (near-zero variance) CICIDS2017: Pkt Len Variance -
Shannon Entropy Byte-level randomness of payload C2 / Tunneling (≥7.5 bits) Bro/Zeek IDS Custom -
Flow Duration (ms) Time from first to last packet Port Scan (extremely short) CICIDS2017: Flow Duration -
SYN Count TCP SYN flags observed in flow SYN Flood / Port Scan NSL-KDD: count_syn -
FIN + RST Count Graceful & reset termination flags Xmas tree / Scan probes NSL-KDD: flag features -

Application Breakdown

Layer 7 · TLS SNI / HTTP Host / DNS QNAME

Anomaly Detection Log

0 threats
Source IP Dst IP Score Type Pkts
No anomaly detected

Protocol Classification Table

ApplicationPacketsSharePolicy
Loading...

Detected Domains

0
Waiting for traffic...

Thread Pipeline

No data

System Design & Research References

ARCHITECTURE

Lock-Free FastPath Pipeline

5-tuple hash guarantees all packets of a given TCP/UDP flow route to the same FastPath thread, eliminating mutex contention on the hot classification path. Per-FastPath flow tables require no synchronization.

PAYLOAD ANALYSIS

Byte-Level Protocol Parsing

Walks raw byte buffers to extract TLS Client Hello SNI (extension 0x0000), HTTP/1.x Host headers, and DNS Question Section labels (RFC 1035 label-length walk) with zero external library dependencies.

ANOMALY DETECTION

Statistical Scoring Engine

Shannon entropy H(X) = −∑ p log₂ p and Welford's online variance (O(1) memory) extract features modeled on NSL-KDD (Tavallaee et al., 2009) and CICIDS2017 (Sharafaldin et al., 2018).

ML PIPELINE

Offline Random Forest Classifier

Exports per-flow feature CSV to a Scikit-Learn Random Forest pipeline. Achieves ~97% precision on adversarial synthetic PCAP replay. Feature importance validates CICIDS2017 byte-count and entropy as top predictors.