Main Article Content
Abstract
Deteksi anomali akibat serangan flood merupakan tantangan utama dalam pengelolaan keamanan jaringan modern. Penelitian ini mengusulkan penerapan algoritma K-Nearest Neighbors (KNN) dalam kerangka supervised learning untuk membangun model Network Flood Detection (NFD) yang dievaluasi menggunakan metrik performa yang lebih komprehensif, yaitu akurasi, presisi, dan recall. Model dikembangkan berdasarkan fitur jaringan seperti bandwidth masuk, bandwidth keluar, ping, serta distribusi trafik flood dan normal. Data diperoleh dari laporan jaringan instansi secara real-time dan historis, yang kemudian diproses melalui tahapan normalisasi, pengurangan fitur, dan penghapusan noise. Hasil evaluasi menunjukkan bahwa model mampu mencapai akurasi hingga 92,42% dengan skor F1 yang seimbang antar kelas. Selain itu, kurva ROC dengan AUC sebesar 0,99 menunjukkan bahwa model memiliki kemampuan diskriminasi yang tinggi dalam membedakan trafik flood dan normal. Temuan ini menunjukkan bahwa KNN, meskipun sederhana, dapat digunakan secara efektif dalam sistem deteksi serangan flood jika didukung oleh data yang representatif dan proses evaluasi yang tepat.
Keywords
Article Details
Copyright (c) 2025 roni habibi, Naufal Dekha Widana

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
References
- S. M. S. Bukhari et al., “Secure and privacy-preserving intrusion detection in wireless sensor networks: Federated learning with SCNN-Bi-LSTM for enhanced reliability,” Ad Hoc Networks, vol. 155, Mar. 2024, doi: 10.1016/j.adhoc.2024.103407.
- S. A. A. Bokhari and S. Myeong, “The Influence of Artificial Intelligence on E-Governance and Cybersecurity in Smart Cities: A Stakeholder’s Perspective,” IEEE Access, vol. 11, 2023, doi: 10.1109/ACCESS.2023.3293480.
- Uchenna Joseph Umoga et al., “Exploring the potential of AI-driven optimization in enhancing network performance and efficiency,” Magna Scientia Advanced Research and Reviews, vol. 10, no. 1, pp. 368–378, Feb. 2024, doi: 10.30574/msarr.2024.10.1.0028.
- B. Riskhan et al., “An Adaptive Distributed Denial of Service Attack Prevention Technique in a Distributed Environment,” Sensors, vol. 23, no. 14, Jul. 2023, doi: 10.3390/s23146574.
- Y. Fu, X. Duan, K. Wang, and B. Li, “Low-rate Denial of Service attack detection method based on time-frequency characteristics,” Journal of Cloud Computing, vol. 11, no. 1, Dec. 2022, doi: 10.1186/s13677-022-00308-3.
- B. Fijatmiko and R. Sopandi, “Monitoring Dan Analisis Trafik Di Kejaksaan Negeri Jakarta Barat Peassler Router Traffic Grapher (Prtg),” Justifi, vol. 2, no. 1, pp. 23–31, 2022.
- R. K. Halder, M. N. Uddin, M. A. Uddin, S. Aryal, and A. Khraisat, “Enhancing K-nearest neighbor algorithm: a comprehensive review and performance analysis of modifications,” J Big Data, vol. 11, no. 1, 2024, doi: 10.1186/s40537-024-00973-y.
- S. Wang, J. F. Balarezo, S. Kandeepan, A. Al-Hourani, K. G. Chavez, and B. Rubinstein, “Machine learning in network anomaly detection: A survey,” IEEE Access, vol. 9, pp. 152379–152396, 2021, doi: 10.1109/ACCESS.2021.3126834.
- E. Altayef, F. Anayi, M. Packianather, Y. Benmahamed, and O. Kherif, “Detection and Classification of Lamination Faults in a 15 kVA Three-Phase Transformer Core Using SVM, KNN and DT Algorithms,” IEEE Access, vol. 10, pp. 50925–50932, 2022, doi: 10.1109/ACCESS.2022.3174359.
- N. Çevik and S. Akleylek, “SoK of Machine Learning and Deep Learning Based Anomaly Detection Methods for Automatic Dependent Surveillance- Broadcast,” IEEE Access, vol. 12, no. March, pp. 35643–35662, 2024, doi: 10.1109/ACCESS.2024.3369181.
- M. Owusu-Adjei, J. Ben Hayfron-Acquah, T. Frimpong, and G. Abdul-Salaam, “Imbalanced class distribution and performance evaluation metrics: A systematic review of prediction accuracy for determining model performance in healthcare systems,” PLOS Digital Health, vol. 2, no. 11 November, pp. 1–19, 2023, doi: 10.1371/journal.pdig.0000290.
- S. Huang, Y. Lyu, Y. Peng, and M. Huang, “Analysis of Factors Influencing Rockfall Runout Distance and Prediction Model Based on an Improved KNN Algorithm,” IEEE Access, vol. 7, pp. 66739–66752, 2019, doi: 10.1109/ACCESS.2019.2917868.
- S. Pitafi, T. Anwar, I. D. M. Widia, B. Yimwadsana, and S. Pitafi, “Revolutionizing Perimeter Intrusion Detection: A Machine Learning-Driven Approach with Curated Dataset Generation for Enhanced Security,” IEEE Access, vol. 11, no. October, pp. 106954–106966, 2023, doi: 10.1109/ACCESS.2023.3318600.
- W. Xing and Y. Bei, “Medical Health Big Data Classification Based on KNN Classification Algorithm,” IEEE Access, vol. 8, pp. 28808–28819, 2020, doi: 10.1109/ACCESS.2019.2955754.
- S. Zhang, “Challenges in KNN Classification,” IEEE Trans Knowl Data Eng, vol. 34, no. 10, pp. 4663–4675, 2022, doi: 10.1109/TKDE.2021.3049250.
- J. Gu, Q. Zou, C. Deng, and X. Wang, “A Novel Robust Online Extreme Learning Machine for the Non-Gaussian Noise,” Chinese Journal of Electronics, vol. 32, no. 1, pp. 130–139, 2023, doi: 10.23919/cje.2021.00.122.
- A. A. Bakar, O. H. Yi, and N. Chepa, “Journal of digital system development,” vol. 2, no. 2, pp. 79–92, 2024.
- Y. Liu, M. Ji, S. S. Lin, M. Zhao, and Z. Lyv, “Combining Readability Formulas and Machine Learning for Reader-oriented Evaluation of Online Health Resources,” IEEE Access, vol. 9, pp. 67610–67619, 2021, doi: 10.1109/ACCESS.2021.3077073.
- M. F. Kucuk and I. Uysal, “Anomaly Detection in Self-Organizing Networks: Conventional Versus Contemporary Machine Learning,” IEEE Access, vol. 10, pp. 61744–61752, 2022, doi: 10.1109/ACCESS.2022.3182014.
- S. Puttinaovarat and P. Horkaew, “Flood Forecasting System Based on Integrated Big and Crowdsource Data by Using Machine Learning Techniques,” IEEE Access, vol. 8, pp. 5885–5905, 2020, doi: 10.1109/ACCESS.2019.2963819.
- G. Ramesh, J. Logeshwaran, and A. P. Kumar, “The Smart Network Management Automation Algorithm for Administration of Reliable 5G Communication Networks,” Wirel Commun Mob Comput, vol. 2023, 2023, doi: 10.1155/2023/7626803.
- I. Ullah and Q. H. Mahmoud, “A Framework for Anomaly Detection in IoT Networks Using Conditional Generative Adversarial Networks,” IEEE Access, vol. 9, pp. 165907–165931, 2021, doi: 10.1109/ACCESS.2021.3132127.
- S. Zainab, D. H. Nugroho, M. R. T. Siregar, H. S. WD, A. Multi, and M. N. Huda, “Network Metadata (NETTA) : Sistem Monitoring Jaringan Dan Metadata UPT BMKG Dengan Notifikasi Berbasis Telegram,” Sainstech: Jurnal Penelitian Dan Pengkajian Sains Dan Teknologi, vol. 33, no. 1, pp. 52–61, 2023, doi: 10.37277/stch.v33i1.1653.
- S. Kamamura, Y. Takei, M. Nishiguchi, Y. Hayashi, and T. Fujiwara, “Network Anomaly Detection Through IP Traffic Analysis With Variable Granularity,” IEEE Access, vol. 11, no. October, pp. 129818–129828, 2023, doi: 10.1109/ACCESS.2023.3334212.
- M. Shajari, H. Geng, K. Hu, and A. Leon-Garcia, “Tensor-Based Online Network Anomaly Detection and Diagnosis,” IEEE Access, vol. 10, no. August, pp. 85792–85817, 2022, doi: 10.1109/ACCESS.2022.3197651.
References
S. M. S. Bukhari et al., “Secure and privacy-preserving intrusion detection in wireless sensor networks: Federated learning with SCNN-Bi-LSTM for enhanced reliability,” Ad Hoc Networks, vol. 155, Mar. 2024, doi: 10.1016/j.adhoc.2024.103407.
S. A. A. Bokhari and S. Myeong, “The Influence of Artificial Intelligence on E-Governance and Cybersecurity in Smart Cities: A Stakeholder’s Perspective,” IEEE Access, vol. 11, 2023, doi: 10.1109/ACCESS.2023.3293480.
Uchenna Joseph Umoga et al., “Exploring the potential of AI-driven optimization in enhancing network performance and efficiency,” Magna Scientia Advanced Research and Reviews, vol. 10, no. 1, pp. 368–378, Feb. 2024, doi: 10.30574/msarr.2024.10.1.0028.
B. Riskhan et al., “An Adaptive Distributed Denial of Service Attack Prevention Technique in a Distributed Environment,” Sensors, vol. 23, no. 14, Jul. 2023, doi: 10.3390/s23146574.
Y. Fu, X. Duan, K. Wang, and B. Li, “Low-rate Denial of Service attack detection method based on time-frequency characteristics,” Journal of Cloud Computing, vol. 11, no. 1, Dec. 2022, doi: 10.1186/s13677-022-00308-3.
B. Fijatmiko and R. Sopandi, “Monitoring Dan Analisis Trafik Di Kejaksaan Negeri Jakarta Barat Peassler Router Traffic Grapher (Prtg),” Justifi, vol. 2, no. 1, pp. 23–31, 2022.
R. K. Halder, M. N. Uddin, M. A. Uddin, S. Aryal, and A. Khraisat, “Enhancing K-nearest neighbor algorithm: a comprehensive review and performance analysis of modifications,” J Big Data, vol. 11, no. 1, 2024, doi: 10.1186/s40537-024-00973-y.
S. Wang, J. F. Balarezo, S. Kandeepan, A. Al-Hourani, K. G. Chavez, and B. Rubinstein, “Machine learning in network anomaly detection: A survey,” IEEE Access, vol. 9, pp. 152379–152396, 2021, doi: 10.1109/ACCESS.2021.3126834.
E. Altayef, F. Anayi, M. Packianather, Y. Benmahamed, and O. Kherif, “Detection and Classification of Lamination Faults in a 15 kVA Three-Phase Transformer Core Using SVM, KNN and DT Algorithms,” IEEE Access, vol. 10, pp. 50925–50932, 2022, doi: 10.1109/ACCESS.2022.3174359.
N. Çevik and S. Akleylek, “SoK of Machine Learning and Deep Learning Based Anomaly Detection Methods for Automatic Dependent Surveillance- Broadcast,” IEEE Access, vol. 12, no. March, pp. 35643–35662, 2024, doi: 10.1109/ACCESS.2024.3369181.
M. Owusu-Adjei, J. Ben Hayfron-Acquah, T. Frimpong, and G. Abdul-Salaam, “Imbalanced class distribution and performance evaluation metrics: A systematic review of prediction accuracy for determining model performance in healthcare systems,” PLOS Digital Health, vol. 2, no. 11 November, pp. 1–19, 2023, doi: 10.1371/journal.pdig.0000290.
S. Huang, Y. Lyu, Y. Peng, and M. Huang, “Analysis of Factors Influencing Rockfall Runout Distance and Prediction Model Based on an Improved KNN Algorithm,” IEEE Access, vol. 7, pp. 66739–66752, 2019, doi: 10.1109/ACCESS.2019.2917868.
S. Pitafi, T. Anwar, I. D. M. Widia, B. Yimwadsana, and S. Pitafi, “Revolutionizing Perimeter Intrusion Detection: A Machine Learning-Driven Approach with Curated Dataset Generation for Enhanced Security,” IEEE Access, vol. 11, no. October, pp. 106954–106966, 2023, doi: 10.1109/ACCESS.2023.3318600.
W. Xing and Y. Bei, “Medical Health Big Data Classification Based on KNN Classification Algorithm,” IEEE Access, vol. 8, pp. 28808–28819, 2020, doi: 10.1109/ACCESS.2019.2955754.
S. Zhang, “Challenges in KNN Classification,” IEEE Trans Knowl Data Eng, vol. 34, no. 10, pp. 4663–4675, 2022, doi: 10.1109/TKDE.2021.3049250.
J. Gu, Q. Zou, C. Deng, and X. Wang, “A Novel Robust Online Extreme Learning Machine for the Non-Gaussian Noise,” Chinese Journal of Electronics, vol. 32, no. 1, pp. 130–139, 2023, doi: 10.23919/cje.2021.00.122.
A. A. Bakar, O. H. Yi, and N. Chepa, “Journal of digital system development,” vol. 2, no. 2, pp. 79–92, 2024.
Y. Liu, M. Ji, S. S. Lin, M. Zhao, and Z. Lyv, “Combining Readability Formulas and Machine Learning for Reader-oriented Evaluation of Online Health Resources,” IEEE Access, vol. 9, pp. 67610–67619, 2021, doi: 10.1109/ACCESS.2021.3077073.
M. F. Kucuk and I. Uysal, “Anomaly Detection in Self-Organizing Networks: Conventional Versus Contemporary Machine Learning,” IEEE Access, vol. 10, pp. 61744–61752, 2022, doi: 10.1109/ACCESS.2022.3182014.
S. Puttinaovarat and P. Horkaew, “Flood Forecasting System Based on Integrated Big and Crowdsource Data by Using Machine Learning Techniques,” IEEE Access, vol. 8, pp. 5885–5905, 2020, doi: 10.1109/ACCESS.2019.2963819.
G. Ramesh, J. Logeshwaran, and A. P. Kumar, “The Smart Network Management Automation Algorithm for Administration of Reliable 5G Communication Networks,” Wirel Commun Mob Comput, vol. 2023, 2023, doi: 10.1155/2023/7626803.
I. Ullah and Q. H. Mahmoud, “A Framework for Anomaly Detection in IoT Networks Using Conditional Generative Adversarial Networks,” IEEE Access, vol. 9, pp. 165907–165931, 2021, doi: 10.1109/ACCESS.2021.3132127.
S. Zainab, D. H. Nugroho, M. R. T. Siregar, H. S. WD, A. Multi, and M. N. Huda, “Network Metadata (NETTA) : Sistem Monitoring Jaringan Dan Metadata UPT BMKG Dengan Notifikasi Berbasis Telegram,” Sainstech: Jurnal Penelitian Dan Pengkajian Sains Dan Teknologi, vol. 33, no. 1, pp. 52–61, 2023, doi: 10.37277/stch.v33i1.1653.
S. Kamamura, Y. Takei, M. Nishiguchi, Y. Hayashi, and T. Fujiwara, “Network Anomaly Detection Through IP Traffic Analysis With Variable Granularity,” IEEE Access, vol. 11, no. October, pp. 129818–129828, 2023, doi: 10.1109/ACCESS.2023.3334212.
M. Shajari, H. Geng, K. Hu, and A. Leon-Garcia, “Tensor-Based Online Network Anomaly Detection and Diagnosis,” IEEE Access, vol. 10, no. August, pp. 85792–85817, 2022, doi: 10.1109/ACCESS.2022.3197651.