How zakharb/labshock works
Project Type and Purpose
• Labshock is a multi-container, Docker-based ICS/OT (Industrial Control Systems/Operational Technology) simulation and testing environment.
• It orchestrates various services—Portal, PLC, SCADA, Engineering Workstation, Pentest station, IDS, Collector, Router—via docker-compose to provide a turnkey industrial cyber lab.
File Structure Analysis
• Top-level files:
• docker-compose.yml: Orchestration of all services.
• README.md, LICENSE, .github/: Metadata, docs, CI settings.
• labshock/ subdirectory contains one folder per service, each with a Dockerfile and in some cases an entrypoint script or bundled data (e.g., PLC programs, SCADA projects).
• Key service folders:
• portal
• plc
• scada
• ews
• ids
• pentest
• collector
• router
• Each service likely connects to a common Docker network defined in docker-compose.yml, exposing distinct host ports.
README Insights
• The “Portal” is the central hub that provides links to all other services.
• PLC uses OpenPLC, SCADA uses FUXA, EWS uses a Kali-based noVNC setup, IDS is Network Swiftness, Collector is Tidal Collector, Pentest is Pentest Fury.
• Services expose web UIs or SSH/VNC on specific host ports (e.g., 8080 for PLC, 1881 for SCADA, 5911 for EWS, etc.).
Main Components and Interactions
a. Host Machine (Docker Engine)
– Runs all containers on a user-defined Docker network.
b. Portal Container
– Web UI on https://localhost
– Acts as an ingress point; reverse-proxies or links to other services.
c. ICS Services
– PLC Container (OpenPLC) on port 8080
– SCADA Container (FUXA) on port 1881
d. Engineering Workstation (EWS)
– noVNC interface on port 5911
– Connects to PLC and SCADA over the Docker network for programming and monitoring.
e. Pentest Station
– Web/SSH on port 3443/2222
– Simulates attacks against PLC/SCADA.
f. IDS (Network Swiftness)
– Web UI port 1443; monitors traffic on the ICS network.
g. Collector (Tidal Collector)
– Web UI port 2443; collects logs/metrics from PLC, SCADA, and other containers.
h. Router Container
– (Optional) Defines subnets, bridges, or packet forwarding between segments.
i. External IDS (Optional)
– Can be attached to the same network to ingest mirrored traffic.
Data flows:
• Users access Portal → click links → reach each service’s UI.
• EWS → programs PLC/SCADA via internal network traffic.
• Pentest → sends malicious/modbus/DNP3/S7 traffic → PLC/SCADA respond.
• IDS sniffs network traffic between all ICS components.
• Collector queries/logs events from PLC/SCADA/IDS.
Architectural Patterns & Principles
• Microservices via Docker containers, one responsibility per container.
• Single orchestrator (docker-compose) defines service dependencies and a shared network.
• Separation of concerns: UI layer (Portal), control layer (PLC, SCADA), attack layer (Pentest, EWS), security layer (IDS, Collector), and network layer (Router).
Final Checklist
• Call out host ports and internal container ports.
• Services logically (control, management, security, network).
• Shared Docker network and volumes.