Dataset Card for NF-ToN-IoT Network Flow Dataset
Dataset Description
Dataset Summary
NF-ToN-IoT is a network flow dataset derived from IoT network traffic, containing both benign and attack flows. The dataset was created by converting pcap files from the ToN-IoT testbed into NetFlow records, providing labeled data for training network intrusion detection systems.
Size:
Total flows: 11,858,887
Benign samples: 4,270,402 (36.01%)
Scanning samples: 2,646,685 (22.32%)
XSS samples: 1,718,449 (14.49%)
DDOS samples: 1,418,395 (11.96%)
Password samples: 807,604 (6.81%)
DOS samples: 498,905 (4.21%)
Injection samples: 478,894 (4.04%)
Backdoor samples: 11,824 (0.10%)
MITM samples: 5,340 (0.04%)
Ransomware samples: 2,389 (0.02%)
Data Fields
| Field | Type | Description |
|---|---|---|
| IPV4_SRC_ADDR | string | Source IPv4 address |
| L4_SRC_PORT | integer | Source port number |
| IPV4_DST_ADDR | string | Destination IPv4 address |
| L4_DST_PORT | integer | Destination port number |
| PROTOCOL | integer | IP protocol identifier byte |
| L7_PROTO | integer | Layer 7 protocol |
| IN_BYTES | integer | Incoming bytes |
| OUT_BYTES | integer | Outgoing bytes |
| IN_PKTS | integer | Incoming packets |
| OUT_PKTS | integer | Outgoing packets |
| TCP_FLAGS | integer | TCP flags |
| FLOW_DURATION_MILLISECONDS | integer | Flow duration (ms) |
| Label | integer | Binary (0=benign, 1=attack) |
| Attack | string | Attack type or "Benign" |
Attack Types
- DDoS/DoS
- Injection
- Scanning
- Password
- Ransomware
- XSS
- MITM
- Backdoor
Dataset Creation
Preprocessing
- Conversion from pcap to NetFlow records
- Feature extraction and normalization
- Label validation
- Balanced sampling (max 50,000 samples per class for training)
Uses
Intended Uses
- Training network intrusion detection systems
- Network anomaly detection
- Security analysis research
- Benchmarking security tools
Out-of-Scope Uses
- Direct production deployment
- Privacy-sensitive analysis
- Encrypted traffic analysis
- Development of attack tools
Considerations
Limitations
- Limited to specific IoT network configurations
- Controlled testbed environment
- May not represent all attack variants
- Temporal and geographic limitations
Ethical Considerations
- Should not be used for attack development
- Privacy considerations in network analysis
- Responsible vulnerability disclosure needed
Technical Details
Loading Code
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
def load_dataset(path):
df = pd.read_csv(path)
numerical_features = [
'L4_SRC_PORT', 'L4_DST_PORT', 'PROTOCOL', 'L7_PROTO',
'IN_BYTES', 'OUT_BYTES', 'IN_PKTS', 'OUT_PKTS',
'TCP_FLAGS', 'FLOW_DURATION_MILLISECONDS'
]
df[numerical_features] = MinMaxScaler().fit_transform(df[numerical_features])
return df
Distribution
- Format: CSV
- License: [License Information Needed]
- Citation: [Citation Information Needed]
Maintenance
Static dataset with possible future versions to include new attack patterns or IoT devices.