hardwarefreemedium

Factory

HackTheBox

Our infrastructure is under attack! The HMI interface went offline and we lost control of some critical PLCs in our ICS system. Moments after the attack started we managed to identify the target but did not have time to respond. The water storage facility's high/low sensors are corrupted thus settin

$ ls tags/ techniques/
plc_coil_writeladder_logic_analysismodbus_rtu_command_injectionics_mode_switching

$ cat /etc/rate-limit

Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.

Factory — HackTheBox

Description

Our infrastructure is under attack! The HMI interface went offline and we lost control of some critical PLCs in our ICS system. Moments after the attack started we managed to identify the target but did not have time to respond. The water storage facility's high/low sensors are corrupted thus setting the PLC into a halt state. We need to regain control and empty the water tank before it overflows. Our field operative has set a remote connection directly with the serial network of the system.

Files

  • interface_setup.png — Network diagram showing the ICS architecture
  • PLC_Ladder_Logic.pdf — PLC ladder logic diagram for the water_storage_facility

Architecture

[Laptop-1 (Us)] --TCP--> [Laptop-2 (Gateway)] --Modbus RTU (Serial)--> [PLC-1 (Slave 82)]
  • PLC-1 (Target): Slave Address 82 (0x52), connected via serial Modbus RTU
  • Laptop-2: Gateway — converts received Modbus packets into valid packets (with CRC) and forwards into the real Modbus RTU network
  • Laptop-1 (Us/Host): Sends Modbus commands to Laptop-2 via TCP, which forwards them to the PLC

PLC-1 Coil Addresses

Address (decimal)HexCoil
50x0005cutoff
120x000Cin_valve
210x0015out_valve
260x001Acutoff_in
330x0021start
520x0034force_start_out
13360x0538force_start_in
99470x26DBmanual_mode_control

Analysis

Ladder Logic

The PLC operates in two modes: auto_mode and manual_mode.

...

$ grep --similar

Similar writeups