Resampling and KNN for IoT Botnet Detection: Addressing Class Overlap Challenges
摘要
Detecting botnet attacks in Internet of Things (IoT) environments is challenging due to class overlap, which makes distinguishing between malicious and benign traffic difficult. This paper addresses this issue by combining k-Nearest Neighbors (KNN) with dynamic resampling techniques to improve classification performance, particularly in scenarios with class imbalance. Convolutional Neural Networks (CNN) are used as a baseline but struggle with overlapping classes due to global decision boundaries. Experiments on the N-BaIoT dataset show that KNN, when paired with dynamic resampling, significantly enhances performance, achieving 99.94% accuracy, 99.93% precision, recall, and F1-score, with a loss of 0.0106. This study demonstrates that KNN, integrated with resampling, effectively resolves class overlap and imbalance, providing a scalable solution for botnet detection in IoT environments.