Engineering operations on the wire: download, upload and stop

4 min read188 courses on OnlySecurity

Engineering operations are the S7 messages that change what a PLC does, not just what it reports. They are rare in a healthy plant, which makes them some of the best signals for a defender. This article explains what they look like and how to review them safely.

A program transfer to a PLC is a sequence, not a single packet. The client sends a request download message (function 0x1A) naming the blocks. The PLC responds, then the client sends the block data with download block (0x1B), and finishes with download ended (0x1C). Upload is the mirror: start upload (0x1D), upload (0x1E) and end upload (0x1F). Between those, you may see PI-Service (0x28, program invocation: start, restart, insert or delete a block), which can start or restart the CPU, and PLC stop (0x29), which halts it. Because the sequence has a recognisable order, seeing the middle message without the start is itself informative, since it may mean your capture began mid transfer.

Filtering is straightforward. In tshark you can select by the S7 function field, and Wireshark’s own field names appear in the packet details pane. Right click a field and use Apply as Filter to get the exact name from your build. Do not copy filter names from a blog post without checking them.

For each hit, collect the same facts. The time. The source and destination. The function. The sizes of the transfers, since a large download is a program replacement and a small one may be a single block. The response, since a refusal and an acceptance mean different things. And whether a stop or restart followed.

Context decides the severity. In most sites there is exactly one engineering workstation, and engineering operations should come only from it, within planned maintenance windows. Anything from another address is high priority. Anything from the right address at the wrong time is medium until a change record explains it.

There is also a protective angle. Many PLC families allow access protection with a password, and the older protocol can carry a password exchange. Seeing repeated failed attempts followed by a success tells a different story than a single clean session. The details differ between models, so treat any claim about specific firmware as unconfirmed until you have checked it against the vendor’s documentation.

Do not reproduce these operations to learn them. Reading a capture teaches the structure with no risk. Sending a stop to a live controller halts a process, and even in a lab it is better practised on a simulator you own, such as an open source S7 server library, than on real hardware. OnlySecurity does not host labs. We advise learners to follow the official documentation of the tools they choose and to host their own lab if they want one.

Close your analysis with a short table: operation, time, source, size, outcome, and confidence that it was authorised. That table is the thing you hand to the plant owner.

To practise safely, work from captures you have a right to analyse and keep everything offline. Open a capture, apply a filter for the transfer functions, and read the matching frames one at a time. Note the order of messages and compare with the sequence described above. Then look at what is not there: a download with no preceding connection setup, or an end message with no transfer, tells you about the capture window, not about the plant.

For reporting, separate three claims. The first is that an operation message was present. The second is that the PLC accepted it, which you read from the response. The third is that the program or state changed, which you can rarely prove from the network alone and which needs a before and after comparison from the device or its project. Keep each claim to the evidence that supports it.

Where a defender wants to alert on these operations, the rule is usually simple: flag any transfer or stop function from an address that is not on the engineering list, and flag any such function outside the maintenance window. Test the rule against the baseline for false positives before you rely on it, and record how many packets you tested against.

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

More from this author