WorksComputer Science
IDSMorph: Self-Adaptive Malicious Traffic Detection through Consistency-Guided Dynamic Decision Boundaries
Abstract
Anomaly-based malicious traffic detection learns decision boundaries for normal behavior and identifies deviations as anomalies. However, normal behavior varies across networks and changes dynamically, limiting adaptability and increasing retraining costs. Despite this variability, our measurements show that clients accessing the same service exhibit consistent flow structures and interaction patterns, since each service provides specific functionality. We therefore construct service-specific decision boundaries. However, variations in personalized requests make it difficult to construct stable boundaries. To address this challenge, we propose IDSMorph, a self-adaptive malicious traffic detection system that learns consistency-guided embeddings through two key designs: (1) a flow structure consistency builder, which constructs contrastive samples capturing consistent embeddings within services; and (2) a service interaction consistency builder, which captures local structural consistency among different clients and global behavioral consistency among clients accessing that service. IDSMorph constructs dynamic decision boundaries from the majority of similar embeddings within each service and dynamically updates them through a differencing algorithm that mitigates the transient traffic shifts within short observation windows. Experiments show that IDSMorph's detection F1 score decreases by no more than 0.12 points across network environments, compared with an average decrease of 55.43 points for prior methods. In real-world deployment with red-team operators independently choosing attack strategies and timing, IDSMorph achieves an F1 score 46.81 points higher than other methods.