Serial / Legacy
Ethernet-Based
Data Exchange
Building / Utilities
Modbus TCP/RTU
Modbus Protocol
The most widely deployed industrial protocol. Originally developed by Modicon in 1979 for serial communication. Modbus TCP wraps the RTU frame in a TCP/IP packet. No authentication, no encryption, no integrity checking — by design.
Port
TCP/502
Transport
TCP (Modbus TCP) / Serial RS-485 (RTU)
Security
None (no auth, no encryption)
Sector
All OT sectors
Standard
Modbus.org open standard
Deployment
~90% of OT environments
Modbus TCP Packet Structure
// Modbus TCP ADU (Application Data Unit)
Transaction ID (2B)
Protocol ID (2B) = 0x0000
Length (2B)
Unit ID (1B)
FC (1B)
Data (variable)
FC = Function Code | Unit ID = Slave address (1-247) | Protocol ID always 0x0000 for Modbus
Key Function Codes
FC (Hex)NameOperationSecurity Risk
0x01Read CoilsRead discrete output statusLow — read only
0x02Read Discrete InputsRead discrete input statusLow — read only
0x03Read Holding RegistersRead analog output valuesMedium — reveals process values
0x04Read Input RegistersRead analog input valuesMedium — reveals sensor data
0x05Write Single CoilForce single output ON/OFFHIGH — direct control
0x06Write Single RegisterWrite single holding registerHIGH — setpoint manipulation
0x0FWrite Multiple CoilsForce multiple outputsCRITICAL — mass control
0x10Write Multiple RegistersWrite multiple registersCRITICAL — mass setpoint change
0x2BRead Device ID (FC43)Read device identificationMedium — reconnaissance
Security Vulnerabilities
No Authentication
Any device on the network can send Modbus commands to any PLC. There is no username, password, or certificate — the protocol was designed for isolated serial networks.
MITRE ATT&CK ICS: T0855 — Unauthorized Command Message
No Encryption
All Modbus traffic is plaintext. An attacker with network access can read all process values and inject commands. Man-in-the-middle attacks are trivial.
MITRE ATT&CK ICS: T0830 — Man in the Middle
No Message Integrity
Modbus TCP has no message authentication code (MAC). Packets can be replayed or modified in transit without detection. RTU uses CRC but only for error detection, not authentication.
MITRE ATT&CK ICS: T0831 — Manipulation of Control
Detection Logic
// Detect unauthorized Modbus write commands modbus.function_code IN [0x05, 0x06, 0x0F, 0x10] AND src_ip NOT IN authorized_scada_masters AND dst_port == 502 → ALERT: Unauthorized Modbus Write [T0855] // Detect Modbus reconnaissance sweep modbus.function_code == 0x2B // FC43 Device ID AND COUNT(dst_ip) > 5 WITHIN 60s → ALERT: Modbus Asset Enumeration [T0846] // Detect Modbus replay attack modbus.transaction_id == previous_transaction_id AND time_delta < 100ms → ALERT: Possible Modbus Replay Attack