Written and maintained by CASRAI Editorial Board
Published
On this page
UNSW-NB15 is a labelled network-traffic dataset for intrusion detection research, created at UNSW Canberra by combining real modern normal activity with synthetic contemporary attacks. It was generated with an IXIA PerfectStorm traffic generator in the UNSW Canberra Cyber Range Lab, and it is distributed as about 100 GB of raw packet captures plus ready-made CSV files with 49 features and a class label. Because it is a dataset rather than software, using it means choosing the right files, loading them correctly, respecting the licence and citation terms, and knowing its documented weaknesses.
What UNSW-NB15 is used for in research
Researchers use UNSW-NB15 to train and benchmark network intrusion detection systems, usually machine-learning classifiers that separate normal traffic from attacks or assign an attack category. The dataset was built to give a more contemporary mix of normal traffic and attack behaviour than older benchmarks, and the UNSW project page describes it as a hybrid of real modern normal activity and synthetic contemporary attack behaviours. The raw traffic was captured with tcpdump, and features were then extracted with the Argus and Bro-IDS tools; twelve further algorithms were used to generate additional features and the class label.
It is mainly an anomaly-detection resource: the COMIDDS dataset catalogue from Fraunhofer FKIE records that it was collected in 2015, that the network data is labelled while host data is not, and that the capture consists of runs totalling 31 hours (16 hours at one attack per second and 15 hours at ten attacks per second). The data therefore suits studies of flow-level classification and feature selection, but it contains no host-level labels, so it cannot support host-based detection research on its own.
The nine attack categories
Attack records fall into nine categories: Fuzzers, Analysis, Backdoors, DoS, Exploits, Generic, Reconnaissance, Shellcode and Worms. Every record also carries a binary normal-or-attack label, so the same file supports both binary and multi-class experiments. The table below gives the number of records per category in the original data and in the two re-extractions that other groups have published, as reported by the University of New Brunswick Canadian Institute for Cybersecurity (CIC) and the University of Queensland (UQ).
| Class | Original UNSW-NB15 records | CIC-UNSW-NB15 flows | NF-UNSW-NB15 flows |
|---|---|---|---|
| Benign | 2,218,764 | 358,332 | 1,550,712 |
| Fuzzers | 24,246 | 29,613 | 19,463 |
| Analysis | 2,677 | 385 | 1,995 |
| Backdoor | 2,329 | 452 | 1,782 |
| DoS | 16,353 | 4,467 | 5,051 |
| Exploits | 44,525 | 30,951 | 24,736 |
| Generic | 215,481 | 4,632 | 5,570 |
| Reconnaissance | 13,987 | 16,735 | 12,291 |
| Shellcode | 1,511 | 2,102 | 1,365 |
| Worms | 174 | 246 | 153 |
The class imbalance is the first thing to plan for. Worms and Shellcode have a few hundred to a couple of thousand records, while benign traffic and the Generic category run to hundreds of thousands. Any reported accuracy figure should be accompanied by per-class results, not only an overall score.
How to download and access UNSW-NB15
Download the data only from the official UNSW project page, research.unsw.edu.au/projects/unsw-nb15-dataset. The page links to a UNSW SharePoint folder that holds the files, and it carries the terms of use. Its stated terms are that the dataset may be used free of charge in perpetuity for academic research purposes, and that commercial use must be agreed with the authors in advance. If you obtain the data from anywhere else, check it against the file list and record counts below before relying on it.
Which file to load
The official page lists several file groups. Choosing between them is the most common source of confusion, so the practical map is:
- UNSW_NB15_training-set.csv and UNSW_NB15_testing-set.csv: a ready-made partition of the data into a training set of 175,341 records and a testing set of 82,332 records. Use these when you want a standard split that other papers also use.
- UNSW-NB15_1.csv to UNSW-NB15_4.csv: the full set of 2,540,044 records, split across four files. Use these when you need all of the data or want to create your own split. They carry no header row, so take the column names from the features file.
- UNSW-NB15_features.csv: the description of the features, including their names and types.
- UNSW-NB15_GT.csv: the ground-truth file from the IXIA generator.
- UNSW-NB15_LIST_EVENTS.csv: the list of attack events.
- Source files: the raw pcap captures, the Bro and Argus outputs, the CSV files and reports, for teams that want to re-extract their own features.
The raw packet captures total about 100 GB, so plan storage and transfer time accordingly; the CSV files are far smaller and are all most classification studies need.
How to load, split and label UNSW-NB15 step by step
- Download the files you need from the official SharePoint link on the UNSW project page and record the download date and file names in your project notes so the work can be reproduced.
- Decide between the ready-made partition and your own split. For comparability with published work, start from the supplied training and testing files; for a fresh study, concatenate the four part files and split them yourself with a fixed random seed.
- Load the CSV files with the tool of your choice, for example pandas
read_csv. For the four part files, supply the column names from UNSW-NB15_features.csv, because the part files do not include a header row. - Check the row counts against the official figures: 175,341 and 82,332 for the training and testing files, and 2,540,044 in total across the four part files. A mismatch means a truncated download or a modified mirror.
- Identify the label columns. Every record has a binary label (normal or attack) and an attack category; choose the binary label for detection experiments and the category for multi-class experiments.
- Remove identifiers that can leak the answer before training, such as record IDs and any column that encodes the label, and keep the preprocessing code with the paper so others can repeat it.
- Report class counts for every split and per-class results alongside overall metrics.
Treat the preprocessing in step 6 as part of the experiment design rather than a clean-up chore: how identifiers are handled and how the data is split can change reported results, which is why a documented pipeline matters for reproducibility.
How to read the features and labels
The CSV files carry 49 features, which the COMIDDS catalogue groups as 5 flow features, 13 basic features, 8 content features, 9 time features and 12 additional generated features. The authors describe the feature-generation algorithms in chapter 3 of Moustafa’s 2017 thesis, which the UNSW page asks users to cite when they discuss those algorithms.
The labels come from the IXIA PerfectStorm ground truth. Each record has a 0 or 1 label (normal or attack) and, for attacks, one of the nine categories. When you filter on the category, remember that benign records have no attack category, so a multi-class model needs an explicit normal class.
Variants: CIC-UNSW-NB15, NF-UNSW-NB15 and NF-UNSW-NB15-v2
Several groups have re-extracted features from the original captures. They are different datasets with different record counts and feature sets, so a result on one is not directly comparable with a result on another. The data table below compares them side by side.
- CIC-UNSW-NB15 (Canadian Institute for Cybersecurity): features re-extracted from the raw pcap files with CICFlowMeter, with flows labelled by matching the five-tuple against the ground-truth file. The benign class was sampled so that the final data is about 80 percent benign and 20 percent malicious. It is distributed as CICFlowMeter_out.csv, Data.csv, Label.csv and a Readme.txt.
- NF-UNSW-NB15 (University of Queensland): a NetFlow-format version with 8 NetFlow features and 1,623,118 flows, of which 1,550,712 (95.54 percent) are benign and 72,406 (4.46 percent) are attacks.
- NF-UNSW-NB15-v2: an extended NetFlow version with 43 features and 2,390,275 flows, of which 2,295,222 (96.02 percent) are benign and 95,053 (3.98 percent) are attacks.
For the NetFlow versions, the UQ page asks users to cite Sarhan, Layeghy, Moustafa and Portmann (2021), published by Springer; academic use is permitted after citation and commercial use needs an agreement.
Known issues and cautions with UNSW-NB15
The COMIDDS catalogue lists the following shortcomings, which are worth stating in a methods section when you use the data:
- The documentation of the attacks is sparse, and the operating systems involved are not documented.
- The number of machines is overstated in the original paper.
- The ground-truth file is named NUSW-NB15_GT.csv in some distributions, a typo for UNSW-NB15_GT.csv, so check the file name when scripting a download.
- Some records for the SCTP protocol are labelled Fuzzers or Exploits.
- The Bro logs are not labelled.
- Host data is unlabelled, so the dataset is limited to network-based detection.
Add the strong class imbalance to this list. Reporting only accuracy on a dataset where benign traffic is the majority class overstates detector quality, so report per-class precision and recall.
Citing UNSW-NB15 and meeting the licence terms
The official page requires users to cite five papers, including Moustafa and Slay (2015), ‘UNSW-NB15: a comprehensive data set for network intrusion detection systems’, presented at the Military Communications and Information Systems Conference (MilCIS), DOI 10.1109/MilCIS.2015.7348942, and Sarhan et al. (2020) on NetFlow datasets. Take the full list of required citations from the official page rather than from a secondary summary, because it can change. If your study uses the CIC or NetFlow variants, cite the variant’s own publication as well as the original. For general guidance on citing data, see how to cite a dataset; for the licence families commonly used for research data, see Creative Commons licences for research data, noting that UNSW-NB15 uses its own terms rather than a Creative Commons licence. When you publish derived splits or processed files, document them following the practice in datasheets for datasets and keep versions as described in versioning research datasets.
Troubleshooting UNSW-NB15
- Column names are missing or wrong. The four part files have no header row. Take the names from UNSW-NB15_features.csv and assign them when loading.
- Row counts do not match. Compare against 175,341 (training), 82,332 (testing) and 2,540,044 (four part files). A different count usually means a mirror, a truncated download or a different variant.
- Results differ from a paper. Check whether the paper used the supplied training and testing split, the full four-file data or one of the CIC or NetFlow variants, and whether it removed identifier columns.
- Ground-truth file not found. Look for the NUSW-NB15_GT.csv spelling as well as UNSW-NB15_GT.csv.
- The download is very large. The raw pcap files total about 100 GB; download only the CSV files unless you need to re-extract features.
Free alternatives to UNSW-NB15
The related datasets below derive from UNSW-NB15 itself. Each is free for academic use on the terms its publisher states.
| Dataset | Relationship to UNSW-NB15 | Publisher | Use terms stated on its page |
|---|---|---|---|
| CIC-UNSW-NB15 | Re-extraction of flow features with CICFlowMeter from the raw pcaps | Canadian Institute for Cybersecurity, University of New Brunswick | Published on the CIC dataset page |
| NF-UNSW-NB15 | NetFlow version with 8 features | University of Queensland | Academic use after citing Sarhan et al. (2021); commercial use needs an agreement |
| NF-UNSW-NB15-v2 | Extended NetFlow version with 43 features | University of Queensland | Academic use after citing Sarhan et al. (2021); commercial use needs an agreement |
For background on the field this dataset belongs to, see what is cybersecurity.
Sources
- UNSW-NB15 dataset, UNSW Canberra research project page (official; files, features, terms of use and required citations)
- COMIDDS: UNSW-NB15 entry, Fraunhofer FKIE (collection details, feature groups and known issues)
- CIC-UNSW-NB15, Canadian Institute for Cybersecurity, University of New Brunswick
- NetFlow datasets (NF-UNSW-NB15 and NF-UNSW-NB15-v2), University of Queensland
Data: UNSW-NB15 and its re-extracted variants: size, benign share and extraction method
Compares the original UNSW-NB15 data with three published re-extractions (CIC-UNSW-NB15, NF-UNSW-NB15, NF-UNSW-NB15-v2), compiled from the official UNSW page and the pages of the groups that published each variant.
| Variant | Records or flows (records) | Benign share (percent) | Feature extraction | Publisher |
|---|---|---|---|---|
| UNSW-NB15 (original CSV files) | 2540044 | not stated | Argus and Bro-IDS, 49 features | UNSW Canberra |
| CIC-UNSW-NB15 | 447915 | 80 | CICFlowMeter on raw pcaps | Canadian Institute for Cybersecurity |
| NF-UNSW-NB15 | 1623118 | 95.54 | NetFlow, 8 features | University of Queensland |
| NF-UNSW-NB15-v2 | 2390275 | 96.02 | NetFlow, 43 features | University of Queensland |
Sources
- UNSW-NB15 dataset, UNSW Canberra (accessed 2026-11-17)
- CIC-UNSW-NB15, Canadian Institute for Cybersecurity (accessed 2026-11-17)
- NetFlow datasets, University of Queensland (accessed 2026-11-17)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







