LearnSCADA

Part IV · Chapter 18

Security Considerations

Modbus was born in 1979 on an isolated wire, where security was the locked door of the control room. The protocol has no security of its own, so the responsibility falls entirely on the network around it.

By the end of this chapter you can

  • State plainly what Modbus does not protect: authentication, encryption, tampering.
  • Name the five concrete threats and which one is gravest.
  • Lay out defense in depth: segmentation, firewall allowlisting, VPNs, and monitoring.
  • Explain read-only gateways and data diodes, and where Modbus/TCP Security fits.

What the protocol does not provide

Be blunt about this, because assuming protection that isn't there is how systems get hurt.

  • No authentication. No users, passwords, or keys. Any client that can reach a device is treated as fully authorized to read everything and, crucially, to write everything, including switching outputs on and off.
  • No encryption. Every frame travels in plain view. Anyone who can watch the network can read all the data and learn the entire register map.
  • No tamper protection. The RTU CRC catches accidental corruption, not deliberate changes: an attacker who alters a frame simply recomputes the CRC. (Modbus TCP has no CRC at all, and TCP's own checksum is just as easy to recompute.)
What Modbus lacks. An operator sends write single coil, pump OFF: 01 05 00 00 00 00 CD CA. An attacker in the path rewrites it to 01 05 00 00 FF 00 and recomputes the CRC as 8C 3A. The device checks the CRC, finds it valid, and turns the pump ON. Badges read: no authentication, no encryption, no tamper protection. ✗ no authentication ✗ no encryption ✗ no tamper protection Operator "stop pump" Attacker in the path Pump server 1 sent: 01 05 00 00 00 00 CD CA (coil 0 OFF) arrives: 01 05 00 00 FF 00 8C 3A (coil 0 ON) CRC checks out ✓ → the pump starts. The CRC proves nothing about who sent it. OFF ON
Figure 18.1 What Modbus lacks. There's no authentication (any reachable client is trusted), no encryption (all traffic is readable), and no defense against deliberate tampering. Security must come from outside the protocol.

The blunt summary: if something can reach a Modbus device, it can control that device. There's no second line of defense inside the protocol. That isn't a flaw to fix so much as a property to design around, like a household outlet that powers anything plugged into it. The outlet isn't "insecure"; you simply don't run wiring from it to places you don't control.

How the risk grew

On a truly isolated serial bus locked in a cabinet, Modbus's openness is largely harmless: the trust boundary is the wire, and an attacker would have to be standing at the panel. The danger appeared when the same protocol moved onto TCP and those networks were bridged to business systems and, sometimes carelessly, to the public internet. A device answering on port 502 from the open internet can be found by anyone scanning for it, and once found, it reads and writes for whoever asks. Search engines that catalog internet-connected devices routinely turn up thousands of exposed industrial systems this way.

The threat surface grows with connectivity. Nested half-rings spread out from a panel at the bottom. The innermost is the serial bus in a locked panel, reachable only by someone standing there. Next is the plant Ethernet network, then the business network, and finally the internet with port 502 open, where anyone who can route to the device can reach and control it. Red markers for possible attackers multiply as each ring appears. device Locked panel Plant Ethernetanyone on the plant LAN Business networkany office PC, any phished laptop Internet · port 502 openanyone who can route to it
Figure 18.2 The threat surface grows with connectivity. An isolated bus is reachable only from the panel; a device exposed on the open internet on port 502 is reachable, and controllable, by anyone who can route to it.

The threats in concrete terms

Naming the specific threats helps, because each maps to a defense:

ThreatWhat it means
Unauthorized controlAnyone reachable can write coils and registers: open a valve, stop a pump
EavesdroppingPlaintext traffic reveals all data and the full register map
TamperingA frame in transit can be altered; the CRC offers no defense
ReplayA captured valid command can be resent later
Denial of serviceFlooding or malformed frames can overwhelm a device

Unauthorized control is the gravest, because it turns a data protocol into a physical one: on Modbus, a write isn't just information, it's an action in the real world. A system that prevents unwanted writes has addressed the worst danger. That's why a recurring theme of Modbus security is separating the ability to read from the ability to write, and granting the second far more sparingly.

Defense in depth

Since the protocol can't defend itself, you build protection in layers around it, so no single barrier has to be perfect.

  1. Network segmentation (the foundation): keep the operational network that carries Modbus separate from business networks and absolutely off the public internet. Most real Modbus incidents trace back to a device that should never have been reachable being reachable. Segmentation alone prevents most of them.
  2. A firewall with an allowlist in front of the Modbus network: only the few known clients may reach port 502, rather than everyone.
  3. A VPN or other encrypted tunnel for necessary remote access. The tunnel provides the authentication and encryption Modbus lacks, so even though Modbus is open, the path it travels is not.
  4. Monitoring that watches for the unexpected (a write from an unfamiliar source, a sudden scan of many addresses), turning a silent compromise into a noticed one.
Defense in depth. On the left, outside the plant, are an attacker and a remote engineer. Between them and the plant's operational network stand two barriers: the segmentation boundary and a firewall that allowlists port 502. The attacker's write is stopped at the boundary. The engineer's traffic travels through an encrypted VPN tunnel to a VPN gateway inside. Inside, a rogue write from an unknown laptop to a device triggers an alert on the monitoring system. OUTSIDE OT NETWORK (MODBUS) segmentation firewall: allowlist :502 ? attacker E remote engineer VPN tunnel VPN gw PLC / devices SCADA laptop? Monitoring alert: write from unknown host write ✗ VPN authenticated ✓ write
Figure 18.4 Defense in depth. Protection comes in layers (segmentation, a firewall with allowlisting, VPNs for remote access, and monitoring) so that no single barrier must be perfect.

Limiting what can be written

Because unauthorized control is the worst outcome, an especially valuable pattern is to remove the ability to write wherever it isn't needed. Many monitoring applications only ever read. For these, a read-only gateway, or in the strictest form a data diode (a device that physically permits traffic in only one direction), lets data flow out to dashboards and historians while making it impossible to send a command back in. A monitoring system that physically can't write is immune to the gravest threat no matter what reaches it.

A read-only gateway. Measurements from the plant devices on the left flow through a one-way gateway to dashboards and a historian on the right. A write command sent back from the monitoring side hits the gateway and is blocked. PLANT PLC / meters pumps, valves MONITORING dashboards historian read-only gateway 52.3 12.5 write ✗ blocked reads flow out · nothing flows back in
Figure 18.5 A read-only gateway passes measurements outward but blocks any command travelling back, so a monitoring network can't be used to control the plant even if it's compromised.

Where writes are required, grant them narrowly: from specific hosts, for specific registers, logged and watched. Some devices and gateways can themselves restrict write access or disable unused function codes, shrinking what an attacker could do even after reaching the device. The guiding principle is least privilege: every client can do the least its job requires, and no more.

Modbus with built-in security

The protocol's custodians have addressed the gap directly with Modbus/TCP Security, a specification that wraps Modbus in TLS (the same transport-layer security that protects web traffic). It adds genuine encryption and certificate-based authentication, and runs on its own port, TCP 802.

Classic Modbus TCPModbus/TCP Security
Port502802
Who may connectAnyone who can reach itClients holding a trusted certificate
TrafficPlaintextEncrypted (TLS)
Tampering / replayUndetectedDetected and rejected by TLS
Installed baseNearly everythingLimited

Where it's available, it closes the encryption and authentication holes at the protocol level. In practice, adoption remains limited: the vast installed base speaks classic, unsecured Modbus, and most devices you'll meet won't support the secure variant. Know it exists and prefer it when you can, while continuing to assume that the Modbus in front of you is unauthenticated and must be protected from outside.

Plant risk audit

A small plant: a few Modbus devices, a monitoring server, an engineer who needs occasional remote access, and a business network. Toggle what's in place.

Check your understanding

1. A client reaches a Modbus device it shouldn't. What stops it from writing a coil?

Modbus has no authentication. The CRC only detects accidental corruption, and an attacker can recompute it.

2. Which threat is the gravest for Modbus, and why?

Opening a valve or stopping a pump is an action in the real world, which is why separating reads from writes matters so much.

3. A dashboard in the business network only needs to display plant values. What's the strongest protection?

If the monitoring path physically can't carry a write, a compromise there can't command the plant.

4. What does Modbus/TCP Security add, and on which port?

It wraps Modbus in TLS on TCP port 802. Adoption is still limited, so assume classic, unauthenticated Modbus and defend from outside.