--- license: cc-by-sa-4.0 pretty_name: HAI loop attacks tags: - ics-security - anomaly-detection - time-series - control-loops size_categories: - 10K, 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. - 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. - 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: . 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` | `//` | | `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.