Datasets:
File size: 6,692 Bytes
531d912 | 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 | ---
license: cc-by-sa-4.0
pretty_name: HAI loop attacks
tags:
- ics-security
- anomaly-detection
- time-series
- control-loops
size_categories:
- 10K<n<100K
configs:
- config_name: default
data_files: examples.csv.gz
---
# HAI loop attacks: the examples table
This repository holds one table, `examples.csv.gz`. It names 24,132 examples from the HAI
security dataset: 4,022 windows of 300 seconds, each seen through the six control loops of a power
plant testbed and labelled `attack` or `normal`. The TimeNet connector
`icsdataset/hai-loop-attacks`, proposed to [OpenTSLM/TimeNet](https://github.com/OpenTSLM/TimeNet),
downloads this table, pinned by commit and SHA-256, and takes the series from its parent,
`icsdataset/hai`, which holds the HAI data files as published.
The table holds no series values. It says which HAI file, which window, which loop and which of its
series, the label, the split, the flagged seconds of the loop and a short rule-written text.
## Attribution
The table is derived from the **HAI security datasets**, <https://github.com/icsdataset/hai>,
commit `2a814cebc9a66b06c9e5cd545e2d72e65d383737`, by the HAI authors named in that repository.
HAI is licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). Please cite
HAI as its README asks:
- Shin, H.-K., Lee, W., Choi, S., Yun, J.-H., & Min, B.-G. (2023). HAI security datasets.
<https://github.com/icsdataset/hai>
- For HAI 21.03: Shin, H.-K., Lee, W., Yun, J.-H., & Min, B.-G. (2021). Two ICS Security Datasets
and Anomaly Detection Contest on the HIL-Based Augmented ICS Testbed. CSET '21, 36-40.
<https://doi.org/10.1145/3474718.3474719>
- For HAI 20.07: Shin, H.-K., Lee, W., Yun, J.-H., & Kim, H. (2020). HAI 1.0: HIL-Based Augmented
ICS Security Dataset. CSET 20.
What we changed: we read the attack tables of the HAI manual (`hai_dataset_technical_details.pdf`),
fixed entries where the data files disagree with it, mapped the column names of each version to the
22.04 names, cut 300-second windows from the data files, labelled each window once per control
loop from HAI's attack flags, drew splits and a training sample with fixed seeds, and wrote one text
per example by rule.
## Licence
The table is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License,
the same licence as HAI: <https://creativecommons.org/licenses/by-sa/4.0/legalcode>. If you share
the table or something built from it, keep the attribution above and use the same licence.
## Files
| File | What it is |
| --- | --- |
| `examples.csv.gz` | the table: gzip-compressed CSV, UTF-8, one header row, 24,132 data rows |
| `SHA256SUMS` | the SHA-256 of `examples.csv.gz` |
| `LICENSE` | the full text of CC BY-SA 4.0 |
Check the file:
```bash
shasum -a 256 -c SHA256SUMS
```
## Columns
| Column | Meaning |
| --- | --- |
| `example_id` | `<window_id>/<loop>` |
| `window_id` | `<version>/<file>/<start, YYYYmmddTHHMMSS>` |
| `version`, `file` | the HAI version (20.07, 21.03, 22.04, 23.05) and data file, without extension |
| `split` | `train`, `validation` or `test`, by whole file |
| `window_kind`, `anchor` | `attack` or `normal` window; the attack the window was cut around |
| `scored` | one of the six windows of each attack, picked at random, to score per attack |
| `start` | first second of the window, local time as HAI prints it |
| `loop` | the control loop, such as `P1-PC` (boiler pressure) |
| `label` | `attack` when an attack that the HAI manual assigns to this loop is flagged in the window |
| `attack_ids` | the HAI attack ids of this loop in the window, space-separated |
| `loop_uncertain` | the manual names one loop in the scenario and another in the points |
| `attack_start_s`, `attack_end_s` | first and last flagged second, counted from the window start, or -1; the last can lie after the window |
| `attack_runs` | every run of flagged seconds of the loop in the window, as `first-last` pairs, space-separated |
| `no_visible_change` | an attack example whose series show neither a level shift nor a swing change |
| `reacting` | a normal example whose series start or stop swinging when a loop of the same process is attacked |
| `train_use` | the class-balanced training sample |
| `tags`, `roles`, `source_tags` | the loop's series: 22.04 names, roles, and column names in that version |
| `matched_from` | how each column was matched to its 22.04 name: `same_name`, `manual`, `data` or `name` |
| `answer` | the rule-written text, ending in `Answer: attack` or `Answer: normal`; empty for `no_visible_change` |
The flagged seconds come from the flag of the loop's own process (`attack_P1`, `attack_P2` or
`attack_P3`) in 20.07 and 21.03, and from HAI's attack flag in 22.04 and 23.05. The second in
"Change starts near second N" of each attack text is the first flagged second: it comes from HAI's
flag, not from the series.
## Counts
| Split | attack | normal |
| --- | --- | --- |
| train | 819 | 17,817 |
| validation | 144 | 948 |
| test | 491 | 3,913 |
1,454 attack examples hold 1,770 flagged runs. 102 examples are `no_visible_change`, 323 are
`reacting` and 3,850 are `train_use`.
## How the table is made and checked
The pipeline is Night Shift, [vid-t/night-shift](https://github.com/vid-t/night-shift):
`uv run hai-build --table v2`, then `uv run hai-export --table v2`. The table is byte-for-byte
reproducible: every draw uses a fixed seed and the gzip header carries no time stamp. The export
audits the table against the raw HAI files before it finishes: the 17 file hashes, one-second steps,
every label and run against HAI's flags, every run sitting exactly on its flag inside its window, and
every normal window at least 600 s from any flagged second. It also checks every attack against the
pipeline's attack table, which must equal the attack tables of the HAI manual plus the fixes the
pipeline documents. Most fixes are durations, which the manual prints differently from the flags.
## Limits
- The label says which loop the HAI manual says was attacked. It does not check that the attack is
visible in that loop's series.
- The texts come from simple rules and were read against charts for 24 examples only.
- `reacting` is a mark, not a label. Whether a marked loop was pushed by the attack or moved by
chance is not settled.
- 23.05: four of the five boiler targets (`P1_B3004`, `P1_B3005`, `P1_B4002`, `P1_B4022`) are
matched to their 23.05 columns from the data, not from the manual (`matched_from: data`).
- `hai-21.03/train1` and `hai-21.03/test3` hold the same 12 hours of data. 432 train1 and 336 test3
examples lie in them. Both files are in the train split.
|