PISA Pakistan β€” Community CERT

← βš™οΈ Blue Team & Defense Engineering

32. Operational Technology Security Monitoring: Hands-On SCADA/ICS Defense for Pakistan's Power and Water Infrastructure

⏱ 12 min

OT/ICS Security Challenges in Pakistan's Critical Infrastructure

Pakistan's critical infrastructure including the national power grid (NTDC), water treatment facilities, oil and gas pipelines, and manufacturing plants depend on Industrial Control Systems (ICS) and SCADA networks that were designed for reliability, not security. With threats from nation-state actors targeting OT environments increasing globally, Pakistani organizations operating these systems require specialized monitoring approaches distinct from traditional IT security operations.

The Purdue Model for Control Hierarchy provides the framework for understanding OT network segmentation, from Level 0 (basic instrumentation) through Level 4 (enterprise business systems). Pakistani OT environments frequently suffer from flat network architectures where Level 3 (operations management) and Level 4 (business planning) networks are not properly segmented, creating attack pathways from IT breaches into operational technology.

Architecting OT Security Monitoring in Pakistani Industrial Environments

Network Segmentation Implementation: Effective OT monitoring begins with proper network architecture. Industrial Demilitarized Zones (IDMZ) separate IT and OT networks:

Enterprise Network (IT) β†’ IDMZ (Screening) β†’ SCADA Servers β†’ PLCs/Field Devices
     ↑                     ↑                    ↑
  Business apps      Historian, DMZ         Control logic

Recommended Monitoring Architecture:

  • Deploy dedicated OT security monitoring tools on span ports mirroring SCADA traffic
  • Implement unidirectional security gateways (data diodes) for highest-sensitivity connections
  • Use separate ELK Stack or Splunk instances for OT log ingestion to prevent IT compromises affecting visibility
  • Deploy network TAPs at critical junctures rather than SPAN ports for guaranteed packet capture

Passive Network Monitoring with Zeek and Modbus Analysis

Zeek's Industrial Control System (ICS) protocols support enables passive monitoring without risking disruption to legacy systems:

# Zeek ICS protocol support configuration
# In zeekctl.cfg, enable ICS protocols
zeekctl
> set zeek_init_args -e /opt/zeek/share/zeek/policy/ics
> install
> deploy

Key OT Protocols to Monitor:

  • Modbus TCP β€” Common in Pakistani power distribution and water treatment
  • DNP3 β€” Used in national grid SCADA implementations
  • IEC 61850 β€” Substation automation protocols
  • S7comm β€” Siemens PLC communication
  • OPC UA β€” Modern industrial interoperability standard

Critical Zeek Logs for OT Monitoring:

# monitor.zeek script for OT anomaly detection
@load base/protocols/modbus
@load base/protocols/dnp3

# Log all Modbus function codes (read/write/discovery)
event modbus_message(c: connection, is_orig: bool, headers: ModbusHeaders, 
                     func: ModbusFunction, args:_modbus_message) {
    Log::write(OT_MODBUS_LOG, [
        $ts = c$start_time,
        $uid = c$uid,
        $src = c$id$orig_h,
        $dst = c$id$resp_h,
        $function_code = func$function_code,
        $exception_code = args?$exception_code ? args$exception_code : 0
    ]);
}

SIEM Integration for OT Threat Detection

Forward Zeek OT logs to your existing SIEM (ELK, Wazuh, or Splunk) for correlation with IT security events:

# Sigma rule for unauthorized Modbus write operations
title: Unauthorized Modbus Write Command
logsource:
  product: zeek
  service: modbus
detection:
  selection:
    function_code:
      - 5   # Write Single Coil
      - 6   # Write Single Register
      - 15  # Write Multiple Coils
      - 16  # Write Multiple Registers
  src_transit_network: true
  condition: selection
level: critical
fields:
  - ts
  - src
  - dst
  - function_code

OT-Specific Alerting Scenarios:

  1. Unexpected PLC programming β€” New logic uploaded outside maintenance windows
  2. Anomalous command sequences β€” Abnormal function codes or parameter ranges
  3. IT/OT protocol crossover β€” IT protocols (HTTP, SMB) appearing on OT networks
  4. Baseline deviation β€” Unusual communication patterns between control servers and field devices

Incident Response Procedures for OT Compromises

OT Incident Response Playbook:

Phase 1 β€” Identification:

  • Correlate SIEM alerts with historian data showing process parameter changes
  • Review physical security logs for unauthorized facility access
  • Analyze engineering workstation logs for unauthorized software or USB activity

Phase 2 β€” Containment:

  • Isolate affected PLCs from network while maintaining physical control capability
  • Activate manual override procedures to maintain critical operations
  • Preserve forensic data by capturing memory from engineering workstations

Phase 3 β€” Eradication and Recovery:

  • Validate PLC logic integrity against known-good backups
  • Re-image compromised engineering workstations
  • Implement enhanced monitoring before restoring network connectivity

Phase 4 β€” Lessons Learned:

  • Document timeline of attack progression
  • Update Sigma rules to detect similar attack patterns
  • Conduct tabletop exercises with operations staff

Do / Don't

  • Do maintain air-gapped backup networks for critical control functions when possible
  • Do implement change detection for PLC ladder logic and configuration files
  • Don't perform active scanning (Nmap, vulnerability scanners) on production OT networks without explicit authorization and careful planning
  • Don't assume IT security tools are safe for OT environments β€” many generate traffic that disrupts legacy protocols

Takeaway Action

This month, map your organization's OT network architecture using passive discovery. Document all PLCs, RTUs, SCADA servers, and their communication patterns. Deploy Zeek with ICS protocol support on a monitoring interface to establish baseline traffic patterns. Create your first Sigma rule detecting unauthorized Modbus write operations, and conduct a tabletop exercise with your OT operations team to validate incident response procedures.

← PrevNext β†’