Cyber Threat Detection Using Machine Learning

Author

S. Ramalakshmi, E Julie Ruth


Abstract

 Cyber threats and unauthorized login attempts are major security concerns in modern web applications. Traditional username and password authentication may not provide sufficient protection when valid credentials are used from unfamiliar devices or networks. This project presents a Cyber Threat Detection Using Machine Learning system that combines machine learning model evaluation, IP address verification, OTP authentication, email alerts, and SQLite database logging. The dataset contains login-related attributes such as device type, login method, authentication type, failed attempts, multi-factor authentication status, suspicious activity, and IP address information. The collected data is preprocessed and used to train and compare four classification algorithms: Random Forest, Support Vector Machine (SVM), Logistic Regression, and K-Nearest Neighbors (KNN). The recorded experimental results show that Random Forest achieved the highest accuracy of 99.84%, followed by KNN at 99.52%, Logistic Regression at 99.21%, and SVM at 83.15%. Therefore, Random Forest was selected as the best-performing model based on the recorded accuracy results. The web application is developed using Python and Flask. It validates login credentials and checks the user's IP address to determine whether additional authentication is required. Authorized login requests receive direct dashboard access, while login requests from unauthorized IP addresses activate a four-digit OTP verification process. The OTP and a security alert are sent to the registered email address. Incorrect OTP entries display a separate error page with a Try Again option. Login activities are recorded in an SQLite database for monitoring and analysis. The proposed system demonstrates a practical approach to strengthening login security through machine learning evaluation and layered authentication.



Keywords

Cybersecurity, Machine Learning, Threat Detection, IP Verification, OTP Authentication.



Full Text:

Download Paper PDF


References


  • L. Buczak and E. Guven, “A survey of data mining and machine learning methods for cyber security intrusion detection,” IEEE Communications Surveys & Tutorials, vol. 18, no. 2, pp. 1153–1176, 2016, doi: 10.1109/COMST.2015.2494502.
  • Sommer and V. Paxson, “Outside the closed world: On using machine learning for network intrusion detection,” in Proceedings of the IEEE Symposium on Security and Privacy, 2010, pp. 305–316, doi: 10.1109/SP.2010.25.
  • Tavallaee, E. Bagheri, W. Lu, and A. A. Ghorbani, “A detailed analysis of the KDD CUP 99 data set,” in Proceedings of the IEEE Symposium on Computational Intelligence for Security and Defense Applications, 2009, pp. 1–6, doi: 10.1109/CISDA.2009.5356528.
  • Khraisat, I. Gondal, P. Vamplew, and J. Kamruzzaman, “Survey of intrusion detection systems: Techniques, datasets and challenges,” Cybersecurity, vol. 2, art. no. 20, 2019, doi: 10.1186/s42400-019-0038-7.
  • Sharafaldin, A. H. Lashkari, and A. A. Ghorbani, “Toward generating a new intrusion detection dataset and intrusion traffic characterization,” in Proceedings of the 4th International Conference on Information Systems Security and Privacy, 2018, pp. 108–116

 

 

 

Share your valuable work from Social Media Buttons