In recent years, Internet of Things (IoT) sensors have become increasingly integrated into various devices and fields. Therefore, the security of IoT sensors is becoming more vulnerable to attacks. In this research, the K-Nearest Neighbors (KNN) algorithm is employed to classify attacks in the dataset. The dataset is obtained from interactions between DDos attacks and normal interactions, and i…