Learning Modbus TCP
I play a CTF of HTB (Hack The Box) and learning Modbus TCP
Last updated
Was this helpful?
I play a CTF of HTB (Hack The Box) and learning Modbus TCP
Last updated
Was this helpful?
By using (umodbus) I have learned to interact with the devices that use Modbus, learn to alter bits and bytes, and understand some function code of Modbus
I have learned:
What are coil, register, slave_id, and starting_address?
Client and Server Modbus
How to analyze Modbus TCP traffic using Wireshark
Please change the stream number or just delete it for your own usage
Very simple protocol, and no security built-in (no authentication, anyone can send a Modbus command if they are on the same network)
Notes:
Field devices can't initiate communication
The coil is meant for digital output, the register is for analog
No security built-in
Slave and Master model (in the real world there will be a Server that will poll every 2s to read the data on the Slave) Modbus Client will use some software to send Modbus command to Modbus Server
IMPORTANT: Most Modbus traffic on the control system is very flat and highly predictable -> you can do baseline monitoring or anomaly detection to defend the network traffic
While everybody can send Modbus commands, Modbus doesn't support context or tag names which means -> you will have no idea what value to send or what address to send the Modbus command to the PLC (Client) which will likely increase your chance of mess up thing up and blow you cover when attacking the Modbus System. So mostly the Attacker will find the HMI or Engineer Workstation which will have the file that has the schema or the manual for which address or command refs for those PLC
There are no encryption between Modbus client and server
There are
Slave ID:
Register
Coil
Addresses
The data is where you use your code to control the Modbus devices -> by choosing which function code to send and what are the Modbus data (register, coil, address, and slave id)
After I have familiarized myself with the Modbus packet, I now use umodbus to communicate with the Modbus server
(Understanding Modbus TCP)