# mkzaidi91/ot-security-lab architecture

> Architecture diagram of the GitHub repository mkzaidi91/ot-security-lab, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mkzaidi91/ot-security-lab
- Repository: https://github.com/mkzaidi91/ot-security-lab

## Overview

This repository is a hands-on OT/ICS security lab, not a general-purpose application. Its main workflow is an unauthorized Modbus write against a simulated PLC, detection by Suricata, forwarding to Wazuh, and OT-safe triage into an incident case. The graph also preserves the lab’s network/process modeling, traffic baselining, behavioral detection, and deployment capabilities. Relationships are based on the README and the sampled SOAR playbook; unsampled configuration and documentation are represented by their exact repository paths, but their internal wiring is not inferred.

Main entry points: [`soar/ot_soar_response.py`](https://github.com/mkzaidi91/ot-security-lab/blob/main/soar/ot_soar_response.py) (OT SOAR Playbook), [`deploy/ot-suricata.sh`](https://github.com/mkzaidi91/ot-security-lab/blob/main/deploy/ot-suricata.sh) (Suricata Sensor), [`docker-compose.yml`](https://github.com/mkzaidi91/ot-security-lab/blob/main/docker-compose.yml) (Container Topology), [`docs/05-siem-integration.md`](https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/05-siem-integration.md) (Wazuh Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lab["Lab Environment"]
  node_lab_topology["Container Topology<br/>[docker-compose.yml]"]
  node_network_map["OT Network Map<br/>[01-network-map.md]"]
  node_traffic_baseline["Traffic Baseline"]
  node_router["OT Router<br/>[docker-compose.yml]"]
  node_deployment["ESXi Deployment"]
end

subgraph group_attack["Attack and Process"]
  node_attacker(("Kali Attacker"))
  node_plc["OpenPLC Controller<br/>[docker-compose.yml]"]
  node_process_hmi["Process HMI<br/>[docker-compose.yml]"]
  node_attack_notes["Attack Walkthrough<br/>[03-attack.md]"]
end

subgraph group_detection["Detection and SIEM"]
  node_suricata["Suricata Sensor<br/>[ot-suricata.sh]"]
  node_signature_rules["Modbus Signatures<br/>[ot-modbus.rules]"]
  node_behavioral_rules["Behavioral Rules"]
  node_detection_notes["Detection Walkthrough<br/>[04-detection.md]"]
  node_wazuh_agent["Wazuh Agent"]
  node_wazuh_manager["Wazuh SIEM<br/>[docker-compose.yml]"]
end

subgraph group_response["SOAR Response"]
  node_active_response["Wazuh Active Response"]
  node_wazuh_response_rules["Wazuh Response Rules<br/>[local_rules.xml]"]
  node_playbook["OT SOAR Playbook"]
  node_case_store[("Incident Case Files")]
  node_response_playbook["Response Playbook"]
end

node_operator(("Operator"))
node_webhook["Notification Webhook"]

node_operator -->|"observes process"| node_process_hmi
node_attacker -->|"sends Modbus write"| node_router
node_router -->|"routes write"| node_plc
node_plc -->|"changes process state"| node_process_hmi
node_suricata -->|"matches traffic"| node_signature_rules
node_suricata -->|"checks behavior"| node_behavioral_rules
node_wazuh_agent -->|"ships alerts"| node_wazuh_manager
node_suricata -->|"emits alerts"| node_wazuh_agent
node_wazuh_manager -->|"evaluates alert"| node_wazuh_response_rules
node_wazuh_response_rules -->|"triggers response"| node_active_response
node_active_response -->|"runs playbook"| node_playbook
node_playbook -->|"writes case"| node_case_store
node_playbook -.->|"notifies"| node_webhook
node_playbook -.->|"stages recommendation"| node_response_playbook
node_lab_topology -.->|"configures network"| node_router
node_lab_topology -.->|"hosts controller"| node_plc
node_lab_topology -.->|"hosts HMI"| node_process_hmi
node_deployment -->|"documents deployment"| node_suricata

click node_lab_topology "https://github.com/mkzaidi91/ot-security-lab/blob/main/docker-compose.yml"
click node_network_map "https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/01-network-map.md"
click node_traffic_baseline "https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/02-traffic-baseline.md"
click node_router "https://github.com/mkzaidi91/ot-security-lab/blob/main/docker-compose.yml"
click node_plc "https://github.com/mkzaidi91/ot-security-lab/blob/main/docker-compose.yml"
click node_process_hmi "https://github.com/mkzaidi91/ot-security-lab/blob/main/docker-compose.yml"
click node_attack_notes "https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/03-attack.md"
click node_suricata "https://github.com/mkzaidi91/ot-security-lab/blob/main/deploy/ot-suricata.sh"
click node_signature_rules "https://github.com/mkzaidi91/ot-security-lab/blob/main/detections/ot-modbus.rules"
click node_behavioral_rules "https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/06-behavioral-detection.md"
click node_detection_notes "https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/04-detection.md"
click node_wazuh_agent "https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/05-siem-integration.md"
click node_wazuh_manager "https://github.com/mkzaidi91/ot-security-lab/blob/main/docker-compose.yml"
click node_deployment "https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/07-esxi-deployment.md"
click node_active_response "https://github.com/mkzaidi91/ot-security-lab/blob/main/soar/active-response.conf"
click node_wazuh_response_rules "https://github.com/mkzaidi91/ot-security-lab/blob/main/soar/local_rules.xml"
click node_playbook "https://github.com/mkzaidi91/ot-security-lab/blob/main/soar/ot_soar_response.py"
click node_response_playbook "https://github.com/mkzaidi91/ot-security-lab/blob/main/soar/ir-playbook-unauthorized-modbus-write.md"

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_lab_topology,node_network_map,node_traffic_baseline,node_router,node_deployment toneBlue
class node_attacker,node_plc,node_process_hmi,node_attack_notes toneAmber
class node_suricata,node_signature_rules,node_behavioral_rules,node_detection_notes,node_wazuh_agent,node_wazuh_manager,node_webhook toneMint
class node_active_response,node_wazuh_response_rules,node_playbook,node_case_store,node_response_playbook toneRose
class node_operator toneIndigo
```

## Components

### Lab Environment

- [Container Topology](https://github.com/mkzaidi91/ot-security-lab/blob/main/docker-compose.yml): `docker-compose.yml`
- [OT Network Map](https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/01-network-map.md): `docs/01-network-map.md`
- [Traffic Baseline](https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/02-traffic-baseline.md): `docs/02-traffic-baseline.md`
- [OT Router](https://github.com/mkzaidi91/ot-security-lab/blob/main/docker-compose.yml): `docker-compose.yml`
- [ESXi Deployment](https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/07-esxi-deployment.md): `docs/07-esxi-deployment.md`

### Attack and Process

- **Kali Attacker**
- [OpenPLC Controller](https://github.com/mkzaidi91/ot-security-lab/blob/main/docker-compose.yml): `docker-compose.yml`
- [Process HMI](https://github.com/mkzaidi91/ot-security-lab/blob/main/docker-compose.yml): `docker-compose.yml`
- [Attack Walkthrough](https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/03-attack.md): `docs/03-attack.md`

### Detection and SIEM

- [Suricata Sensor](https://github.com/mkzaidi91/ot-security-lab/blob/main/deploy/ot-suricata.sh): `deploy/ot-suricata.sh`
- [Modbus Signatures](https://github.com/mkzaidi91/ot-security-lab/blob/main/detections/ot-modbus.rules): `detections/ot-modbus.rules`
- [Behavioral Rules](https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/06-behavioral-detection.md): `docs/06-behavioral-detection.md`
- [Detection Walkthrough](https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/04-detection.md): `docs/04-detection.md`
- [Wazuh Agent](https://github.com/mkzaidi91/ot-security-lab/blob/main/docs/05-siem-integration.md): `docs/05-siem-integration.md`
- [Wazuh SIEM](https://github.com/mkzaidi91/ot-security-lab/blob/main/docker-compose.yml): `docker-compose.yml`

### SOAR Response

- [Wazuh Active Response](https://github.com/mkzaidi91/ot-security-lab/blob/main/soar/active-response.conf): `soar/active-response.conf`
- [Wazuh Response Rules](https://github.com/mkzaidi91/ot-security-lab/blob/main/soar/local_rules.xml): `soar/local_rules.xml`
- [OT SOAR Playbook](https://github.com/mkzaidi91/ot-security-lab/blob/main/soar/ot_soar_response.py): `soar/ot_soar_response.py`
- **Incident Case Files**
- [Response Playbook](https://github.com/mkzaidi91/ot-security-lab/blob/main/soar/ir-playbook-unauthorized-modbus-write.md): `soar/ir-playbook-unauthorized-modbus-write.md`

### Other components

- **Operator**
- **Notification Webhook**

## Connections

- Operator → Process HMI: observes process (evidence: `README.md`)
- Kali Attacker → OT Router: sends Modbus write (evidence: `README.md`)
- OT Router → OpenPLC Controller: routes write (evidence: `README.md`)
- OpenPLC Controller → Process HMI: changes process state (evidence: `README.md`)
- Suricata Sensor → Modbus Signatures: matches traffic (evidence: `README.md`)
- Suricata Sensor → Behavioral Rules: checks behavior (evidence: `README.md`)
- Wazuh Agent → Wazuh SIEM: ships alerts (evidence: `README.md`)
- Suricata Sensor → Wazuh Agent: emits alerts (evidence: `README.md`)
- Wazuh SIEM → Wazuh Response Rules: evaluates alert (evidence: `README.md`)
- Wazuh Response Rules → Wazuh Active Response: triggers response (evidence: `README.md`)
- Wazuh Active Response → OT SOAR Playbook: runs playbook (evidence: `README.md`)
- OT SOAR Playbook → Incident Case Files: writes case (evidence: `soar/ot_soar_response.py`)
- OT SOAR Playbook → Notification Webhook: notifies (evidence: `soar/ot_soar_response.py`)
- OT SOAR Playbook → Response Playbook: stages recommendation (evidence: `README.md`)
- Container Topology → OT Router: configures network (evidence: `README.md`)
- Container Topology → OpenPLC Controller: hosts controller (evidence: `README.md`)
- Container Topology → Process HMI: hosts HMI (evidence: `README.md`)
- ESXi Deployment → Suricata Sensor: documents deployment (evidence: `README.md`)
