Source-linked AI summary
5G-NIDD: A Comprehensive Network Intrusion Detection Dataset Generated over 5G Wireless Network
Sehan Samarakoon, Yushan Siriwardhana, Pawani Porambage, Madhusanka Liyanage, Sang-Yoon Chang, Jinoh Kim, Jonghyun Kim, Mika Ylianttila
TL;DR
5G’s complexity and intelligent attacks expose limitations in conventional reactive security, motivating datasets from realistic network environments. This paper introduces the fully labeled 5G-NIDD dataset from a functional 5G test network and evaluates it with common ML models, which generally perform well for binary and multiclass intrusion classification.
Problem
5G complexity and AI-enabled attacks create a need for intelligent security data, while existing datasets often rely on virtualized, simulated, or temporary networks rather than realistic 5G environments.
Method
The paper constructs and publishes 5G-NIDD from a functional 5G test network, capturing labeled attack and real-user benign traffic, then analyzes it with common ML models.
Results
Common ML models generally achieve very good performance on binary and multiclass intrusion classification, with Naive Bayes performing poorly and model strengths varying across attack types.
Takeaways & Limitations
5G-NIDD provides a realistic, fully labeled resource for testing intrusion-detection algorithms, including multiclass methods and analyses using traffic separated by base station.
Takeaways & Limitations
Public datasets from real mobile network operators remain scarce, and future work should address adversarial training and evasion attacks against intrusion detectors.
Abstract
from arXiv · showhide
With a plethora of new connections, features, and services introduced, the 5th generation (5G) wireless technology reflects the development of mobile communication networks and is here to stay for the next decade. The multitude of services and technologies that 5G incorporates have made modern communication networks very complex and sophisticated in nature. This complexity along with the incorporation of Machine Learning (ML) and Artificial Intelligence (AI) provides the opportunity for the attackers to launch intelligent attacks against the network and network devices. These attacks often traverse undetected due to the lack of intelligent security mechanisms to counter these threats. Therefore, the implementation of real-time, proactive, and self-adaptive security mechanisms throughout the network would be an integral part of 5G as well as future communication systems. Therefore, large amounts of data collected from real networks will play an important role in the training of AI/ML models to identify and detect malicious content in network traffic. This work presents 5G-NIDD, a fully labeled dataset built on a functional 5G test network that can be used by those who develop and test AI/ML solutions. The work further analyses the collected data using common ML models and shows the achieved accuracy levels.
I. INTRODUCTION
5G complexity and intelligent attacks create a need for proactive, self-adaptive security, but effective AI-based intrusion detection is hindered by scarce, outdated, and insufficiently realistic datasets. The paper addresses this gap by introducing and evaluating 5G-NIDD, a labeled dataset generated from a functional 5G test network.
- 5G networks combine heterogeneity, large device populations, substantial data generation, and increasingly complex services.
- Reactive security approaches are insufficient against intelligent attacks, motivating proactive, self-aware, and self-adaptive security mechanisms.
- Supervised AI-based security research is constrained by scarce datasets that represent complex 5G network behavior, while many public datasets are outdated or have limited applicability.
- 5G-NIDD is a labeled dataset generated from a fully functional 5G test network, incorporating 5G network-flow features and nine intrusion types with benign traffic.
- The paper evaluates 5G-NIDD with multiple machine-learning techniques and reports accuracy levels and dataset validity for network intrusion detection.
C. Existing Datasets
Existing intrusion-detection datasets often contain artificial traffic, redundancy, limited diversity, anonymization, or weak representation of real-world conditions. 5G-NIDD is positioned as a dataset generated in a real 5G test environment to address these limitations.
- Prior intrusion-detection datasets have been criticized for artificial traffic, redundancy, limited diversity, anonymized content, and insufficient real-world conditions.
- 5G and beyond network behavior differs substantially from the testbeds or simulation platforms used for many existing datasets.
- Few publicly available datasets originate from real mobile-network-operator networks, limiting direct representation of operational 5G behavior.
- The dataset-generation environment uses the University of Oulu site of 5GTN, an open test environment supporting 5G and beyond technology research.
- The testbed supplements 5GTN with base stations, switching equipment, and network interfaces for data collection.
3) Attacker Preparation:
The testbed places attacker nodes and a target in distinct network locations so attacks traverse the 5G network, while benign traffic comes from real mobile devices. The study focuses mainly on DoS and port-scan variants.
- Attacker Preparation:: Attackers use Raspberry Pi 4 devices running Ubuntu and connect through 5G modems to the pico base stations.
- Victim Placement:: The victim is an Ubuntu server in the MEC, separating attackers and target networks so attack traffic traverses the 5G network.
- Benign Traffic Generation: Real mobile devices generate benign HTTP, HTTPS, SSH, and SFTP traffic rather than simulated benign traffic.
- Attack Scenarios: The dataset-generation study evaluates several variants of DoS and port-scan attacks.
- Attack Scenarios: DoS scenarios cover volume-based, protocol-based, and application-layer attack categories.
2) UDP Flood:
UDP flooding sends high-rate UDP traffic toward a target, potentially making the system nonresponsive; the study used Hping3 for this attack.
- 2) UDP Flood:: UDP floods send packets at a high rate, exploiting UDP’s connectionless operation to generate large traffic volumes.When the target receives and responds to many packets, the system can eventually become nonresponsive.
B. Port Scans
Port scans probe targeted ports and interpret responses to identify open, closed, or filtered services. The study used SYN, TCP connect, and UDP scanning techniques with Nmap.
- B. Port Scans: Port scans send requests to targeted port ranges and use responses to determine port status and sometimes infer the target operating system.They commonly precede attacks by identifying exploitable hosts and services.
- B. Port Scans: SYN scans partially perform the TCP handshake, making them faster while distinguishing open, closed, and filtered ports from response packets.The study performed SYN scans with Nmap.
- B. Port Scans: TCP connect scans complete the three-way handshake, taking longer than SYN scans but potentially requiring fewer privileges.The study used Nmap to execute TCP connect scans.
- B. Port Scans: UDP scans classify ports using responses or nonresponses to UDP datagrams, with ICMP port-unreachable errors indicating closed ports.The study conducted UDP scans with Nmap.
V. DATA COLLECTION AND PROCESSING
The study collected attack and benign traffic across two 5G base stations, then removed protocol encapsulation, converted packets into flows, and extracted features for machine-learning use.
- V. DATA COLLECTION AND PROCESSING: Attack and benign traffic were captured across two base stations using scheduled port-scan and DoS sessions.Port-scan sessions lasted 10 minutes, while DoS sessions lasted 30 minutes with 10-minute attack periods and a 5-minute overlap.
- V. DATA COLLECTION AND PROCESSING: The collection produced 18 pcap files containing 8 hours of captured traffic before post-processing.Post-processing was required before feeding the data into ML models.
- V. DATA COLLECTION AND PROCESSING: Because capture occurred at the base-station radio interface, packets contained a GTP-U layer that was removed with Tracewrangler.The authors identify radio-interface capture as novel compared with other datasets.
- V. DATA COLLECTION AND PROCESSING: Packet traffic was converted into network flows because packet-level processing can be time-consuming and flow analysis can capture attacks spanning multiple packets.Flow conversion also reduced total data volume for detection-stage processing.
- V. DATA COLLECTION AND PROCESSING: Argus generated 112 features per flow, including addresses, ports, protocol, packet size, and packet count.These features were generated during conversion from packet-based to flow-based data.
3) Aggregation of data and labelling:
The authors labeled flow records, aggregated data by base station, encoded categorical values, and selected features through correlation filtering and ANOVA F-scores for binary and multiclass classification.
- 3) Aggregation of data and labelling:: Flow data were labeled as benign or attack traffic, with a separate label assigned to each attack.This labeling supports supervised-learning use of the dataset.
- 3) Aggregation of data and labelling:: The two base-station datasets were aggregated into a combined dataset containing 1,215,890 flows.Separate per-base-station datasets remained available if needed.
- 3) Aggregation of data and labelling:: Categorical features were converted into numerical variables using one-hot encoding.The encoding represents category membership with binary values.
- 3) Aggregation of data and labelling:: Feature selection reduced irrelevant, redundant, and computationally costly inputs before ML training.The authors used a model-independent filter method to preserve generality across ML models.
- 3) Aggregation of data and labelling:: The authors removed null, constant, and identifying address or port features before statistical filtering.Addresses and ports were removed to maintain the generality of the intrusion-detection system.
- 1) Pearson Correlation:: Pairs with absolute Pearson correlation above 0.90 were treated as highly correlated, and one feature was removed from each pair.The feature with lower correlation to the target variable was eliminated.
- 3) Aggregation of data and labelling:: ANOVA F-scores ranked remaining features against the target, producing the top 25 features for both binary and multiclass classification.The same feature-ranking procedure was applied to both classification settings.
D. Data normalization
The study applies Z-score normalization to rescale dataset features before machine-learning training, producing zero mean and unit variance so larger values do not dominate.
- D. Data normalization: Data normalization adjusts values to a predetermined common range before ML training, reducing the influence of larger-valued features.The authors identify reduced training time as a valuable efficiency metric and describe normalization as helping reduce training times.
- D. Data normalization: The dataset file description is provided in Table VII.
- D. Data normalization: Z-score normalization rescales the data using the dataset mean and standard deviation.The resulting normalized data have zero mean and unit variance.
E. File description
The dataset is distributed in packet-based and flow-based formats, with separate and combined files, and the analysis evaluates ML models using standard classification metrics and confusion matrices.
- E. File description: 5G-NIDD provides packet-based pcapng files and flow-based argus and CSV files, including separate base-station data and a combined dataset.The packet-based files remove the GTP layer, and flow-based CSV files from both base stations are concatenated for the combined dataset.
- E. File description: The study evaluates models using confusion matrix, accuracy, precision, and F1-score.
- E. File description: In binary and multiclass confusion matrices, rows represent predicted classes and columns represent actual classes.
- E. File description: Binary-classification accuracy is the ratio of correctly classified samples to all samples.The binary formula uses TP, TN, FP, and FN.
- E. File description: Precision is the ratio of true positives to all predicted positive values.For multiclass classification, precision for a class uses that class’s true positives and predicted positives across all classes.
4) Recall:
Recall measures the proportion of actual positives correctly classified, while the study evaluates several classifiers after hyperparameter tuning and considers their classification behavior.
- 4) Recall:: Recall is the ratio of correctly classified positive samples to all actual positive samples.In multiclass classification, recall is calculated per class using correct predictions and actual samples for that class.
- 4) Recall:: The study uses Decision Tree, Random Forest, KNN, Naive Bayes, and MLP models to obtain performance metrics.Training and prediction times are also considered, and Grid search tunes hyperparameters before model execution.
- 4) Recall:: Decision trees classify samples through decision nodes, branches, and leaves based on test attributes.
- 4) Recall:: Random Forest combines predictions from multiple decision trees through voting.Using more trees reduces errors, while the method addresses decision-tree overfitting and tolerates noise and outliers.
- 4) Recall:: KNN assigns an unlabeled point to a category based on its nearest neighbors.The number of neighbors is configurable, and KNN is presented as a benchmark for other classifiers based on accuracy.
- 4) Recall:: Naive Bayes assumes attribute values are conditionally independent given a target value.Despite being simple, it can perform well with high-dimensional input data.
5) Multi Layer Perceptron:
The study uses a three-hidden-layer MLP within binary and multiclass evaluations of 5G-NIDD. Across the reported models, MLP is marginally ahead in multiclass accuracy, while Random Forest and Decision Tree show distinct binary error advantages.
- 5) Multi Layer Perceptron:: MLP is a fully connected feed-forward neural network whose performance depends mainly on hidden layers and neurons per layer.
- 5) Multi Layer Perceptron:: The implemented MLP has 3 hidden layers containing 10, 20, and 10 neurons.
- 5) Multi Layer Perceptron:: Binary classification distinguishes malicious flows from benign flows using a 70%/30% train-test split and the top 10 features.Experiments with 5, 10, 15, 20, and 25 selected features were repeated 10 times, with averages reported.
- 5) Multi Layer Perceptron:: Multiclass classification detects nine attack types plus benign traffic using the same 70:30 train-test split.Among the tested feature counts, the top 10 features provided greater accuracy with acceptable training and prediction times.
- 5) Multi Layer Perceptron:: Random Forest identifies malicious traffic with the fewest false negatives, while Decision Tree produces the fewest false positives in binary classification.
- 5) Multi Layer Perceptron:: Naive Bayes trains fastest, MLP requires relatively more training time, and KNN has substantially higher prediction time than training.
- 5) Multi Layer Perceptron:: MLP achieves marginally higher overall accuracy than the other models in multiclass classification.Naive Bayes performs poorly, while the other models perform at nearly similar accuracy levels.
- 5) Multi Layer Perceptron:: UDP flood and UDP scan flows are often classified as benign, and HTTP flood flows are commonly confused with Slowrate DoS flows.
VII. DISCUSSIONS ABOUT POTENTIAL FUTURE WORK AND FURTHER USAGES OF TESTBED AND DATASET
The testbed and 5G-NIDD support broader distributed-defense, federated-learning, and adversarial-ML studies, while the dataset already offers labeled, realistic traffic for classification evaluation.
- Distributed Detection: Distributed attack and defense across multiple network locations could enable federated-learning experiments and joint defense evaluation.The current setup uses two attack sources and two base stations; extending defense across more nodes could increase detection information and mitigation coverage.
- Dynamic Labeling: Dynamic labeling based on performance degradation at base stations or legitimate users is proposed as an alternative to ground-truth labeling.The proposal targets disruptions caused by DoS threats, including denied or degraded availability.
- Adversarial Machine Learning: Adversarial machine learning could extend the testbed by simulating training-data tampering, changing attacker behavior, and evasion attacks.The proposed future work includes both creating and detecting evasion attacks using adversarial ML techniques.
- Dataset Usage: 5G-NIDD provides fully labeled flows containing attack types and attacking tools, supporting multiclass classification studies.The dataset includes complete functional-network traffic and labels each flow as malicious or benign with additional attack metadata.
- Dataset Usage: 1,215,890 network flows are available in aggregate and as separate base-station datasets, supporting distributed and federated-learning research.The separated datasets provide traffic views from different network points.
- Dataset Evaluation: The dataset produces results in binary and multiclass classification with multiple ML models, supporting evaluation of novel intrusion-detection algorithms.The reported performance metrics are presented as evidence that 5G-NIDD is a valid resource for multiclass classification research.