Network intrusion detection requires the identification of malicious traffic while maintaining the ability to observe unusual network behavior. This paper presents Dynamic Cybersecurity Sentinel, a network monitoring and intrusion detection system that combines supervised machine learning with behavioral anomaly detection. The system uses the UNSW-NB15 dataset for the development and evaluation of its classification component. An XGBoost-based classifier is used to categorize network traffic into Normal, Reconnaissance, Exploits, and Generic classes. In addition to classification, the system incorporates Isolation Forest for behavioral anomaly detection. The live monitoring part uses the Scapy library to catch network packets, which are then turned into network flows before extracting and analyzing features. The information from this process goes through baseline calibration, risk and severity evaluation, recommendation for responses, storing alerts, and showing results on a dashboard. The system was built in two steps, starting with a structured CSV-based setup and moving on to real-time network traffic monitoring. Testing the final XGBoost classifier showed an accuracy of 75.00%, weighted precision of 0.83, weighted recall of 0.75, and weighted F1-score of 0.77.The live version was tested using traffic from several connected computers. The results show how classification, behavior analysis, risk assessment, alert creation, and visualization work together in one network security monitoring system
Introduction
The proposed system, “Dynamic Cybersecurity Sentinel,” is a machine-learning-based Network Intrusion Detection System (NIDS) designed to monitor network traffic and identify potential cyber threats, unauthorized access, and unusual network activities. It combines two machine-learning techniques: XGBoost for supervised attack classification and Isolation Forest for behavioral anomaly detection.
The system uses the UNSW-NB15 dataset to train and evaluate the classification model. It identifies four traffic categories: Normal, Reconnaissance, Exploits, and Generic. For live network monitoring, Scapy captures network packets, and a flow builder converts them into a 42-feature network-flow representation.
The system has two versions:
Version 1 (V1): Processes offline CSV files, performs preprocessing, and analyzes network traffic using the machine-learning engine.
Version 2 (V2): Monitors live network traffic, captures packets, generates network flows, and performs real-time threat analysis.
Both versions use the same machine-learning engine. Version 2 additionally performs baseline calibration using a threshold of 3.0, calculates a risk score between 0 and 100, assigns threat severity levels, suggests response actions, and stores alerts in alerts.json. A Flask dashboard provides live monitoring and visualization.
Advantages
Attack Classification: Uses XGBoost to identify different categories of network traffic and attacks.
Anomaly Detection: Uses Isolation Forest to detect unusual network behavior.
Real-Time Monitoring: Captures and analyzes live network traffic using Scapy.
Dual Input Support: Supports both offline CSV files and live network traffic.
Risk Assessment: Generates risk scores from 0 to 100 to evaluate potential threats.
Automated Alerting: Stores detected alerts and suggests appropriate response actions.
Visual Monitoring: Uses a Flask dashboard to display network security information.
Hybrid Detection: Combines supervised classification and unsupervised anomaly detection for better network monitoring.
Related Work
The project is based on existing research in network intrusion detection, machine learning, anomaly detection, and cybersecurity datasets.
UNSW-NB15 Dataset: Provides normal and simulated attack traffic for training and evaluating intrusion detection models.
XGBoost: Used for supervised classification of network traffic into predefined categories.
Isolation Forest: Detects unusual network behavior without depending entirely on predefined attack labels.
Deep Learning Research: Previous studies have explored autoencoders and deep-learning-based intrusion detection, but these methods are not implemented in the proposed system.
System Design and Methodology
The proposed architecture consists of two input paths that connect to a common machine-learning engine.
Data Input: Accepts offline CSV files or captures live network packets.
Preprocessing: Cleans data, performs one-hot encoding, and aligns network features.
Packet Capture: Uses Scapy to capture live network packets.
Flow Generation: Converts captured packets into 42 network-flow features.
Machine Learning Analysis: Uses XGBoost for attack classification and Isolation Forest for anomaly detection.
Risk Assessment: Applies baseline calibration and generates a risk score between 0 and 100.
Alert Generation: Assigns severity levels and recommends response actions.
Alert Storage: Saves security alerts in alerts.json.
Dashboard Monitoring: Uses Flask to display live network activity and security alerts.
Conclusion
This paper introduces Dynamic Cybersecurity Sentinel, a system that detects network intrusions and analyzes behavioral anomalies. It combines supervised classification with anomaly detection and real-time network monitoring. The system uses the UNSW-NB15 dataset for classification, XGBoost for identifying attacks, and Isolation Forest for detecting unusual behavior. The live V2 version captures packets using Scapy and builds a network flow with 42 features.
The system\'s architecture supports both a CSV-based V1 path and a live V2 path through a shared machine learning engine. The V2 path includes baseline calibration with a threshold of 3.0, generates a risk score from 0 to 100 and a severity level, suggests response actions, stores alerts in alerts.json, and displays the monitoring status via a Flask dashboard.
The final XGBoost evaluation achieved 75.00% accuracy, 0.83 weighted precision, 0.75 weighted recall, and 0.77 weighted F1-score.A live multi-computer experiment demonstrated the workflow from packet capture to flow construction, analysis, alerting, and dashboard monitoring. The results show that the implemented system provides an integrated framework for the project\'s intended network monitoring workflow and also highlights areas where further evaluation and model improvement can be done.
References
[1] N. Moustafa and J. Slay, “UNSW-NB15: A comprehensive data set for network intrusion detection systems (UNSW-NB15 network data set),” in Proc. Military Communications and Information Systems Conf. (MilCIS), Canberra, ACT, Australia, 2015, pp. 1–6, doi: 10.1109/MilCIS.2015.7348942.
[2] F. Carrera, V. Dentamaro, S. Galantucci, A. Iannacone, D. Impedovo, and G. Pirlo, “Combining unsupervised approaches for near real-time network traffic anomaly detection,” Applied Sciences, vol. 12, no. 3, Art. no. 1759, 2022, doi: 10.3390/app12031759.
[3] N. Yoshimura, H. Kuzuno, Y. Shiraishi, and M. Morii, “DOC-IDS: A deep learning-based method for feature extraction and anomaly detection in network traffic,” Sensors, vol. 22, no. 12, Art. no. 4405, 2022, doi: 10.3390/s22124405.
[4] A. Almeida, L. Gonçalves, C. Zanchettin, and B. L. D. Bezerra, “A semi-supervised autoencoder approach for efficient intrusion detection in network traffic,” in Proc. IEEE Latin American Conf. Computational Intelligence (LA-CCI), Recife, Brazil, 2023, pp. 1–6, doi: 10.1109/LA-CCI58595.2023.10409491.
[5] F. Moomtaheen, S. S. Bagui, S. C. Bagui, and D. Mink, “Extended Isolation Forest for intrusion detection in Zeek data,” Information, vol. 15, no. 7, Art. no. 404, 2024, doi: 10.3390/info15070404.
[6] R. N. Clottey, W. Yaokumah, and J. K. Appati, “Modelling and evaluation of network intrusion detection systems using machine learning techniques,” International Journal of Intelligent Information Technologies, vol. 17, no. 4, pp. 1–19, 2021, doi: 10.4018/IJIIT.289971.
[7] T. Chen and C. Guestrin, “XGBoost: A scalable tree boosting system,” in Proc. 22nd ACM SIGKDD Int. Conf. Knowledge Discovery and Data Mining, San Francisco, CA, USA, 2016, pp. 785–794, doi: 10.1145/2939672.2939785.
[8] F. T. Liu, K. M. Ting, and Z.-H. Zhou, “Isolation Forest,” in Proc. 8th IEEE Int. Conf. Data Mining, Pisa, Italy, 2008, pp. 413–422, doi: 10.1109/ICDM.2008.17.
[9] M. Ring, S. Wunderlich, D. Scheuring, D. Landes, and A. Hotho, “A survey of network-based intrusion detection data sets,” Computers & Security, vol. 86, pp. 147–167, 2019, doi: 10.1016/j.cose.2019.06.005.
[10] A. 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.
[11] A. 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.
[12] S. Gamage and J. Samarabandu, “Deep learning methods in network intrusion detection: A survey and an objective comparison,” Journal of Network and Computer Applications, vol. 169, Art. no. 102767, 2020, doi: 10.1016/j.jnca.2020.102767.
[13] P. Casas, J. Mazel, and P. Owezarski, “Unsupervised network intrusion detection systems: Detecting the unknown without knowledge,” Computer Communications, vol. 35, no. 7, pp. 772–783, 2012, doi: 10.1016/j.comcom.2012.01.016.
[14] A. Sperotto, G. Schaffrath, R. Sadre, C. Morariu, A. Pras, and B. Stiller, “An overview of IP flow-based intrusion detection,” IEEE Communications Surveys & Tutorials, vol. 12, no. 3, pp. 343–356, 2010, doi: 10.1109/SURV.2010.032210.00054.
[15] A. Shiravi, H. Shiravi, M. Tavallaee, and A. A. Ghorbani, “Toward developing a systematic approach to generate benchmark datasets for intrusion detection,” Computers & Security, vol. 31, no. 3, pp. 357–374, 2012, doi: 10.1016/j.cose.2011.12.012.
[16] I. Sharafaldin, A. H. Lashkari, and A. A. Ghorbani, “Toward generating a new intrusion detection dataset and intrusion traffic characterization,” in Proc. 4th Int. Conf. Information Systems Security and Privacy (ICISSP), Funchal, Portugal, 2018, pp. 108–116, doi: 10.5220/0006639801080116.
[17] S. Moualla, K. Khorzom, and A. Jafar, “Improving the performance of machine learning-based network intrusion detection systems on the UNSW-NB15 dataset,” Computational Intelligence and Neuroscience, vol. 2021, Art. no. 5557577, 2021, doi: 10.1155/2021/5557577.
[18] S. More, M. Idrissi, H. Mahmoud, and A. T. Asyhari, “Enhanced intrusion detection systems performance with UNSW-NB15 data analysis,” Algorithms, vol. 17, no. 2, Art. no. 64, 2024, doi: 10.3390/a17020064.
[19] M. H. Bhuyan, D. K. Bhattacharyya, and J. K. Kalita, “Network anomaly detection: Methods, systems and tools,” IEEE Communications Surveys & Tutorials, vol. 16, no. 1, pp. 303–336, 2014, doi: 10.1109/SURV.2013.052213.00046.
[20] A. Aldweesh, A. Derhab, and A. Z. Emam, “Deep learning approaches for anomaly-based intrusion detection systems: A survey, taxonomy, and open issues,” Knowledge-Based Systems, vol. 189, Art. no. 105124, 2020, doi: 10.1016/j.knosys.2019.105124.