# chinmayim-bhise/ics-laboratory architecture

> Architecture diagram of the GitHub repository chinmayim-bhise/ics-laboratory, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chinmayim-bhise/ics-laboratory
- Repository: https://github.com/chinmayim-bhise/ics-laboratory

## Overview

ICS Laboratory is a hardware-based mini-power-plant SCADA and OT-security testbed. Its main workflow runs a physical process through an ESP8266 PLC, exposes supervisory control through an HMI, and monitors protocol traffic for alerts sent to Wazuh and supported by incident-response playbooks. A separate threat injector demonstrates Modbus, MQTT, and UDP attack scenarios. Firmware and attack-tool details are sampled; HMI, Wazuh configuration, and playbook relationships are represented at the level documented in the README, so their internal implementation is not inferred.

Main entry points: [`PLC_Node/PLC_Node.ino`](https://github.com/chinmayim-bhise/ics-laboratory/blob/main/PLC_Node/PLC_Node.ino) (PLC Field Node), [`HMI_Node/HMI_Node.ino`](https://github.com/chinmayim-bhise/ics-laboratory/blob/main/HMI_Node/HMI_Node.ino) (HMI Dashboard), [`soc_engine/ot_soc_sensor.py`](https://github.com/chinmayim-bhise/ics-laboratory/blob/main/soc_engine/ot_soc_sensor.py) (OT SOC Sensor), [`tools/ot_threat_injector.py`](https://github.com/chinmayim-bhise/ics-laboratory/blob/main/tools/ot_threat_injector.py) (Threat Injector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Plant Control"]
  node_field_io["Sensors and Actuators"]
  node_plc["PLC Field Node<br/>[PLC_Node.ino]"]
  node_hmi["HMI Dashboard<br/>[HMI_Node.ino]"]
end

subgraph group_monitoring["OT Monitoring"]
  node_soc_sensor["OT SOC Sensor<br/>[ot_soc_sensor.py]"]
end

subgraph group_simulation["Threat Simulation"]
  node_injector["Threat Injector"]
end

subgraph group_response["SOC Response"]
  node_wazuh[("Wazuh SIEM")]
  node_decoders["OT Decoders"]
  node_rules["OT Correlation Rules<br/>[ot_ics_rules.xml]"]
  node_playbooks["Incident Playbooks"]
end

node_mqtt(("MQTT Broker"))
node_attacker(("Operator / Attacker"))

node_field_io -->|"provides GPIO inputs"| node_plc
node_plc -->|"drives actuators"| node_field_io
node_plc -->|"exchanges Modbus/MQTT"| node_hmi
node_hmi -->|"sends supervisory control"| node_plc
node_plc -->|"publishes and subscribes"| node_mqtt
node_hmi -->|"bridges supervisory topics"| node_mqtt
node_mqtt -->|"delivers monitored traffic"| node_soc_sensor
node_soc_sensor -->|"polls Modbus registers"| node_plc
node_soc_sensor -->|"sends JSON Syslog alerts"| node_wazuh
node_attacker -->|"selects attack scenario"| node_injector
node_injector -->|"injects Modbus and UDP commands"| node_plc
node_injector -->|"publishes attack messages"| node_mqtt
node_decoders -->|"configures event decoding"| node_wazuh
node_rules -->|"configures alert rules"| node_wazuh
node_wazuh -->|"supports incident response"| node_playbooks

click node_plc "https://github.com/chinmayim-bhise/ics-laboratory/blob/main/PLC_Node/PLC_Node.ino"
click node_hmi "https://github.com/chinmayim-bhise/ics-laboratory/blob/main/HMI_Node/HMI_Node.ino"
click node_soc_sensor "https://github.com/chinmayim-bhise/ics-laboratory/blob/main/soc_engine/ot_soc_sensor.py"
click node_injector "https://github.com/chinmayim-bhise/ics-laboratory/blob/main/tools/ot_threat_injector.py"
click node_decoders "https://github.com/chinmayim-bhise/ics-laboratory/blob/main/wazuh/decoders/ot_ics_decoders.xml"
click node_rules "https://github.com/chinmayim-bhise/ics-laboratory/blob/main/wazuh/rules/ot_ics_rules.xml"
click node_playbooks "https://github.com/chinmayim-bhise/ics-laboratory/tree/main/playbooks"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_field_io,node_plc,node_hmi toneBlue
class node_soc_sensor toneAmber
class node_injector toneMint
class node_wazuh,node_decoders,node_rules,node_playbooks toneRose
class node_mqtt,node_attacker toneIndigo
```

## Components

### Plant Control

- **Sensors and Actuators**
- [PLC Field Node](https://github.com/chinmayim-bhise/ics-laboratory/blob/main/PLC_Node/PLC_Node.ino): `PLC_Node/PLC_Node.ino`
- [HMI Dashboard](https://github.com/chinmayim-bhise/ics-laboratory/blob/main/HMI_Node/HMI_Node.ino): `HMI_Node/HMI_Node.ino`

### OT Monitoring

- [OT SOC Sensor](https://github.com/chinmayim-bhise/ics-laboratory/blob/main/soc_engine/ot_soc_sensor.py): `soc_engine/ot_soc_sensor.py`

### Threat Simulation

- [Threat Injector](https://github.com/chinmayim-bhise/ics-laboratory/blob/main/tools/ot_threat_injector.py): `tools/ot_threat_injector.py`

### SOC Response

- **Wazuh SIEM**
- [OT Decoders](https://github.com/chinmayim-bhise/ics-laboratory/blob/main/wazuh/decoders/ot_ics_decoders.xml): `wazuh/decoders/ot_ics_decoders.xml`
- [OT Correlation Rules](https://github.com/chinmayim-bhise/ics-laboratory/blob/main/wazuh/rules/ot_ics_rules.xml): `wazuh/rules/ot_ics_rules.xml`
- [Incident Playbooks](https://github.com/chinmayim-bhise/ics-laboratory/tree/main/playbooks): `playbooks`

### Other components

- **MQTT Broker**
- **Operator / Attacker**

## Connections

- Sensors and Actuators → PLC Field Node: provides GPIO inputs (evidence: `README.md`)
- PLC Field Node → Sensors and Actuators: drives actuators (evidence: `README.md`)
- PLC Field Node → HMI Dashboard: exchanges Modbus/MQTT (evidence: `README.md`)
- HMI Dashboard → PLC Field Node: sends supervisory control (evidence: `README.md`)
- PLC Field Node → MQTT Broker: publishes and subscribes (evidence: `README.md`)
- HMI Dashboard → MQTT Broker: bridges supervisory topics (evidence: `README.md`)
- MQTT Broker → OT SOC Sensor: delivers monitored traffic (evidence: `soc_engine/ot_soc_sensor.py`)
- OT SOC Sensor → PLC Field Node: polls Modbus registers (evidence: `soc_engine/ot_soc_sensor.py`)
- OT SOC Sensor → Wazuh SIEM: sends JSON Syslog alerts (evidence: `soc_engine/ot_soc_sensor.py`)
- Operator / Attacker → Threat Injector: selects attack scenario (evidence: `tools/ot_threat_injector.py`)
- Threat Injector → PLC Field Node: injects Modbus and UDP commands (evidence: `tools/ot_threat_injector.py`)
- Threat Injector → MQTT Broker: publishes attack messages (evidence: `tools/ot_threat_injector.py`)
- OT Decoders → Wazuh SIEM: configures event decoding (evidence: `README.md`)
- OT Correlation Rules → Wazuh SIEM: configures alert rules (evidence: `README.md`)
- Wazuh SIEM → Incident Playbooks: supports incident response (evidence: `README.md`)
