Research Article

Strengthening Digital Security: Dynamic Attack Detection with LSTM, KNN, and Random Forest

Authors

  • Ansarullah Hasas Information Technology Department, Kabul University, Kabul, Afghanistan
  • Mohammad Shuaib Zarinkhail Associate Professor, Information Systems Department, Kabul University, Kabul, Afghanistan https://orcid.org/0009-0001-7191-178X
  • Musawer Hakimi Assistant Professor, Computer Science Department, Samangan University, Samangan, Afghanistan https://orcid.org/0009-0001-6591-2452
  • Mohammad Mustafa Quchi Assistant Professor, Network Engineering Department, Faryab University, Faryab, Afghanistan

Abstract

Digital security is an ever-escalating concern in today's interconnected world, necessitating advanced intrusion detection systems. This research focuses on fortifying digital security through the integration of Long Short-Term Memory (LSTM), K-Nearest Neighbors (KNN), and Random Forest for dynamic attack detection. Leveraging a robust dataset, the models were subjected to rigorous evaluation, considering metrics such as accuracy, precision, recall, F1-score, and AUC-ROC. The LSTM model exhibited exceptional proficiency in capturing intricate sequential dependencies within network traffic, attaining a commendable accuracy of 99.11%. KNN, with its non-parametric adaptability, demonstrated resilience with a high accuracy of 99.23%. However, the Random Forest model emerged as the standout performer, boasting an accuracy of 99.63% and showcasing exceptional precision, recall, and F1-score metrics. Comparative analyses unveiled nuanced differences, guiding the selection of models based on specific security requirements. The AUC-ROC comparison reinforced the discriminative power of the models, with Random Forest consistently excelling. While all models excelled in true positive predictions, detailed scrutiny of confusion matrices offered insights into areas for refinement. In conclusion, the integration of LSTM, KNN, and Random Forest presents a robust and adaptive approach to dynamic attack detection. This research contributes valuable insights to the evolving landscape of digital security, emphasizing the significance of leveraging advanced machine learning techniques in constructing resilient defenses against cyber adversaries. The findings underscore the need for adaptive security solutions as the cyber threat landscape continues to evolve, with implications for practitioners, researchers, and policymakers in the field of cybersecurity.

Article information

Journal

Journal of Computer Science and Technology Studies

Volume (Issue)

6 (1)

Pages

49-57

Published

2024-01-03

How to Cite

Hasas, A., Zarinkhail, M. S., Hakimi, M., & Quchi, M. M. (2024). Strengthening Digital Security: Dynamic Attack Detection with LSTM, KNN, and Random Forest. Journal of Computer Science and Technology Studies, 6(1), 49–57. https://doi.org/10.32996/jcsts.2024.6.1.6

Downloads

Keywords:

Digital Security, Intrusion Detection Systems, Long Short-Term Memory (LSTM), K-Nearest Neighbors (KNN), Random Forest, Dynamic Attack Detection, Machine Learning