본문으로 건너뛰기
Skillpedia
보안35k · #8163

monitoring-scada-modbus-traffic-anomalies

하는 일

이 시스템은 Modbus 프로토콜을 사용하는 산업 네트워크(SCADA/ICS)의 통신 트래픽을 모니터링합니다. 승인되지 않은 명령이나 의심스러운 통신 패턴처럼 특이한 활동을 찾아 잠재적인 보안 위협을 식별하는 데 도움을 줍니다.

사용하는 경우

  • ✓승인되지 않은 Modbus 명령이 있는지 산업 네트워크를 모니터링할 때.
  • ✓네트워크에서 장치를 찾으려는 시도(열거)를 탐지할 때.
  • ✓산업 공정 매개변수의 부적절한 변경을 식별할 때.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/monitoring-scada-modbus-traffic-anomalies/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/monitoring-scada-modbus-traffic-anomalies/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리 산업 네트워크의 Modbus 트래픽에 의심스러운 활동이 있는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 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-slaves to generate modbus.log entries 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란 무엇인가요?

산업 제어 시스템에서 PLC나 컴퓨터 같은 장치들이 서로 통신할 수 있게 하는 통신 프로토콜입니다.

이상(anomalies)이란 무엇인가요?

정상적인 동작에서 벗어난 것입니다. 이 맥락에서는 예상과 다른 Modbus 통신 패턴을 말하며, 이는 보안 문제를 나타낼 수 있습니다.

PLC와 RTU란 무엇인가요?

PLC(프로그래머블 로직 컨트롤러)와 RTU(원격 터미널 장치)는 산업 제어 시스템에서 공정을 자동화하고 모니터링하는 데 사용하는 장치입니다.

상세 정보

작성자의 원본 설명

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

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#8163
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬