Datasets:
metadata
language:
- en
license: cc-by-4.0
size_categories:
- 1M<n<10M
task_categories:
- tabular-classification
tags:
- network-intrusion-detection
- cybersecurity
- CICIDS2017
- IDS
- binary-classification
pretty_name: CICIDS2017 Network Intrusion Detection
configs:
- config_name: temporal_3way
data_files:
- split: train
path: temporal_3way/train-*
- split: test
path: temporal_3way/test-*
- split: validation
path: temporal_3way/validation-*
default: true
- config_name: random_3way
data_files:
- split: train
path: random_3way/train-*
- split: test
path: random_3way/test-*
- split: validation
path: random_3way/validation-*
- config_name: temporal
data_files:
- split: train
path: temporal/train-*
- split: test
path: temporal/test-*
- config_name: standard
data_files:
- split: train
path: temporal/train-*
- split: test
path: temporal/test-*
- config_name: random
data_files:
- split: train
path: random/train-*
- split: test
path: random/test-*
CICIDS2017 Network Intrusion Detection Dataset
The CICIDS2017 dataset from the Canadian Institute for Cybersecurity, provided with temporal and random splits for fair evaluation.
Configurations
temporal (default) — Day-Based Temporal Split
Note:
standardis an alias fortemporal— both load the same data.
Train on Monday-Thursday, test on Friday. The model must generalize to unseen attack types (DDoS, Botnet, PortScan).
from datasets import load_dataset
ds = load_dataset("lacg030175/CICIDS2017", "temporal") # or "standard"
# ds["train"]: 2,125,158 rows (Mon-Thu)
# ds["test"]: 702,718 rows (Friday)
Train attacks: 267,771 / 2,125,158 (12.6%) Test attacks: 288,785 / 702,718 (41.1%)
random — Stratified Random Split
80/20 stratified random split from all days combined.
ds = load_dataset("lacg030175/CICIDS2017", "random")
# ds["train"]: 2,262,300 rows
# ds["test"]: 565,576 rows
Top-20 RF Features
- Bwd Packet Length Std
- Destination Port
- Packet Length Std
- Bwd Packet Length Max
- Avg Bwd Segment Size
- Bwd Packet Length Mean
- Fwd IAT Std
- Average Packet Size
- Packet Length Variance
- Flow IAT Max
- Packet Length Mean
- Init_Win_bytes_forward
- Idle Min
- Idle Mean
- Fwd IAT Max
- Flow IAT Std
- Flow Packets/s
- Flow IAT Mean
- Fwd Header Length
- Bwd Header Length
Attack Types
| Day | Attack Types |
|---|---|
| Monday | Benign only |
| Tuesday | FTP-Patator, SSH-Patator |
| Wednesday | DoS Hulk, DoS GoldenEye, DoS Slowhttptest, DoS slowloris, Heartbleed |
| Thursday | Web Attack (Brute Force, XSS, SQL Injection), Infiltration |
| Friday (test) | Bot, DDoS, PortScan |
Labels
- Binary (
label): 0 = BENIGN, 1 = Attack - Multi-class (
Label): 15 categories (BENIGN + 14 attack types)
Features
78 numeric flow-level features extracted by CICFlowMeter.
Preprocessing
- Removed rows with NaN/infinity values
- Stripped whitespace from column names and labels
- All features converted to numeric (float64)
- Added binary
labelcolumn (0=BENIGN, 1=Attack)
Citation
@inproceedings{sharafaldin2018toward,
title={Toward Generating a New Intrusion Detection Dataset and Intrusion Traffic Characterization},
author={Sharafaldin, Iman and Lashkari, Arash Habibi and Ghorbani, Ali A},
booktitle={International Conference on Information Systems Security and Privacy},
year={2018}
}
License
CC BY 4.0 — original dataset by the Canadian Institute for Cybersecurity, University of New Brunswick.