Skillpedia
النشر والسحابة (DevOps)35k · #7791

detecting-anomalies-in-industrial-control-systems

ما الذي تفعله

تستخدم هذه المهارة الذكاء الاصطناعي لاكتشاف سلوكيات غريبة في أنظمة التحكم الصناعية. تتعلم كيف يعمل النظام عادةً، وتنبهك إذا حدث شيء غير معتاد، مثل جهاز مجهول أو نمط تواصل مختلف.

متى تستخدمها

  • ✓عندما تريد مراقبة الأنظمة الصناعية المستمرة التي لا تملك كشفًا للتسلل.
  • ✓عندما تريد بناء نظام يكتشف السلوكيات غير المعتادة في الشبكات الصناعية.
  • ✓عندما تحقق في تنبيهات الأمان ولفهم حركة الشبكة بشكل أفضل.

رابط المهارة

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-anomalies-in-industrial-control-systems/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-anomalies-in-industrial-control-systems/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“حلّل حركة شبكتي الصناعية لاكتشاف الأنشطة المشبوهة.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تراقب المهارة أولًا طريقة عمل النظام المعتادة لبضعة أسابيع، وتسجل أنماط التواصل. ثم تستخدم هذه الأنماط لتحديد أي شيء يحيد عن المعتاد.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Detecting Anomalies in Industrial Control Systems

When to Use

  • When deploying continuous monitoring for OT environments that lack intrusion detection
  • When building behavior-based detection to complement signature-based IDS in OT networks
  • When establishing baselines for deterministic SCADA communications to detect deviations
  • When integrating machine learning anomaly detection with OT security monitoring platforms
  • When investigating alerts from Nozomi Guardian or Dragos Platform that require deeper analysis

Do not use for signature-based detection of known exploits (see detecting-attacks-on-scada-systems), for IT network anomaly detection without OT protocols, or as a replacement for process safety systems (SIS).

Prerequisites

  • Passive network monitoring sensors on OT network SPAN/TAP ports
  • Minimum 2-4 weeks of baseline traffic capture during normal operations
  • Python 3.9+ with scikit-learn, numpy, pandas for ML model training
  • Process historian access for physical process correlation data
  • Understanding of normal operational patterns including shift changes, batch processes, and maintenance windows

Workflow

Step 1: Build Multi-Dimensional Baseline Model

Capture and model the deterministic behavior of ICS communications across multiple dimensions: timing, protocol behavior, and network topology.

#!/usr/bin/env python3
"""ICS Anomaly Detection System.

Builds multi-dimensional baselines from OT network traffic and
detects anomalies using statistical and machine learning methods.
Designed for deterministic SCADA communication patterns.
"""

import json
import sys
import time
import warnings
from collections import defaultdict
from datetime import datetime, timedelta
from dataclasses import dataclass, field

import numpy as np
import pandas as pd
from sklearn.ensemble import IsolationForest
from sklearn.preprocessing import StandardScaler

warnings.filterwarnings("ignore")


@dataclass
class CommunicationProfile:
    """Profile for a single master-slave communication pair."""
    src_ip: str
    dst_ip: str
    protocol: str
    port: int
    avg_interval_ms: float = 0.0
    std_interval_ms: float = 0.0
    avg_payload_size: float = 0.0
    function_codes: dict = field(default_factory=dict)
    packets_per_minute: float = 0.0
    first_seen: str = ""
    last_seen: str = ""


class ICSAnomalyDetector:
    """Multi-dimensional anomaly detection for ICS environments."""

    def __init__(self):
        self.profiles = {}
        self.topology_baseline = set()
        self.timing_model = None
        self.isolation_forest = None
        self.scaler = StandardScaler()
        self.anomalies = []
        self.training_data = []

    def build_baseline_from_pcap(self, pcap_data):
        """Build baselines from parsed pcap data (list of flow records)."""
        print("[*] Building ICS communication baselines...")

        for flow in pcap_data:
            key = f"{flow['src']}->{flow['dst']}:{flow['port']}"

            if key not in self.profiles:
                self.profiles[key] = CommunicationProfile(
                    src_ip=flow["src"],
                    dst_ip=flow["dst"],
                    protocol=flow.get("protocol", "TCP"),
                    port=flow["port"],
                    first_seen=flow.get("timestamp", ""),
                )

            profile = self.profiles[key]
            profile.last_seen = flow.get("timestamp", "")

            # Track function codes for industrial protocols
            fc = flow.get("function_code")
            if fc is not None:
                profile.function_codes[fc] = profile.function_codes.get(fc, 0) + 1

            # Add to topology baseline
            self.topology_baseline.add((flow["src"], flow["dst"], flow["port"]))

        # Calculate interval statistics
        self._calculate_timing_stats(pcap_data)

        print(f"  Communication pairs: {len(self.profiles)}")
        print(f"  Topology entries: {len(self.topology_baseline)}")

    def _calculate_timing_stats(self, flows):
        """Calculate packet timing statistics per communication pair."""
        timestamps = defaultdict(list)
        for flow in flows:
            key = f"{flow['src']}->{flow['dst']}:{flow['port']}"
            ts = flow.get("timestamp_epoch")
            if ts:
                timestamps[key].append(ts)

        for key, ts_list in timestamps.items():
            if key in self.profiles and len(ts_list) > 1:

…
الأسئلة الشائعة

ما هي « أنظمة التحكم الصناعية » (ICS)؟

هي الحواسيب والشبكات التي تتحكم في العمليات الحيوية، مثل توليد الكهرباء وإمدادات المياه والتصنيع.

ما هي « الشذوذات » في هذا السياق؟

الشذوذات أحداث أو أنماط تواصل تحيد عن السلوك الطبيعي والمتوقع للنظام، وهي هنا أنشطة غريبة في الشبكة الصناعية.

هل أحتاج إلى معرفة تقنية لاستخدام هذه المهارة؟

يُستحسن بعض المعرفة بالشبكات الصناعية وطريقة عملها، لكن المهارة صُممت لتبسيط رصد الشذوذات.

التفاصيل

الوصف الأصلي من المؤلف

Deploys anomaly detection for OT/ICS environments using machine learning on OT network baselines, physics-based process models, and Modbus/DNP3/OPC UA traffic analysis to flag deviations, rogue devices, and mismatches against historian data. Use for continuous OT monitoring, baselining deterministic SCADA polling, or investigating alerts from Nozomi Guardian/Dragos needing deeper protocol analysis

repo: mukul975/Anthropic-Cybersecurity-Skills

الشعبية

نجوم GitHub
35k
الترتيب
#7791
الترخيص
Apache-2.0
آخر تحديث
31‏/8‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة