Anomaly-based network intrusion detection must process packets at high speed, yet applying a machine-learning anomaly detector to every packet is computationally expensive. Using KitNET, the ensemble-of-autoencoders detector of the Kitsune framework, as a reference, this thesis reduces this cost along two axes: how often the detector runs and how expensive each run is. First, we propose AS3, an adaptive similarity-based selective sampling policy that combines memory of previously detected malicious flows, adaptive per-flow sampling probabilities, and a selective procedure based on the normalized Hamming distance between binary flow identifiers. On eight attack datasets, AS3 matches or exceeds Naive Sampling and WASP with substantially fewer detector executions, most clearly when malicious traffic forms repetitive or structurally related flows. Second, we distill the KitNET ensemble into a compact student autoencoder trained to reconstruct packet features while matching the teacher's anomaly scores, achieving inference speedups from 9.79× to 14.08×, with an average speedup of 12.17×. When the student replaces KitNET inside the unchanged AS3 pipeline, it reproduces the KitNET-based result almost exactly on Mirai Botnet and improves the F1 score on Active Wiretap and Fuzzing, confirming that model compression yields a consistent computational benefit whose detection tradeoff depends on the traffic scenario and the chosen threshold. All experiments are conducted in Python, with eBPF treated as a future deployment direction supported by a fixed-point C export of the trained student.
Il rilevamento delle intrusioni di rete basato su anomalie deve elaborare i pacchetti ad alta velocità, ma applicare un rilevatore di anomalie a ogni pacchetto è computazionalmente costoso. Usando come riferimento KitNET, il rilevatore del framework Kitsune basato su un insieme di autoencoder, questa tesi riduce tale costo lungo due assi: la frequenza con cui il rilevatore viene eseguito e il costo di ciascuna esecuzione. In primo luogo, proponiamo AS3, una politica di campionamento selettivo adattivo basato sulla similarità che combina la memoria dei flussi malevoli già rilevati, probabilità di campionamento adattive per ciascun flusso e una procedura selettiva basata sulla distanza di Hamming normalizzata tra identificatori binari di flusso. Su otto dataset di attacco, AS3 eguaglia o supera Naive Sampling e WASP con un numero sostanzialmente inferiore di esecuzioni del rilevatore, soprattutto quando il traffico malevolo forma flussi ripetitivi o strutturalmente correlati. In secondo luogo, distilliamo l'insieme KitNET in un autoencoder studente compatto, addestrato a ricostruire le feature dei pacchetti approssimando i punteggi di anomalia dell'insegnante, ottenendo accelerazioni di inferenza da 9.79× a 14.08×, con una media di 12.17×. Quando lo studente sostituisce KitNET nella pipeline AS3 invariata, riproduce quasi esattamente il risultato basato su KitNET su Mirai Botnet e migliora il punteggio F1 su Active Wiretap e Fuzzing, confermando che la compressione del modello offre un vantaggio computazionale consistente il cui compromesso sul rilevamento dipende dallo scenario di traffico e dalla soglia scelta. Tutti gli esperimenti sono condotti in Python, con eBPF considerato una direzione di sviluppo futura supportata da un'esportazione in C a virgola fissa dello studente addestrato.
Improving cyber attack detection through selective packet sampling and model reduction
Izmir, Ece
2025/2026
Abstract
Anomaly-based network intrusion detection must process packets at high speed, yet applying a machine-learning anomaly detector to every packet is computationally expensive. Using KitNET, the ensemble-of-autoencoders detector of the Kitsune framework, as a reference, this thesis reduces this cost along two axes: how often the detector runs and how expensive each run is. First, we propose AS3, an adaptive similarity-based selective sampling policy that combines memory of previously detected malicious flows, adaptive per-flow sampling probabilities, and a selective procedure based on the normalized Hamming distance between binary flow identifiers. On eight attack datasets, AS3 matches or exceeds Naive Sampling and WASP with substantially fewer detector executions, most clearly when malicious traffic forms repetitive or structurally related flows. Second, we distill the KitNET ensemble into a compact student autoencoder trained to reconstruct packet features while matching the teacher's anomaly scores, achieving inference speedups from 9.79× to 14.08×, with an average speedup of 12.17×. When the student replaces KitNET inside the unchanged AS3 pipeline, it reproduces the KitNET-based result almost exactly on Mirai Botnet and improves the F1 score on Active Wiretap and Fuzzing, confirming that model compression yields a consistent computational benefit whose detection tradeoff depends on the traffic scenario and the chosen threshold. All experiments are conducted in Python, with eBPF treated as a future deployment direction supported by a fixed-point C export of the trained student.| File | Dimensione | Formato | |
|---|---|---|---|
|
Ece_Izmir___Thesis.pdf
accessibile in internet per tutti a partire dal 25/06/2027
Dimensione
1.9 MB
Formato
Adobe PDF
|
1.9 MB | Adobe PDF | Visualizza/Apri |
|
Executive_Summary___Ece_Izmir.pdf
accessibile in internet per tutti a partire dal 25/06/2027
Dimensione
811.55 kB
Formato
Adobe PDF
|
811.55 kB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/261303