File size: 6,597 Bytes
f38b9b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76f1601
f38b9b5
76f1601
f38b9b5
76f1601
 
 
 
 
f38b9b5
76f1601
 
f38b9b5
 
 
3efcdfb
f38b9b5
76f1601
f38b9b5
76f1601
 
 
 
f38b9b5
 
 
 
 
 
 
76f1601
f38b9b5
 
76f1601
 
 
f38b9b5
76f1601
f38b9b5
76f1601
f38b9b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76f1601
f38b9b5
76f1601
f38b9b5
76f1601
 
f38b9b5
76f1601
 
 
 
 
 
 
 
f38b9b5
76f1601
f38b9b5
 
 
 
 
 
 
76f1601
 
f38b9b5
76f1601
 
 
3efcdfb
 
f38b9b5
 
76f1601
 
f38b9b5
 
 
 
 
 
 
76f1601
3efcdfb
 
 
 
 
 
 
 
f38b9b5
76f1601
f38b9b5
76f1601
f38b9b5
76f1601
f38b9b5
76f1601
f38b9b5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
---
pretty_name: IV-CAN-v1
license: cc-by-4.0
task_categories:
  - tabular-classification
tags:
  - automotive
  - can-bus
  - cybersecurity
  - intrusion-detection
  - time-series
size_categories:
  - 100M<n<1B
viewer: false
---

# IV-CAN-v1

**IV-CAN-v1** is an in-vehicle CAN security dataset produced entirely by the IV-CAN team. It contains 134 case-oriented captures for intrusion detection, attack analysis, cross-domain forwarding inspection, entropy analysis, and message-timing studies.

![Dataset Distribution](statistics/dataset_distribution_pies.svg)

## Highlights

- **License:** [Creative Commons Attribution 4.0 International](LICENSE.md)
- **Trials:** 134
- **CAN frames:** 225,850,423
- **CSV payload size:** 27.45 GB
- **Protocols:** 56,015,108 classical CAN frames and 169,835,315 CAN FD frames
- **Capture duration:** 12h14min
- **Attack-execution trial duration:** 3h9min
- **Attack families:** DoS, fuzzing, replay, spoofing, suspension, and masquerade

## Repository layout

```text
IV-CAN-v1/
├── data/
│   ├── Benign/<case_id>/{data.csv,label.yaml}
│   └── Attack/<attack_type>/<case_id>/{data.csv,label.yaml}
├── analysis/                         # case-level plots and tracing artifacts
├── code/attack_generation/           # self-contained reproducibility snapshot
├── schema/                            # machine-readable schemas
├── statistics/                        # aggregate statistics and figures
├── tools/validate_dataset.py          # lightweight public validator
├── dataset_manifest.csv
├── LICENSE.md
├── SCHEMA.md
└── README.md
```

Each case has a stable public id such as `fuzzing_0001`. The manifest provides all public data and analysis paths. Large CSV files are intentionally not rendered by the Hub viewer; stream them or download selected cases instead.

## Data schema

Every `data.csv` uses this ordered header:

```text
timestamp,can_id,is_extended_id,dlc,data,RX_or_TX,type,is_fd,domain,is_attack,traced_from,uuid,is_traced_attack
```

The normative definitions, units, enums, identifier scope, and tracing constraints are in [SCHEMA.md](SCHEMA.md). Machine-readable definitions are provided in [schema/frame.schema.yaml](schema/frame.schema.yaml) and [schema/label.schema.json](schema/label.schema.json).

Important interpretation rules:

- `timestamp` is Unix epoch time in seconds, expressed on the UTC time scale. The original recorder wall-clock was interpreted in the project acquisition timezone (`Asia/Shanghai`) during conversion.
- `RX` and `TX` are relative to the recording channel: received from or transmitted by that channel.
- PEAK frame types are `DT` (data frame without the combined flags represented below), `FB` (CAN FD with BRS), and `BI` (CAN FD with BRS and ESI). Use `is_fd`, not `DT` alone, to distinguish classical CAN from CAN FD.
- `uuid` is unique only within one case. `traced_from` contains zero or more parent UUIDs from that same case; UUIDs must never be joined across cases.
- `is_attack=true` identifies injected attack frames. A forwarded-only attack-related frame is selected by `is_traced_attack=true AND is_attack=false`; the flags are not declared mutually exclusive.

Run a bounded structural check from the repository root:

```bash
python tools/validate_dataset.py --max-rows 1000
```

Use `--all` to scan every row (this is expensive for the full dataset).

## Labels and trial categories

| Category | Trials |
| --- | ---: |
| Benign | 60 |
| DoS | 22 |
| fuzzing | 28 |
| replay | 12 |
| spoofing | 8 |
| suspension | 2 |
| masquerade | 2 |

Public attack-type names are case-sensitive and normalized exactly as shown. Case ids use lowercase prefixes, for example `dos_0001` and `replay_0001`.

## Attack-generation code

[code/attack_generation](code/attack_generation/) is a curated, self-contained snapshot of the core attack construction logic used for the dataset. It excludes private builder infrastructure and third-party hardware binaries. DoS, fuzzing, replay, and spoofing include frame-generation/execution paths; suspension and masquerade are published as validated experiment plans because their execution requires a two-interface MitM bridge.

The command-line tool defaults to a no-transmit preview. Hardware execution requires two explicit safety flags and an authorized, isolated CAN test bench. See the [code README](code/attack_generation/README.md) for installation, limitations, and tests.

## Collection and attack statistics

| Metric | Value |
| --- | ---: |
| Total trials | 134 |
| Total CAN frames | 225,850,423 |
| Trials with non-driver control | 67 (37 benign; 30 attack) |
| Attack-execution trial duration (primary) | 3h9min |
| Cumulative injection-window duration (supplementary) | 23min |
| `is_attack` frames | 231,477 |
| `is_traced_attack` frames | 42,478 |
| Trials with attack cross-domain forwarding | 23 |

| Domain | Configured name | Protocol | Frames |
| --- | --- | --- | ---: |
| 1 | 驱动CAN | CAN FD | 57,786,350 |
| 2 | 底盘CAN | CAN FD | 64,904,112 |
| 3 | 灯控CAN | Classical CAN | 48,815,343 |
| 4 | 辅助行驶CAN | CAN FD | 47,144,853 |
| 5 | 方向盘CAN | Classical CAN | 7,199,765 |

The primary **attack-execution trial duration** is the sum of the full
`collection_duration_sec` spans of all 74 attack trials (11,388.886 seconds,
reported as 3h9min). It represents the complete driving and observation
context in which attacks were executed. The supplementary **cumulative
injection-window duration** sums `attacking_duration_sec` across those trials
(1,429.850 seconds, reported as 23min); it covers only the configured active
injection windows and excludes the surrounding observation periods.

The attack-effect summary is available in [statistics/attack_effect_counter.md](statistics/attack_effect_counter.md), with additional machine-readable statistics in [statistics/count_csv_result.yaml](statistics/count_csv_result.yaml).

## Responsible use

This dataset and supplementary code are intended for authorized security research, reproducibility, defensive evaluation, and education. Do not use attack-generation functionality on public roads, operational vehicles, or networks you do not own or have explicit permission to test.

## License and attribution

IV-CAN-v1 data, original documentation, schemas, figures, and the original supplementary attack-generation code are released under [CC BY 4.0](LICENSE.md). Attribution is required. Third-party drivers and runtimes are not redistributed and remain subject to their vendors' licenses.