Machine Learning-Based Intrusion Detection System for Network Security
Article Sidebar
Main Article Content
Cyberattacks pose a significant risk to network environments today as they can lead to the compromise of sensitive information, disruption of digital service, and compromise the confidentiality, integrity, and availability of information systems. Signature-based intrusion detection systems and firewalls are effective, but they can't detect unknown, modified and zero-day attacks. This research paper proposes a machine-learning approach to build an Intrusion Detection System for network security based on the NSL-KDD dataset, which helps to overcome this limitation. The proposed system uses supervised machine learning algorithms to classify the network traffic as either normal traffic or attack traffic. The methodology consists of data collection, data preprocessing, categorical features encoding, feature selection, model training, testing, prediction and evaluation. Random Forest is the primary classification algorithm and Support Vector Machine and Logistic Regression (LR) are employed in comparison. The implementation of the system is done in Python with the use of libraries like Pandas, NumPy, Scikit-learn, and Matplotlib. The illustrative results demonstrate that the Random Forest attained the most noteworthy correctness of 96.20% which was superior to SVM and Logistic Regression. The confusion matrix, attack distribution and feature-importance analysis further illustrates the ability of machine learning to be used for effective intrusion detection. These results should be considered as illustrative only and once the final model is run on the chosen data set, these should be swapped with the experimental results. The overall findings of the study indicate that application of machine learning can enhance the performance of IDS and it offers a practical base for future real time and deep learning based intrusion detection systems.
Downloads
References
Akuthota, U. C., & Bhargava, L. (2025). The role of machine and deep learning in modern intrusion detection systems: A comprehensive review. Computers and Electrical Engineering, 124, 110318. DOI: https://doi.org/10.1016/j.compeleceng.2025.110318
Al Mukhaini, G., Anbar, M., Manickam, S., Al-Amiedy, T. A., & Al Momani, A. (2024). A systematic literature review of recent lightweight detection approaches leveraging machine and deep learning mechanisms in Internet of Things networks. Journal of King Saud University - Computer and Information Sciences, 36(1), 101866. DOI: https://doi.org/10.1016/j.jksuci.2023.101866
Ali, A. H., Charfeddine, M., Ammar, B., Ben Hamed, B., Albalwy, F., Alqarafi, A., & Hussain, A. (2024). Unveiling machine learning strategies and considerations in intrusion detection systems: A comprehensive survey. Frontiers in Computer Science, 6. DOI: https://doi.org/10.3389/fcomp.2024.1387354
Hozouri, A., Mirzaei, A., & Effatparvar, M. (2025). A comprehensive survey on intrusion detection systems with advances in machine learning, deep learning and emerging cybersecurity challenges. Discover Artificial Intelligence, 5, 314. DOI: https://doi.org/10.1007/s44163-025-00578-1
Hamidou, S. T., & Mehdi, A. (2025). Enhancing IDS performance through a comparative analysis of Random Forest, XGBoost, and Deep Neural Networks. Machine Learning with Applications, 100738.
Kasongo, S. M., & Sun, Y. (2020). Performance analysis of intrusion detection systems using a feature selection method on the UNSW-NB15 dataset. Journal of Big Data, 7, 105. DOI: https://doi.org/10.1186/s40537-020-00379-6
Kocher, G., & Kumar, G. (2021). Machine learning and deep learning methods for intrusion detection systems: Recent developments and challenges. Soft Computing, 25, 9731–9763. DOI: https://doi.org/10.1007/s00500-021-05893-0
Pinto, D., Amorim, I., Maia, E., & Praça, I. (2025). A review on intrusion detection datasets: tools, processes, and features. Computer Networks, 111177. DOI: https://doi.org/10.1016/j.comnet.2025.111177
Rosay, A., Cheval, E., Carlier, F., & Leroux, P. (2022). Network intrusion detection: A comprehensive analysis of CIC-IDS2017. Proceedings of ICISSP 2022, 25–36. DOI: https://doi.org/10.5220/0010774000003120
Saranya, T., Sridevi, S., Deisy, C., Chung, T. D., & Khan, M. K. A. A. (2020). Performance analysis of machine learning algorithms in intrusion detection system: A review. Procedia Computer Science, 171, 1251–1260. DOI: https://doi.org/10.1016/j.procs.2020.04.133
Talukder, M. A., Hasan, K. F., Islam, M. M., Uddin, M. A., Akhter, A., Yousuf, M. A., Alharbi, F., & Moni, M. A. (2023). A dependable hybrid machine learning model for network intrusion detection. Journal of Information Security and Applications, 72, 103405. DOI: https://doi.org/10.1016/j.jisa.2022.103405
Vibhute, A. D., Patil, C. H., Mane, A. V., & Kale, K. V. (2024). Towards detection of network anomalies using machine learning algorithms on the NSL-KDD benchmark datasets. Procedia Computer Science. DOI: https://doi.org/10.1016/j.procs.2024.03.285

This work is licensed under a Creative Commons Attribution 4.0 International License.
All articles published in our journal are licensed under CC-BY 4.0, which permits authors to retain copyright of their work. This license allows for unrestricted use, sharing, and reproduction of the articles, provided that proper credit is given to the original authors and the source.