Journal of Machine and Computing


Cyber Attacks Detection Using Machine Learning Algorithms



Journal of Machine and Computing

Received On : 02 August 2024

Revised On : 27 January 2025

Accepted On : 10 March 2025

Published On : 05 July 2025

Volume 05, Issue 03

Pages : 1322-1330


Abstract


This research focuses on the effect of the genetic algorithm in the improvement of machine learning models for NID by using the CICIDS2022 data set. The routing research problem that has been primarily focused is related to the increase in classification accuracy and the optimization of the cyber security systems using intelligent methods of feature selection along with the tuning of the classification models. We ran Random Forest (RF) and Support Vector Machine (SVM) to assess a better predictive accuracy, precision, recall, and running time on each case. The data set with a total of 15031 instances was used and divided into training and test set with a ratio of 80:20 and the results have been analyzed with standard metrics along with confusion matrix analysis. The results depict that with the application of GA in RF and SVM both the outcomes were `RF with GA scored a higher accuracy of 99.30% when compared to standard RF with 99.27% and without GA in SVM 98.97% while with GA, it increased to 99.00%. Analysis of the confusion matrix showed less disparity in the GA variants of the methods. However, the time taken for the processing was high especially for SVM + GA. The results can be generalized as observing that with GA, accuracy is slightly higher than then obtained with P0 but the computational cost is considerably high. It is deduced that GA with RF is the most efficient optimization model in terms of both performance and efficiency.


Keywords


Intrusion Detection, Genetic Algorithm, Random Forest, Support Vector Machine, CICIDS2022.


  1. N. Gao, L. Gao, Q. Gao, and H. Wang, “An intrusion detection model based on deep belief networks,” Adv. Eng. Forum, vol. 27, pp. 132–141, 2018.
  2. M. A. Al-Garadi, A. Mohamed, A. K. Al-Ali, X. Du, I. Ali, and M. Guizani, “A Survey of Machine and Deep Learning Methods for Internet of Things (IoT) Security,” IEEE Communications Surveys & Tutorials, vol. 22, no. 3, pp. 1646–1685, 2020, doi: 10.1109/comst.2020.2988293.
  3. S. K. Biswas, “Intrusion detection using machine learning: A comparison study,” Int. J. Pure Appl. Math., vol. 118, no. 19, pp. 101–114,2018.
  4. Z. Li, Z. Qin, K. Huang, X. Yang, and S. Ye, “Intrusion Detection Using Convolutional Neural Networks for Representation Learning,” Neural Information Processing, pp. 858–866, 2017, doi: 10.1007/978-3-319-70139-4_87.
  5. A. Khraisat, I. Gondal, P. Vamplew, and J. Kamruzzaman, “Survey of intrusion detection systems: techniques, datasets and challenges,” Cybersecurity, vol. 2, no. 1, Jul. 2019, doi: 10.1186/s42400-019-0038-7.
  6. P. Bedi, N. Gupta, and V. Jindal, “I-SiamIDS: an improved Siam-IDS for handling class imbalance in network-based intrusion detection systems,” Applied Intelligence, vol. 51, no. 2, pp. 1133–1151, Sep. 2020, doi: 10.1007/s10489-020-01886-y.
  7. A. A. Diro and N. Chilamkurti, “Distributed attack detection scheme using deep learning approach for Internet of Things,” Future Generation Computer Systems, vol. 82, pp. 761–768, May 2018, doi: 10.1016/j.future.2017.08.043.
  8. I. Hidayat, M. Z. Ali, and A. Arshad, “Machine Learning-Based Intrusion Detection System: An Experimental Comparison,” Journal of Computational and Cognitive Engineering, vol. 2, no. 2, pp. 88–97, Jul. 2022, doi: 10.47852/bonviewjcce2202270.
  9. M. Hasan, Md. M. Islam, M. I. I. Zarif, and M. M. A. Hashem, “Attack and anomaly detection in IoT sensors in IoT sites using machine learning approaches,” Internet of Things, vol. 7, p. 100059, Sep. 2019, doi: 10.1016/j.iot.2019.100059.
  10. M. Almseidin, M. Alzubi, S. Kovacs, and M. Alkasassbeh, “Evaluation of machine learning algorithms for intrusion detection system,” 2017 IEEE 15th International Symposium on Intelligent Systems and Informatics (SISY), pp. 000277–000282, Sep. 2017, doi: 10.1109/sisy.2017.8080566.
  11. H. Liu and B. Lang, “Machine Learning and Deep Learning Methods for Intrusion Detection Systems: A Survey,” Applied Sciences, vol. 9, no. 20, p. 4396, Oct. 2019, doi: 10.3390/app9204396.
  12. M. A. Ferrag, L. Maglaras, S. Moschoyiannis, and H. Janicke, “Deep learning for cyber security intrusion detection: Approaches, datasets, and comparative study,” Journal of Information Security and Applications, vol. 50, p. 102419, Feb. 2020, doi: 10.1016/j.jisa.2019.102419.
  13. M. A. Azad, S. Bag, and F. Hao, “Machine learning-based intrusion detection for smart home security systems,” IEEE Internet Things J.,vol. 8, no. 23, pp. 16933–16943, 2021.
  14. Y. Hua, “Improved machine learning-based system for intrusion detection,” in Proc. 2024 2nd Int. Conf. Image, Artif. Intell. Appl., vol. 2, no. 1, pp. 126–135, 2024.
  15. J. Kim, J. Kim, H. Kim, M. Shim, and E. Choi, “CNN-Based Network Intrusion Detection against Denial-of-Service Attacks,” Electronics,vol. 9, no. 6, p. 916, Jun. 2020, doi: 10.3390/electronics9060916.
  16. Faizatulhaida Md Isa, Wan Nor Munirah Ariffin, Muhammad Shahar Jusoh, and Erni Puspanantasari Putri, “A Review of Genetic Algorithm: Operations and Applications,” Journal of Advanced Research in Applied Sciences and Engineering Technology, vol. 40, no. 1,pp. 1–34, Feb. 2024, doi: 10.37934/araset.40.1.134.
  17. S. Rathore and J. H. Park, “Semi-supervised learning based distributed attack detection framework for IoT,” Applied Soft Computing, vol.72, pp. 79–89, Nov. 2018, doi: 10.1016/j.asoc.2018.05.049.
  18. V. Kumar, D. Sinha, A. K. Das, S. C. Pandey, and R. T. Goswami, “An integrated rule based intrusion detection system: analysis on UNSW-NB15 data set and the real time online dataset,” Cluster Computing, vol. 23, no. 2, pp. 1397–1418, Oct. 2019, doi: 10.1007/s10586-019-03008-x.
  19. Chi Cheng, Wee Peng Tay, and G.-B. Huang, “Extreme learning machines for intrusion detection,” The 2012 International Joint Conference on Neural Networks (IJCNN), pp. 1–8, Jun. 2012, doi: 10.1109/ijcnn.2012.6252449.
  20. L. Deng, D. Li, X. Yao, and H. Wang, “RETRACTED ARTICLE: Mobile network intrusion detection for IoT system based on transfer learning algorithm,” Cluster Computing, vol. 22, no. S4, pp. 9889–9904, Jan. 2018, doi: 10.1007/s10586-018-1847-2.
  21. S. Potluri and C. Diedrich, “Accelerated deep neural networks for enhanced Intrusion Detection System,” 2016 IEEE 21st International Conference on Emerging Technologies and Factory Automation (ETFA), pp. 1–8, Sep. 2016, doi: 10.1109/etfa.2016.7733515.
  22. T. Alam, S. Qamar, A. Dixit, and M. Benaida, “Genetic Algorithm: Reviews, Implementations, and Applications,” International Journal of Engineering Pedagogy (iJEP), vol. 10, no. 6, p. 57, Dec. 2020, doi: 10.3991/ijep.v10i6.14567.
  23. S. Bhattacharya et al., “A Novel PCA-Firefly Based XGBoost Classification Model for Intrusion Detection in Networks Using GPU,” Electronics, vol. 9, no. 2, p. 219, Jan. 2020, doi: 10.3390/electronics9020219.
  24. K. Jiang, W. Wang, A. Wang, and H. Wu, “Network Intrusion Detection Combined Hybrid Sampling With Deep Hierarchical Network,” IEEE Access, vol. 8, pp. 32464–32476, 2020, doi: 10.1109/access.2020.2973730.
  25. S. Garg, K. Kaur, N. Kumar, and J. J. P. C. Rodrigues, “Hybrid Deep-Learning-Based Anomaly Detection Scheme for Suspicious Flow Detection in SDN: A Social Multimedia Perspective,” IEEE Transactions on Multimedia, vol. 21, no. 3, pp. 566–578, Mar. 2019, doi:10.1109/tmm.2019.2893549.

CRediT Author Statement


The authors confirm contribution to the paper as follows:

Conceptualization: Kottakota Venkata Rao, Anjaneyulu P; Methodology: Kottakota Venkata Rao, Anjaneyulu P and Ravi Kumar T; Writing- Original Draft Preparation: Kottakota Venkata Rao, Anjaneyulu P and Ravi Kumar T; Investigation: Chalapathi Rao Tippana and Jayanthi Rao M; Supervision: Kottakota Venkata Rao, Anjaneyulu P and Ravi Kumar T; Validation: Chalapathi Rao Tippana and Jayanthi Rao M; Writing- Reviewing and Editing: Kottakota Venkata Rao, Anjaneyulu P, Ravi Kumar T, Chalapathi Rao Tippana and Jayanthi Rao M; All authors reviewed the results and approved the final version of the manuscript.


Acknowledgements


Authors thank Reviewers for taking the time and effort necessary to review the manuscript.


Funding


No funding was received to assist with the preparation of this manuscript.


Ethics declarations


Conflict of interest

The authors have no conflicts of interest to declare that are relevant to the content of this article.


Availability of data and materials


Data sharing is not applicable to this article as no new data were created or analysed in this study.


Author information


Contributions

All authors have equal contribution in the paper and all authors have read and agreed to the published version of the manuscript.


Corresponding author


Rights and permissions


Open Access This article is licensed under a Creative Commons Attribution NoDerivs is a more restrictive license. It allows you to redistribute the material commercially or non-commercially but the user cannot make any changes whatsoever to the original, i.e. no derivatives of the original work. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-nd/4.0/


Cite this article


Kottakota Venkata Rao, Anjaneyulu P, Ravi kumar T, Chalapathi Rao Tippana and Jayanthi Rao M, “Cyber Attacks Detection Using Machine Learning Algorithms”, Journal of Machine and Computing, vol.5, no.3, pp. 1322-1330, July 2025, doi: 10.53759/7669/jmc202505104.


Copyright


© 2025 Kottakota Venkata Rao, Anjaneyulu P, Ravi kumar T, Chalapathi Rao Tippana and Jayanthi Rao M. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.