Back to catalog
Static reviewDevelopment

Skill dossier

monitoring-scada-modbus-traffic-anomalies

Source declaration

Monitors Modbus TCP traffic on SCADA and ICS networks to detect anomalous function code usage, unauthorized register writes, and suspicious communication patterns. The analyst uses deep packet inspection with pymodbus, Scapy, and Zeek to baseline normal PLC/RTU communication behavior, then applies statistical and rule-based anomaly detection to identify reconnaissance, parameter manipulation, and denial-of-service attacks targeting Modbus devices on port 502. Activates for requests involving Modbus traffic analysis, SCADA network monitoring, ICS anomaly detection, PLC security monitoring, or OT network threat detection.

The author's original description, preserved in English. It describes intent, not verified performance.

Monitors Modbus TCP traffic on SCADA and ICS networks to detect anomalous function code usage, unauthorized register writes, and suspicious communication patterns. The analyst uses deep packet inspection with pymodbus, Scapy, and Zeek to baseline normal PLC/RTU communication behavior, then applies statistical and rule-based anomaly detection to identify reconnaissance, parameter manipulation, and denial-of-service attacks targeting Modbus devices on port 502. Activates for requests involving Modbus traffic analysis, SCADA network monitoring, ICS anomaly detection, PLC security monitoring, or OT network threat detection.

developmentreferencesscripts

Research summary

Machine-generated analysis; pending human review

These observations come from deterministic source parsing, not a human security review or controlled task evaluation.

Monitors Modbus TCP traffic on SCADA and ICS networks to detect anomalous function code usage, unauthorized register writes, and suspicious communication patterns. The analyst uses deep packet inspection with pymodbus, Scapy, and Zeek to baseline normal PLC/RTU communication behavior, then applies statistical and rule-based anomaly detection to identify reconnaissance, parameter manipulation, and denial-of-service attacks targeting Modbus devices on port 502. Activates for requests involving Modbus traffic analysis, SCADA network monitoring, ICS anomaly detection, PLC security monitoring, or OT network threat detection. This bilingual summary is generated deterministically from collected source text and file structure; it is pending human editorial review.

Review scope

Deterministic static analysis of collected SKILL.md and supporting text/code. Machine-assisted candidates and findings await human editorial review; no dynamic behavior or effect is assessed.

Observable capabilities

  • Workflow [Source statement; provisional, not tested. Evidence: skills/monitoring-scada-modbus-traffic-anomalies/SKILL.md:L56]
  • Step 1: Capture and Parse Modbus TCP Traffic [Source statement; provisional, not tested. Evidence: skills/monitoring-scada-modbus-traffic-anomalies/SKILL.md:L58]
  • Step 2: Baseline Normal Communication Patterns [Source statement; provisional, not tested. Evidence: skills/monitoring-scada-modbus-traffic-anomalies/SKILL.md:L83]
  • Step 3: Detect Function Code Anomalies [Source statement; provisional, not tested. Evidence: skills/monitoring-scada-modbus-traffic-anomalies/SKILL.md:L102]
  • Step 4: Monitor Register Values for Process Manipulation [Source statement; provisional, not tested. Evidence: skills/monitoring-scada-modbus-traffic-anomalies/SKILL.md:L133]
  • Step 5: Detect Network-Level Anomalies [Source statement; provisional, not tested. Evidence: skills/monitoring-scada-modbus-traffic-anomalies/SKILL.md:L182]

Limitations & scope

  • Static analysis cannot assess runtime behavior, command success, network reachability, or model output quality.
  • No commands, scripts, network requests, model calls, or controlled skill executions were performed.
  • Category, tags, capabilities, workflows, and bilingual editorial summaries are deterministic candidates pending human review, not verified outcomes.
  • Exact token counts are unavailable until a later pipeline performs and records an official model-specific count.

Relevant for

  • Practitioners evaluating whether to inspect and install the source skill; this audience is inferred from the product context, not measured usage. [Evidence: skills/monitoring-scada-modbus-traffic-anomalies/SKILL.md:L1-L34]

What ships with the skill

The file inventory comes from the collected source at the recorded commit. Paths and sizes are structural observations, not a measure of quality.

files
4
Markdown files
2
scripts
1
references
1
Size
64.7 KB
Structural complexity
Low

File inventory

PathTypeBytes
skills/monitoring-scada-modbus-traffic-anomalies/LICENSEOther11 KB
skills/monitoring-scada-modbus-traffic-anomalies/references/api-reference.mdReference4.9 KB
skills/monitoring-scada-modbus-traffic-anomalies/scripts/agent.pyScript24.8 KB
skills/monitoring-scada-modbus-traffic-anomalies/SKILL.mdInstruction24.1 KB

SKILL.md frontmatter

{
  "name": "monitoring-scada-modbus-traffic-anomalies",
  "description": "Monitors Modbus TCP traffic on SCADA and ICS networks to detect anomalous function code usage, unauthorized register writes, and suspicious communication patterns. The analyst uses deep packet inspection with pymodbus, Scapy, and Zeek to baseline normal PLC/RTU communication behavior, then applies statistical and rule-based anomaly detection to identify reconnaissance, parameter manipulation, and denial-of-service attacks targeting Modbus devices on port 502. Activates for requests involving Modbus traffic analysis, SCADA network monitoring, ICS anomaly detection, PLC security monitoring, or OT network threat detection.\n",
  "domain": "cybersecurity",
  "subdomain": "ot-security",
  "tags": [
    "Modbus-TCP",
    "SCADA",
    "ICS-security",
    "deep-packet-inspection",
    "anomaly-detection",
    "OT-monitoring"
  ],
  "version": "1.0.0",
  "author": "mukul975",
  "license": "Apache-2.0",
  "nist_csf": [
    "PR.IR-01",
    "DE.CM-01",
    "ID.AM-05"
  ],
  "mitre_attack": [
    "T0816",
    "T0836",
    "T0830",
    "T1595"
  ]
}

A reading of the operating sequence

This workflow reconstructs the apparent sequence from source material. Unless controlled evaluation is explicitly recorded, it is provisional—not an observed trace.

  1. 01
    Decision

    When to Use

    Source-described decision candidate under “When to Use”; not verified execution.

  2. 02
    Action

    Workflow

    Source-described action candidate under “Workflow”; not verified execution.

  3. 03
    Action

    Step 1: Capture and Parse Modbus TCP Traffic

    Source-described action candidate under “Step 1: Capture and Parse Modbus TCP Traffic”; not verified execution.

  4. 04
    Action

    Configure network tap: Position the monitoring interface on the SPAN port mirroring the VLAN carrying Modbus TCP traffic between HMI/SCADA servers and PLCs. Verify bidirectional traffic capture with `tcpdump -i eth0 port 502 -c 100 -w modbuscapture.pcap`.

    Source-described action candidate under “Step 1: Capture and Parse Modbus TCP Traffic”; not verified execution.

  5. 05
    Action

    Parse Modbus TCP frame structure: Each Modbus TCP frame contains a 7-byte MBAP (Modbus Application Protocol) header followed by the PDU. The MBAP header includes:

    Source-described action candidate under “Step 1: Capture and Parse Modbus TCP Traffic”; not verified execution.

  6. 06
    Action

    Transaction Identifier (2 bytes): Matches requests to responses

    Source-described action candidate under “Step 1: Capture and Parse Modbus TCP Traffic”; not verified execution.

Inspect all extracted workflow candidates (58 candidate steps)
  1. 07
    Action

    Protocol Identifier (2 bytes): Always 0x0000 for Modbus

    Source-described action candidate under “Step 1: Capture and Parse Modbus TCP Traffic”; not verified execution.

  2. 08
    Action

    Length (2 bytes): Number of following bytes including Unit ID

    Source-described action candidate under “Step 1: Capture and Parse Modbus TCP Traffic”; not verified execution.

  3. 09
    Action

    Unit Identifier (1 byte): Slave device address (0-247)

    Source-described action candidate under “Step 1: Capture and Parse Modbus TCP Traffic”; not verified execution.

  4. 10
    Action

    Extract function codes with Scapy: Use Scapy's Modbus contrib module to dissect captured packets and extract function codes, register addresses, and values:

    Source-described action candidate under “Step 1: Capture and Parse Modbus TCP Traffic”; not verified execution.

  5. 11
    Input

    Enable Zeek Modbus logging: Configure Zeek with `@load policy/protocols/modbus/known-masters-slaves` to generate `modbus.log` entries containing timestamp, source/destination IPs, function code, and exception responses. This provides continuous passive logging without custom scripting.

    Source-described input candidate under “Step 1: Capture and Parse Modbus TCP Traffic”; not verified execution.

  6. 12
    Action

    Validate frame integrity: Check for malformed Modbus frames where the MBAP length field does not match the actual PDU length, Protocol Identifier is not 0x0000, or Unit Identifier falls outside the expected range for the monitored network.

    Source-described action candidate under “Step 1: Capture and Parse Modbus TCP Traffic”; not verified execution.

  7. 13
    Action

    Step 2: Baseline Normal Communication Patterns

    Source-described action candidate under “Step 2: Baseline Normal Communication Patterns”; not verified execution.

  8. 14
    Input

    Catalog function code distribution: Record the frequency of each function code per source-destination pair over the baseline period. In typical SCADA environments, read operations (FC 01-04) vastly outnumber write operations (FC 05, 06, 15, 16), often at ratios exceeding 100:1. A sudden increase in write function codes is a strong indicator of process manipulation.

    Source-described input candidate under “Step 2: Baseline Normal Communication Patterns”; not verified execution.

  9. 15
    Action

    Map register address ranges: Document which holding register and coil address ranges each master polls. PLCs typically expose specific register blocks for monitoring (e.g., registers 0-99 for process values, 100-199 for setpoints). Access to registers outside the documented range indicates reconnaissance or misconfiguration.

    Source-described action candidate under “Step 2: Baseline Normal Communication Patterns”; not verified execution.

  10. 16
    Action

    Establish timing profiles: Calculate the polling interval (mean, standard deviation) for each master-slave pair. SCADA polling is highly periodic, typically 100ms to 5s intervals. Deviations greater than 3 standard deviations from the mean suggest network issues or injected traffic from a rogue master.

    Source-described action candidate under “Step 2: Baseline Normal Communication Patterns”; not verified execution.

  11. 17
    Input

    Identify authorized masters: Record all IP addresses that initiate Modbus requests (master role). In a properly segmented OT network, only the HMI server and engineering workstation should act as Modbus masters. Any new source IP sending Modbus requests is immediately suspicious.

    Source-described input candidate under “Step 2: Baseline Normal Communication Patterns”; not verified execution.

  12. 18
    Action

    Register value ranges: For critical process registers (temperatures, pressures, flow rates, setpoints), record the observed minimum, maximum, mean, and standard deviation during normal operations. Values outside the physical process bounds indicate either sensor failure or malicious manipulation.

    Source-described action candidate under “Step 2: Baseline Normal Communication Patterns”; not verified execution.

  13. 19
    Action

    Step 3: Detect Function Code Anomalies

    Source-described action candidate under “Step 3: Detect Function Code Anomalies”; not verified execution.

  14. 20
    Action

    Apply rule-based and statistical detection to identify suspicious function code usage:

    Source-described action candidate under “Step 3: Detect Function Code Anomalies”; not verified execution.

  15. 21
    Input

    Unauthorized write detection: Alert when a Modbus write function code (05, 06, 15, 16) originates from a source IP not in the authorized writers list, or when write operations exceed the baseline frequency threshold:

    Source-described input candidate under “Step 3: Detect Function Code Anomalies”; not verified execution.

  16. 22
    Input

    Reconnaissance detection: Function code 43 (Read Device Identification) and function code 08 (Diagnostics) are rarely used during normal operations. Any occurrence from a non-engineering workstation indicates device enumeration. Also detect sequential scanning where a single source queries multiple Unit IDs within a short window.

    Source-described input candidate under “Step 3: Detect Function Code Anomalies”; not verified execution.

  17. 23
    Action

    Exception response monitoring: Modbus exception codes (01: Illegal Function, 02: Illegal Data Address, 03: Illegal Data Value) in responses indicate the master sent an invalid request. A burst of exception responses suggests fuzzing or protocol-level attacks:

    Source-described action candidate under “Step 3: Detect Function Code Anomalies”; not verified execution.

  18. 24
    Input

    Forbidden function code detection: Some environments prohibit certain function codes entirely. Function codes 07 (Read Exception Status), 08 (Diagnostics), 17 (Report Slave ID), and 43 (Read Device Identification) are diagnostic functions that should not appear in production SCADA traffic. Alert on any occurrence.

    Source-described input candidate under “Step 3: Detect Function Code Anomalies”; not verified execution.

  19. 25
    Decision

    Function code frequency anomaly: Calculate the chi-squared statistic comparing the observed function code distribution against the baseline distribution. A significant deviation (p < 0.01) triggers an alert even if no individual function code crosses its threshold.

    Source-described decision candidate under “Step 3: Detect Function Code Anomalies”; not verified execution.

  20. 26
    Action

    Step 4: Monitor Register Values for Process Manipulation

    Source-described action candidate under “Step 4: Monitor Register Values for Process Manipulation”; not verified execution.

  21. 27
    Output

    Setpoint change monitoring: Track all write operations to holding registers that control process setpoints (temperatures, pressures, valve positions, motor speeds). Alert when:

    Source-described output candidate under “Step 4: Monitor Register Values for Process Manipulation”; not verified execution.

  22. 28
    Action

    The new value exceeds the defined safe operating range

    Source-described action candidate under “Step 4: Monitor Register Values for Process Manipulation”; not verified execution.

  23. 29
    Output

    The rate of change exceeds physical process capabilities (e.g., temperature setpoint jumping 50 degrees in one write)

    Source-described output candidate under “Step 4: Monitor Register Values for Process Manipulation”; not verified execution.

  24. 30
    Action

    Multiple setpoints change simultaneously, which does not match normal operator behavior

    Source-described action candidate under “Step 4: Monitor Register Values for Process Manipulation”; not verified execution.

  25. 31
    Action

    Coil state monitoring: Track coil writes (FC 05, FC 15) that control discrete outputs (pumps on/off, valves open/close, breakers trip/close). Detect rapid toggling (more than N state changes per minute) which could indicate equipment damage attempts.

    Source-described action candidate under “Step 4: Monitor Register Values for Process Manipulation”; not verified execution.

  26. 32
    Decision

    Register read pattern anomaly: If a master begins reading register ranges it has never accessed before, this may indicate an attacker using a compromised HMI to map the PLC memory layout before launching a targeted write attack.

    Source-described decision candidate under “Step 4: Monitor Register Values for Process Manipulation”; not verified execution.

  27. 33
    Action

    Correlation with process data: Where available, compare Modbus register values against independent process sensors (e.g., historian data). Discrepancies between the Modbus-reported value and the independent sensor indicate either sensor spoofing or register manipulation.

    Source-described action candidate under “Step 4: Monitor Register Values for Process Manipulation”; not verified execution.

  28. 34
    Action

    Step 5: Detect Network-Level Anomalies

    Source-described action candidate under “Step 5: Detect Network-Level Anomalies”; not verified execution.

  29. 35
    Input

    Rogue master detection: Alert when a new source IP initiates Modbus TCP connections to port 502 on any slave device. Maintain a whitelist of authorized master IPs and generate a critical alert for any connection from an unknown source:

    Source-described input candidate under “Step 5: Detect Network-Level Anomalies”; not verified execution.

  30. 36
    Action

    Transaction ID anomaly: Modbus TCP uses transaction IDs to match requests with responses. Under normal operation, transaction IDs increment sequentially per master. Detect:

    Source-described action candidate under “Step 5: Detect Network-Level Anomalies”; not verified execution.

  31. 37
    Action

    Duplicate transaction IDs from different sources (replay attack indicator)

    Source-described action candidate under “Step 5: Detect Network-Level Anomalies”; not verified execution.

  32. 38
    Action

    Transaction ID gaps or resets (session hijacking indicator)

    Source-described action candidate under “Step 5: Detect Network-Level Anomalies”; not verified execution.

  33. 39
    Action

    Responses with transaction IDs that do not match any recent request (injected response)

    Source-described action candidate under “Step 5: Detect Network-Level Anomalies”; not verified execution.

  34. 40
    Action

    Timing anomaly detection: Calculate inter-packet arrival times for each master-slave pair. Flag deviations greater than 3 standard deviations using a sliding window:

    Source-described action candidate under “Step 5: Detect Network-Level Anomalies”; not verified execution.

  35. 41
    Action

    Connection flood detection: Monitor the rate of new TCP connections to port 502 per slave device. Modbus slaves typically handle 1-5 persistent connections. More than 10 connection attempts per minute to a single slave indicates a connection flood DoS or scanning activity.

    Source-described action candidate under “Step 5: Detect Network-Level Anomalies”; not verified execution.

  36. 42
    Action

    Payload size anomaly: Modbus PDU max size is 253 bytes. Alert on oversized frames that exceed protocol limits, as these may indicate buffer overflow exploitation attempts against vulnerable PLC firmware.

    Source-described action candidate under “Step 5: Detect Network-Level Anomalies”; not verified execution.

  37. 43
    Action

    Key Concepts

    Source-described action candidate under “Key Concepts”; not verified execution.

  38. 44
    Action

    Tools & Systems

    Source-described action candidate under “Tools & Systems”; not verified execution.

  39. 45
    Action

    Common Scenarios

    Source-described action candidate under “Common Scenarios”; not verified execution.

  40. 46
    Action

    Deploy a network tap on the OT VLAN switch mirroring all port 502 traffic to the monitoring interface. Run Zeek with Modbus logging and the custom Python analyzer in parallel.

    Source-described action candidate under “Scenario: Detecting Unauthorized Parameter Manipulation in a Water Treatment Plant”; not verified execution.

  41. 47
    Action

    Establish a 72-hour baseline during normal operations, cataloging function code distribution, register access patterns, and polling intervals for all six master-slave pairs.

    Source-described action candidate under “Scenario: Detecting Unauthorized Parameter Manipulation in a Water Treatment Plant”; not verified execution.

  42. 48
    Input

    Baseline reveals the SCADA server only uses FC 03 (Read Holding Registers) and FC 06 (Write Single Register) to PLC-3 (chemical dosing), with writes occurring 2-4 times per day matching operator shift changes.

    Source-described input candidate under “Scenario: Detecting Unauthorized Parameter Manipulation in a Water Treatment Plant”; not verified execution.

  43. 49
    Output

    On day 5, the analyzer detects FC 16 (Write Multiple Registers) from 10.1.1.10 to PLC-3, a function code never seen in the baseline. The write targets registers 40050-40055, which control chlorine dosing rates.

    Source-described output candidate under “Scenario: Detecting Unauthorized Parameter Manipulation in a Water Treatment Plant”; not verified execution.

  44. 50
    Action

    Seconds later, a second alert fires: the chlorine dosing setpoint in register 40050 changed from 2.5 mg/L to 25.0 mg/L, exceeding the safe maximum of 4.0 mg/L defined in the register value limits.

    Source-described action candidate under “Scenario: Detecting Unauthorized Parameter Manipulation in a Water Treatment Plant”; not verified execution.

  45. 51
    Action

    Cross-referencing with IT network logs reveals the SCADA server was accessed via Remote Desktop from an unauthorized VPN connection 20 minutes before the anomalous Modbus traffic.

    Source-described action candidate under “Scenario: Detecting Unauthorized Parameter Manipulation in a Water Treatment Plant”; not verified execution.

  46. 52
    Action

    The operations team is notified, the chemical dosing PLC is placed in manual override, and the incident response team isolates the compromised SCADA server.

    Source-described action candidate under “Scenario: Detecting Unauthorized Parameter Manipulation in a Water Treatment Plant”; not verified execution.

  47. 53
    Action

    Filter Modbus traffic logs for all activity from 10.1.2.20 over the past 24 hours and compare against the baseline communication profile for that workstation.

    Source-described action candidate under “Scenario: Identifying Modbus Device Enumeration from a Compromised Engineering Workstation”; not verified execution.

  48. 54
    Action

    Baseline shows 10.1.2.20 communicates with PLC-1 (10.1.1.50) only during scheduled maintenance windows using FC 03 and FC 06, approximately 200 packets per session.

    Source-described action candidate under “Scenario: Identifying Modbus Device Enumeration from a Compromised Engineering Workstation”; not verified execution.

  49. 55
    Input

    Anomaly detection identifies 10.1.2.20 sent FC 43 (Read Device Identification) to 15 different IP addresses on the OT VLAN within a 10-minute window, none of which it has previously communicated with.

    Source-described input candidate under “Scenario: Identifying Modbus Device Enumeration from a Compromised Engineering Workstation”; not verified execution.

  50. 56
    Input

    Further analysis shows FC 03 read requests to register ranges 0-9999 in blocks of 125 registers per request, systematically mapping the entire register space of each PLC contacted.

    Source-described input candidate under “Scenario: Identifying Modbus Device Enumeration from a Compromised Engineering Workstation”; not verified execution.

  51. 57
    Action

    The engineering workstation is isolated, forensic imaging initiated, and all Modbus communication from that IP is blocked at the OT firewall. The device identification responses captured reveal the PLC firmware versions that the attacker obtained.

    Source-described action candidate under “Scenario: Identifying Modbus Device Enumeration from a Compromised Engineering Workstation”; not verified execution.

  52. 58
    Output

    Output Format

    Source-described output candidate under “Output Format”; not verified execution.

Potential risk surfaces

Static findings identify points to inspect before installation. They do not establish that a skill is safe, malicious, or effective.

Items warrant review

57 deterministic lexical finding(s) require review across the collected text. Findings can occur in documentation and do not prove execution or exploitability; binary-only files were not scanned.

Network accessObserved
File writesObserved
Credential useNot observed
Medium

Network access is mentioned

2 occurrences

A URL or network client appears in this source line. Review destinations, data sent, and trust boundaries; static text cannot establish actual network activity. This rule matched 2 location(s) in the collected text; 2 representative location(s) are cited. Matching text may be documentation, and the analyzer did not execute it.

Note

File modification is described or implemented

55 occurrences

This line contains a possible file-write or redirection operation. Check destination paths and overwrite behavior; the static review did not write any file. This rule matched 55 location(s) in the collected text; 3 representative location(s) are cited. Matching text may be documentation, and the analyzer did not execute it.

Where context can be spent

Discovery, activation, and resource layers have different meanings. Exact values appear only when the official token-counting method was run with a named model.

Exact token counts unavailable

All token values, including per-file inventory, are null until the pipeline performs an official exact count with an explicit model.

No token measurement was recorded with the required official method. This dossier does not substitute character counts, file sizes, or estimates.

Controlled evaluation

No controlled evaluation

This skill has only the evidence identified above. No task success, token efficiency, latency, or quality advantage is claimed.

Not tested

Use with the source in view

Install command
Inspect the pinned source at https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/54a798831d2266a3ca61ce68a7acb80b81160d57/skills/monitoring-scada-modbus-traffic-anomalies/SKILL.md and follow the source repository's installation instructions. No installation was performed or verified by this static analyzer. Source license: Apache-2.0.

Prerequisites

  • Static analysis cannot assess runtime behavior, command success, network reachability, or model output quality.
  • No commands, scripts, network requests, model calls, or controlled skill executions were performed.
  • Category, tags, capabilities, workflows, and bilingual editorial summaries are deterministic candidates pending human review, not verified outcomes.
  • Exact token counts are unavailable until a later pipeline performs and records an official model-specific count.

Example prompts

Not provided

A decision, with its limits attached

Strengths

  • The snapshot contains 4 collected file(s), 2 Markdown file(s), and 1 script file(s), enabling source-level inspection. [Evidence: skills/monitoring-scada-modbus-traffic-anomalies/SKILL.md:L1]

Considerations

  • No functional, security, or model-quality result has been established. Human review must inspect source context and all cited findings before installation or publication.
Research conclusion

Provisional deterministic static inventory only; pending human editorial review and, separately, controlled evaluation. No install recommendation, security assurance, or effectiveness claim is made.

Traceable by construction

The dossier is a time-bound reading of a public artifact, not an endorsement. Use the source link to inspect the exact upstream material.

mukul975Anthropic-Cybersecurity-Skillsskills/monitoring-scada-modbus-traffic-anomalies
Source type
Community
Commit
54a798831d2266a3ca61ce68a7acb80b81160d57
Collected
20 Nov 2026
Last checked
20 Nov 2026
Upstream license
Apache-2.0
Repository stars
36,446
Content basis

Deterministic lexical parsing, YAML frontmatter validation, file inventory, source-described workflow extraction, and heuristic provisional classification of the supplied files only. Generated by machine; no LLM, execution, dynamic testing, or human editorial approval.