Monitoring Scada Modbus Traffic Anomalies
Overview
Cybersecurity skill for monitoring scada modbus traffic anomalies. Follows industry best practices and security standards.
When to Use
Trigger phrases:
"monitoring scada modbus traffic anomalies"
"Monitors Modbus TCP traffic on SCADA and ICS networks to detect anomalous functi"
Monitoring OT/ICS networks for unauthorized Modbus commands targeting PLCs, RTUs, or HMIs
Detecting reconnaissance activity such as Modbus device enumeration (function code 43, Read Device Identification)
Identifying unauthorized write operations (function codes 05, 06, 15, 16) to coils and holding registers that could alter physical process parameters
Baselining normal Modbus communication patterns and alerting on deviations in function code distribution, register access ranges, or timing intervals
Investigating suspected sabotage or insider threats manipulating SCADA process values through Modbus register writes
Do not use on networks without authorization from the asset owner, for active injection or fuzzing against production SCADA systems, or as a replacement for safety-instrumented systems (SIS) that provide physical process protection.
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
Prerequisites
- Network tap or SPAN port on the OT network segment carrying Modbus TCP traffic (port 502)
- Python 3.9+ with pymodbus (>=3.6), scapy (>=2.5), and pandas for traffic analysis
- Zeek (formerly Bro) installed with the Modbus protocol analyzer enabled for passive traffic logging
- Wireshark or tshark for initial packet capture and validation of Modbus frame structure
- A baseline period of normal operations (minimum 48-72 hours) to establish communication profiles per device pair
- Network diagram identifying Modbus master-slave relationships, device IP addresses, and expected function code usage
Workflow
# Example: IOC detection
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def extract_iocs(text: str) -> dict:
return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}
- Define Objectives — Clarify the goals and scope for scada modbus traffic anomalies.
- Gather Resources — Collect tools, data, and access needed for scada modbus traffic anomalies.
- Execute Process — Carry out scada modbus traffic anomalies operations methodically.
- Verify Quality — Check results against acceptance criteria.
- Document Outcomes — Record findings, decisions, and next steps.
Tools
- Analysis Platform — Data processing and visualization
- Collaboration Tools — Team coordination and knowledge sharing
Process
- Plan — Define infrastructure requirements, security constraints, rollback strategy
- Implement — Configure resources, apply security best practices, test in staging
- Deploy & Monitor — Roll out to production, verify health checks, set up alerting
Verification
Anti-Rationalization Table
| Rationalization |
Reality |
| "We are too small to be targeted" |
Automated attacks target everyone. Size does not matter. |
| "Security slows us down" |
A breach slows you down 100x more. Build security in from the start. |
| "We will fix it after launch" |
Vulnerabilities in production are exploited within hours. Fix before deploy. |
1---2name: monitoring-scada-modbus-traffic-anomalies3description: Use when monitors Modbus TCP traffic on SCADA and ICS networks to detect4 anomalous function code usage, unauthorized register writes, and suspicious communication5 patterns. The analyst uses deep packet inspection with pymodbus, Scapy, and Zeek6 to baseline normal PLC/RTU communication behavior, then applies statistical and7 rule-based anomaly detection to identify reconnaissance, parameter manipulation,8 and denial-of-service attacks targeting Modbus devices on port 502.9domain: cybersecurity10tags:11- Modbus-TCP12- SCADA13- ICS-security14- deep-packet-inspection15- anomaly-detection16- OT-monitoring17subdomain: ot-security18version: 1.0.019author: oyi7720license: Apache-2.021nist_csf:22- PR.IR-0123- DE.CM-0124- ID.AM-0525category: cybersecurity26metadata:27 source: https://skillmd.com/skills/oyi77/monitoring-scada-modbus-traffic-anomalies28---2930# Monitoring Scada Modbus Traffic Anomalies3132## Overview3334Cybersecurity skill for monitoring scada modbus traffic anomalies. Follows industry best practices and security standards.3536## When to Use37**Trigger phrases:**38- "monitoring scada modbus traffic anomalies"39- "Monitors Modbus TCP traffic on SCADA and ICS networks to detect anomalous functi"404142- Monitoring OT/ICS networks for unauthorized Modbus commands targeting PLCs, RTUs, or HMIs43- Detecting reconnaissance activity such as Modbus device enumeration (function code 43, Read Device Identification)44- Identifying unauthorized write operations (function codes 05, 06, 15, 16) to coils and holding registers that could alter physical process parameters45- Baselining normal Modbus communication patterns and alerting on deviations in function code distribution, register access ranges, or timing intervals46- Investigating suspected sabotage or insider threats manipulating SCADA process values through Modbus register writes4748**Do not use** on networks without authorization from the asset owner, for active injection or fuzzing against production SCADA systems, or as a replacement for safety-instrumented systems (SIS) that provide physical process protection.495051## When NOT to Use5253- When you lack proper authorization for testing54- For production systems without change management55- When the task requires legal or compliance expertise beyond technical scope565758## Prerequisites5960- Network tap or SPAN port on the OT network segment carrying Modbus TCP traffic (port 502)61- Python 3.9+ with pymodbus (>=3.6), scapy (>=2.5), and pandas for traffic analysis62- Zeek (formerly Bro) installed with the Modbus protocol analyzer enabled for passive traffic logging63- Wireshark or tshark for initial packet capture and validation of Modbus frame structure64- A baseline period of normal operations (minimum 48-72 hours) to establish communication profiles per device pair65- Network diagram identifying Modbus master-slave relationships, device IP addresses, and expected function code usage6667## Workflow6869```python70# Example: IOC detection71import re7273IOC_PATTERNS = {74 "ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",75 "domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",76 "hash_md5": r"\b[a-f0-9]{32}\b",77 "hash_sha256": r"\b[a-f0-9]{64}\b",78}7980def extract_iocs(text: str) -> dict:81 return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}82```83841. **Define Objectives** — Clarify the goals and scope for scada modbus traffic anomalies.852. **Gather Resources** — Collect tools, data, and access needed for scada modbus traffic anomalies.863. **Execute Process** — Carry out scada modbus traffic anomalies operations methodically.874. **Verify Quality** — Check results against acceptance criteria.885. **Document Outcomes** — Record findings, decisions, and next steps.8990## Tools9192- **Analysis Platform** — Data processing and visualization93- **Collaboration Tools** — Team coordination and knowledge sharing949596## Process97981. **Plan** — Define infrastructure requirements, security constraints, rollback strategy991. **Implement** — Configure resources, apply security best practices, test in staging1001. **Deploy & Monitor** — Roll out to production, verify health checks, set up alerting101102## Verification103104- [ ] All scada modbus traffic anomalies procedures executed completely and documented105- [ ] Findings validated against multiple data sources106- [ ] False positives identified and filtered107- [ ] Results documented with evidence and timestamps108- [ ] Recommendations provided with risk-based prioritization109110## Anti-Rationalization Table111112| Rationalization | Reality |113|---|---|114| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |115| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |116| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |