How maheshks74/scada_defence works
This is a fully simulated SCADA cyber-defense application. Its main workflow advances coupled virtual PLC physics, injects optional false telemetry, publishes reported values, verifies and assesses suspicious readings, evaluates prediction impact, requests operator judgment when warranted, and applies mitigation. The dashboard exposes telemetry, attack controls, analysis, confirmations, and event history. Edges follow the README’s documented flow or shown imports/calls; unsampled controller and agent internals are represented only where documented.
Main entry points: simulator.py Simulation Orchestrator · physical_model.py Coupled Physics · app.py SCADA Dashboard · telemetry_agent.py Telemetry Verification
Components 24
Simulated Plant
- Simulation Orchestrator
simulation/simulator.py - Coupled Physics
simulation/physical_model.py - PLC Interface
plc/base_plc.py - Motor PLC
plc/motor_plc.py - Pump PLC
plc/pump_plc.py - Process PLC
plc/process_plc.py - FDIA Engine
attacks/fdia.py - Configuration Loader
simulation/config_loader.py
Telemetry Transport
- Telemetry History
simulation/telemetry_generator.py - Modbus Publisher
scada/modbus_server.py - Register Map
scada/register_map.py - Modbus Client
scada/modbus_client.py
Defense Analysis
- Telemetry Verification
agents/telemetry_agent.py - Risk Analysis
agents/risk_agent.py - Model Impact
agents/impact_analyzer.py - Trend Prediction
models/prediction_model.py - Agent Data Schemas
models/schemas.py
Operator Response
- Mitigation Policy
agents/mitigation_agent.py - Confirmation Gate
agents/human_confirmation.py - Event Log
storage/event_logger.py
User Interface
- Application Entry
main.py - SCADA Dashboard
dashboard/app.py - Dashboard Controller
dashboard
Other components
- Operator
Connections 32
- Application Entry → SCADA Dashboard: launches
main.py - SCADA Dashboard → Dashboard Controller: uses
dashboard/app.py - Dashboard Controller → Simulation Orchestrator: controls
- SCADA Dashboard → Modbus Client: reads telemetry
README.md - Simulation Orchestrator → Coupled Physics: advances
simulation/simulator.py - Coupled Physics → Motor PLC: updates
simulation/physical_model.py - Coupled Physics → Pump PLC: updates
simulation/physical_model.py - Coupled Physics → Process PLC: updates
simulation/physical_model.py - Motor PLC → PLC Interface: implements
plc/motor_plc.py - Pump PLC → PLC Interface: implements
- Process PLC → PLC Interface: implements
plc/process_plc.py - Coupled Physics → Process PLC: supplies pump flow
simulation/physical_model.py - Simulation Orchestrator → FDIA Engine: injects values
simulation/simulator.py - Simulation Orchestrator → Telemetry History: records reported state
simulation/simulator.py - Simulation Orchestrator → Modbus Publisher: publishes registers
simulation/simulator.py - Modbus Publisher → Register Map: uses addresses
scada/modbus_server.py - Simulation Orchestrator → Telemetry Verification: provides telemetry
README.md - Telemetry Verification → Risk Analysis: provides checks
README.md - Telemetry Verification → Model Impact: analyzes suspicious readings
agents/impact_analyzer.py - Model Impact → Telemetry History: reads history
agents/impact_analyzer.py - Model Impact → Trend Prediction: forecasts
agents/impact_analyzer.py - Telemetry Verification → Agent Data Schemas: returns result
README.md - Risk Analysis → Agent Data Schemas: returns assessment
README.md - Model Impact → Agent Data Schemas: returns analysis
agents/impact_analyzer.py - Mitigation Policy → Confirmation Gate: requests confirmation
agents/mitigation_agent.py - Operator → Confirmation Gate: submits decision
agents/human_confirmation.py - Mitigation Policy → Coupled Physics: isolates PLC
agents/mitigation_agent.py - Mitigation Policy → Event Log: records decisions
README.md - SCADA Dashboard → Event Log: shows events
README.md - Application Entry → Configuration Loader: loads settings
main.py - SCADA Dashboard → Configuration Loader: loads settings
dashboard/app.py - Simulation Orchestrator → FDIA Engine: starts or stops
simulation/simulator.py