A GOOSE attack set with per-attack labels: reading a labelled capture set

3 min read188 courses on OnlySecurity

Most public captures say only that an attack happened somewhere. A set with per attack JSON labels, as this one is recorded in our inventory, lets you test your own detector against ground truth rather than your own judgement. That is its main value, and also its main trap.

Start with the labels. Open one JSON label file in a text editor and read its structure before touching the pcap. Work out what a label refers to: a frame number, a timestamp, a time window or a whole file. Work out what the attack names are and how they are defined. Treat anything below as a method rather than a description of the file, and read the schema on the record first.

Load the capture and build a frame table with the fields you will need: tshark -r file.pcap -Y goose -T fields -e frame.number -e frame.time_epoch -e eth.src -e goose.gocbRef -e goose.stNum -e goose.sqNum -e goose.confRev > frames.tsv. Join it to the labels with a small script. Count how many frames are labelled and how many are not. A set where most traffic is normal and a few frames are attacks is realistic, and it also makes accuracy a useless score.

That last point matters for anyone who then trains or tunes a detector. If ninety nine percent of frames are normal, a detector that flags nothing is ninety nine percent accurate. Report precision and recall per attack type instead, and report how many labelled frames your rule found and how many normal frames it flagged. A detector that finds every attack and flags a fifth of normal traffic is not usable, and the counts show it.

Read the labels critically. Check a few attack frames by hand against the label: is the labelled frame the injected one, the first of a burst, or the whole run? Boundaries are where labelled sets disagree with reality, and a detector can be penalised for being more precise than the label.

Compare attack families on structure. Forged frames tend to disturb the counters, the source address or the control block reference, while a flood disturbs the rate. Write one rule for each family and see which ones the labelled data support. Where a family is hard to separate from normal traffic, record that as a finding rather than a failure.

The licence is the friendliest in the group, so a small excerpt with a citation is allowed. Where one of our challenges draws on this set, it is a cited link and readers fetch the set themselves; we cite the authors and the record whenever we mention it. Re-check the licence text on the record before publishing anything derived from it.

Finish by saving your join script, your rules and your result table together with the dataset checksum. Someone else should be able to repeat the run and get the same counts.

One more habit helps when a label file exists. Treat the labels as a second opinion and not as the answer. Run your own detector first without looking at them, write down what it flagged, and only then compare. Where the two disagree, look at the frames by hand and decide who is right. Sometimes the label is coarse, marking a whole window as an attack when only a few frames were forged. Sometimes your rule is wrong. Both outcomes teach something, and the second is more common than learners expect.

Finally, note what the set leaves out. A labelled GOOSE set tells you little about Sampled Values or MMS, and nothing about what the physical process did. Say in your write up which questions the data can support and which it cannot, so that a reader does not apply your numbers beyond where they hold.

For structured practice on this topic, see the OnlySecurity course IEC 61850 Substations II: GOOSE, SV and MMS Attack Analysis.

More from this author