Five shapes of S7 attack on the wire

4 min read188 courses on OnlySecurity

Attacks on S7 control traffic fall into a small number of shapes. Learning the shapes is faster than memorising individual captures.

Shape one, reconnaissance. An unfamiliar host connects on port 102, sets up communication and asks for identification, often through the Userdata message type that reads system status lists. It does not touch process data. On the wire this looks like a short session with a burst of small requests and little repeat. The defender’s question is simply whether this host should talk to this device at all.

Shape two, quiet reading. A host polls process variables at a rate or in an address range that the normal baseline does not contain. The traffic is valid and the PLC answers every time. Nothing is wrong at the protocol level. The signal is entirely in who is asking and how often.

Shape three, engineering operations. Download, upload and stop. These are the dangerous functions because they change or halt the program. They should appear rarely and only from the engineering workstation. A download from an HMI address, or at three in the morning, is a high priority event. Wireshark’s filter on the function code makes these easy to count, and the count is often small enough to read frame by frame.

Shape four, value rewriting. Writes that change setpoints or limits. The packets are well formed and the PLC accepts them. What distinguishes the attack is the value, not the protocol. A write that moves a limit outside its usual range, or turns off a protection bit, only stands out if you know the normal range from the baseline.

Shape five, flooding and fuzzing. Thousands of requests per second, or malformed and truncated messages, aimed at making the device fail. The io,stat graph shows the burst plainly. Look for connection resets and for responses that stop. Fuzzing leaves unusual lengths and function codes that do not parse. Failure of the PLC to answer afterwards is the consequence, and you can see it as a gap in responses.

Two further variants cut across these. Replay repeats a previously captured valid request. It is detectable by identical content and reference numbers appearing at an odd time, but it is hard to prove from one vantage point. Man in the middle alters values in transit. It is only provable with captures from two points, one on each side, which show different values for the same transaction.

For each shape, a good report states the observed fact, the baseline it deviates from, the confidence, and what additional data would raise it. It never states intent. A packet record shows what was sent. It does not show why.

Defensive use only. These descriptions explain how to recognise the activity in captures. Do not run any of it against a system you do not own and are not authorised to test.

A compact way to apply the shapes is a triage grid. List the five shapes down one side and, across the top, the evidence you would expect in a capture: who connected, which functions appeared, what the rate was, what the values were and what the device did afterwards. Fill each cell for the capture in front of you. A capture that fills several rows may hold more than one activity, which is common, since reconnaissance usually precedes the rest.

The grid also stops you stopping early. Finding a flood is satisfying, but a flood can be a distraction or a stress test that sits beside something quieter. After you identify the loudest event, return to the grid and check the other four rows.

Rank your findings by consequence for the process, not by how dramatic they look. A single write that changes a safety limit usually matters more than ten thousand harmless reads. Give each finding a plain statement, one line of evidence and one line of what you could not determine. That format is short enough to read quickly and honest enough to defend.

For structured practice on this topic, see the OnlySecurity course Siemens S7comm and S7comm-plus Traffic Analysis.

More from this author