monitoring-scada-modbus-traffic-anomalies
यह क्या करती है
यह सिस्टम industrial नेटवर्क (SCADA/ICS) में Modbus प्रोटोकॉल से होने वाले कम्युनिकेशन ट्रैफ़िक पर नज़र रखता है। यह असामान्य गतिविधियाँ ढूँढता है, जैसे बिना अनुमति के कमांड या शक वाले कम्युनिकेशन पैटर्न, ताकि संभावित सुरक्षा खतरों की पहचान हो सके।
कब इस्तेमाल करें
- ✓Industrial नेटवर्क में बिना अनुमति वाले Modbus कमांड पर नज़र रखने के लिए।
- ✓नेटवर्क पर डिवाइस खोजने की कोशिशों (enumeration) का पता लगाने के लिए।
- ✓औद्योगिक प्रक्रियाओं के पैरामीटर में गलत बदलाव पहचानने के लिए।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/monitoring-scada-modbus-traffic-anomalies/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“हमारे industrial नेटवर्क पर Modbus ट्रैफ़िक में कोई शक वाली गतिविधि देखो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह Modbus डेटा पैकेट का विश्लेषण करता है ताकि समझ सके कि डिवाइस आम तौर पर कैसे बात करते हैं। फिर मौजूदा ट्रैफ़िक की तुलना उस सामान्य पैटर्न से करता है और जो भी असामान्य लगे, उसकी चेतावनी देता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Monitoring SCADA Modbus Traffic Anomalies
When to Use
- 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.
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
Step 1: Capture and Parse Modbus TCP Traffic
Establish passive monitoring on the OT network segment and begin capturing Modbus TCP frames:
- 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 modbus_capture.pcap. - 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:
- Transaction Identifier (2 bytes): Matches requests to responses
- Protocol Identifier (2 bytes): Always 0x0000 for Modbus
- Length (2 bytes): Number of following bytes including Unit ID
- Unit Identifier (1 byte): Slave device address (0-247)
- Extract function codes with Scapy: Use Scapy's Modbus contrib module to dissect captured packets and extract function codes, register addresses, and values:
from scapy.all import rdpcap, TCP from scapy.contrib.modbus import ModbusADURequest, ModbusADUResponse packets = rdpcap("modbus_capture.pcap") for pkt in packets: if pkt.haslayer(ModbusADURequest): adu = pkt[ModbusADURequest] print(f"Src: {pkt['IP'].src} -> Dst: {pkt['IP'].dst} " f"Unit: {adu.unitId} FuncCode: {adu.funcCode}") - Enable Zeek Modbus logging: Configure Zeek with
@load policy/protocols/modbus/known-masters-slavesto generatemodbus.logentries containing timestamp, source/destination IPs, function code, and exception responses. This provides continuous passive logging without custom scripting. - 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.
Step 2: Baseline Normal Communication Patterns
Build a behavioral profile of legitimate Modbus traffic to distinguish normal operations from anomalies:
- 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.
Normal baseline example (72-hour period): HMI (10.1.1.10) -> PLC (10.1.1.50): FC 03 (Read Holding Registers): 432,180 packets (97.2%) FC 04 (Read Input Registers): 10,540 packets (2.4%) FC 06 (Write Single Register): 1,780 packets (0.4%) FC 16 (Write Multiple Registers): 0 packets (0.0%) FC 43 (Read Device ID): 0 packets (0.0%)
…
अक्सर पूछे जाने वाले सवाल
Modbus क्या है?
Modbus एक कम्युनिकेशन प्रोटोकॉल है जो industrial control सिस्टम में इस्तेमाल होता है, ताकि PLC और कंप्यूटर जैसे डिवाइस आपस में बात कर सकें।
Anomalies क्या होते हैं?
Anomalies सामान्य व्यवहार से हटकर होने वाली चीज़ें हैं। इस संदर्भ में ये वे Modbus कम्युनिकेशन पैटर्न हैं जो अपेक्षित नहीं हैं और किसी सुरक्षा समस्या का संकेत हो सकते हैं।
PLC और RTU क्या हैं?
PLC (Programmable Logic Controllers) और RTU (Remote Terminal Units) ऐसे डिवाइस हैं जो industrial control सिस्टम में प्रक्रियाओं को ऑटोमेट और मॉनिटर करने के लिए इस्तेमाल होते हैं।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #8163
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।