[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71AY2S99H41N0BS0WAVS67N":3,"skill-same:01M71AY2S99H41N0BS0WAVS67N":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":6,"ownerHtmlUrl":58,"ownerBlogUrl":6,"ownerDescription":59,"updatedAt":60,"install":61,"resources":73},"01M71AY2S99H41N0BS0WAVS67N","cyber-detecting-anomalies-in-industrial-control-systems",null,"This skill covers deploying anomaly detection systems for industrial control environments using machine learning models trained on OT network baselines, physics-based process models, and behavioral analysis of industrial protocol communications. It addresses building normal behavior profiles for SCADA polling patterns, detecting deviations in Modbus\u002FDNP3\u002FOPC UA traffic, identifying rogue devices,","nexuslinkproductions\u002Fyuri-os","nexuslinkproductions","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F273246263?v=4","01M718YX9NZRCW50B59B8ZVDKN","Marcel Spatz","01M718YXAQ7530F4B1VKN6SFQV",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-detecting-anomalies-in-industrial-control-systems\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"control systems","detecting anomalies in industrial control systems","cyber detecting anomalies in industrial control systems","control","systems","detecting","anomaly","modbus","environments","behavioral","patterns","addresses","network","communications","analysis","false","cybersecurity","traffic","normal","physics","2026-11-10 10:12:30",false,"---\nname: cyber-detecting-anomalies-in-industrial-control-systems\ndescription: \"This skill covers deploying anomaly detection systems for industrial control environments using machine learning models trained on OT network baselines, physics-based process models, and behavioral analysis of industrial protocol communications. It addresses building normal behavior profiles for SCADA polling patterns, detecting deviations in Modbus\u002FDNP3\u002FOPC UA traffic, identifying rogue devices, \"\nsource: mukul975\u002FAnthropic-Cybersecurity-Skills\nlicense: Apache-2.0\nauthorized_lab: false\norigin_frontmatter: \"name: detecting-anomalies-in-industrial-control-systems | description: 'This skill covers deploying anomaly detection systems for industrial |   control environments using machine learning models trained on OT network baselines, |   physics-based process models, and behavioral analysis of industrial protocol communications. |   It addresses building normal behavior profiles for SCADA polling patterns, detecting |   deviations in Modbus\u002FDNP3\u002FOPC UA traffic, identifying rogue devices, and correlat\"\nhide: true\n---\n\n> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Detecting Anomalies in Industrial Control Systems\n\n## When to Use\n\n- When deploying continuous monitoring for OT environments that lack intrusion detection\n- When building behavior-based detection to complement signature-based IDS in OT networks\n- When establishing baselines for deterministic SCADA communications to detect deviations\n- When integrating machine learning anomaly detection with OT security monitoring platforms\n- When investigating alerts from Nozomi Guardian or Dragos Platform that require deeper analysis\n\n**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).\n\n## Prerequisites\n\n- Passive network monitoring sensors on OT network SPAN\u002FTAP ports\n- Minimum 2-4 weeks of baseline traffic capture during normal operations\n- Python 3.9+ with scikit-learn, numpy, pandas for ML model training\n- Process historian access for physical process correlation data\n- Understanding of normal operational patterns including shift changes, batch processes, and maintenance windows\n\n## Workflow\n\n### Step 1: Build Multi-Dimensional Baseline Model\n\nCapture and model the deterministic behavior of ICS communications across multiple dimensions: timing, protocol behavior, and network topology.\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"ICS Anomaly Detection System.\n\nBuilds multi-dimensional baselines from OT network traffic and\ndetects anomalies using statistical and machine learning methods.\nDesigned for deterministic SCADA communication patterns.\n\"\"\"\n\nimport json\nimport sys\nimport time\nimport warnings\nfrom collections import defaultdict\nfrom datetime import datetime, timedelta\nfrom dataclasses import dataclass, field\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.ensemble import IsolationForest\nfrom sklearn.preprocessing import StandardScaler\n\nwarnings.filterwarnings(\"ignore\")\n\n\n@dataclass\nclass CommunicationProfile:\n    \"\"\"Profile for a single master-slave communication pair.\"\"\"\n    src_ip: str\n    dst_ip: str\n    protocol: str\n    port: int\n    avg_interval_ms: float = 0.0\n    std_interval_ms: float = 0.0\n    avg_payload_size: float = 0.0\n    function_codes: dict = field(default_factory=dict)\n    packets_per_minute: float = 0.0\n    first_seen: str = \"\"\n    last_seen: str = \"\"\n\n\nclass ICSAnomalyDetector:\n    \"\"\"Multi-dimensional anomaly detection for ICS environments.\"\"\"\n\n    def __init__(self):\n        self.profiles = {}\n        self.topology_baseline = set()\n        self.timing_model = None\n        self.isolation_forest = None\n        self.scaler = StandardScaler()\n        self.anomalies = []\n        self.training_data = []\n\n    def build_baseline_from_pcap(self, pcap_data):\n        \"\"\"Build baselines from parsed pcap data (list of flow records).\"\"\"\n        print(\"[*] Building ICS communication baselines...\")\n\n        for flow in pcap_data:\n            key = f\"{flow['src']}->{flow['dst']}:{flow['port']}\"\n\n            if key not in self.profiles:\n                self.profiles[key] = CommunicationProfile(\n                    src_ip=flow[\"src\"],\n                    dst_ip=flow[\"dst\"],\n                    protocol=flow.get(\"protocol\", \"TCP\"),\n                    port=flow[\"port\"],\n                    first_seen=flow.get(\"timestamp\", \"\"),\n                )\n\n            profile = self.profiles[key]\n            profile.last_seen = flow.get(\"timestamp\", \"\")\n\n            # Track function codes for industrial protocols\n            fc = flow.get(\"function_code\")\n            if fc is not None:\n                profile.function_codes[fc] = profile.function_codes.get(fc, 0) + 1\n\n            # Add to topology baseline\n            self.topology_baseline.add((flow[\"src\"], flow[\"dst\"], flow[\"port\"]))\n\n        # Calculate interval statistics\n        self._calculate_timing_stats(pcap_data)\n\n        print(f\"  Communication pairs: {len(self.profiles)}\")\n        print(f\"  Topology entries: {len(self.topology_baseline)}\")\n\n    def _calculate_timing_stats(self, flows):\n        \"\"\"Calculate packet timing statistics per communication pair.\"\"\"\n        timestamps = defaultdict(list)\n        for flow in flows:\n            key = f\"{flow['src']}->{flow['dst']}:{flow['port']}\"\n            ts = flow.get(\"timestamp_epoch\")\n            if ts:\n                timestamps[key].append(ts)\n\n        for key, ts_list in timestamps.items():\n            if key in self.profiles and len(ts_list) > 1:\n                ts_sorted = sorted(ts_list)\n                intervals = [\n                    (ts_sorted[i+1] - ts_sorted[i]) * 1000\n                    for i in range(len(ts_sorted) - 1)\n                ]\n                self.profiles[key].avg_interval_ms = np.mean(intervals)\n                self.profiles[key].std_interval_ms = np.std(intervals)\n                duration_min = (ts_sorted[-1] - ts_sorted[0]) \u002F 60\n                if duration_min > 0:\n                    self.profiles[key].packets_per_minute = len(ts_list) \u002F duration_min\n\n    def train_isolation_forest(self, features_df):\n        \"\"\"Train Isolation Forest model on feature vectors from baseline traffic.\"\"\"\n        print(\"[*] Training Isolation Forest model...\")\n\n        feature_cols = [\n            \"interval_ms\", \"payload_size\", \"packets_per_window\",\n            \"unique_func_codes\", \"new_connection_flag\",\n        ]\n\n        available_cols = [c for c in feature_cols if c in features_df.columns]\n        X = features_df[available_cols].fillna(0).values\n\n        X_scaled = self.scaler.fit_transform(X)\n\n        self.isolation_forest = IsolationForest(\n            n_estimators=200,\n            contamination=0.01,  # Expect 1% anomaly rate in baseline\n            random_state=42,\n            n_jobs=-1,\n        )\n        self.isolation_forest.fit(X_scaled)\n\n        scores = self.isolation_forest.decision_function(X_scaled)\n        print(f\"  Model trained on {len(X)} samples\")\n        print(f\"  Anomaly score range: [{scores.min():.4f}, {scores.max():.4f}]\")\n        print(f\"  Threshold: {np.percentile(scores, 1):.4f}\")\n\n    def detect_topology_anomaly(self, src_ip, dst_ip, port):\n        \"\"\"Detect new\u002Funauthorized communication pairs.\"\"\"\n        if (src_ip, dst_ip, port) not in self.topology_baseline:\n            return {\n                \"type\": \"NEW_COMMUNICATION_PAIR\",\n                \"severity\": \"high\",\n                \"detail\": f\"New connection: {src_ip} -> {dst_ip}:{port} not in baseline\",\n                \"recommendation\": \"Verify if this is an authorized new device or configuration change\",\n            }\n        return None\n\n    def detect_timing_anomaly(self, src_ip, dst_ip, port, interval_ms):\n        \"\"\"Detect polling interval deviations.\"\"\"\n        key = f\"{src_ip}->{dst_ip}:{port}\"\n        profile = self.profiles.get(key)\n\n        if profile and profile.std_interval_ms > 0:\n            z_score = abs(interval_ms - profile.avg_interval_ms) \u002F profile.std_interval_ms\n            if z_score > 4.0:\n                return {\n                    \"type\": \"TIMING_ANOMALY\",\n                    \"severity\": \"medium\",\n                    \"detail\": (\n                        f\"Interval {interval_ms:.1f}ms deviates from baseline \"\n                        f\"{profile.avg_interval_ms:.1f}ms (z-score: {z_score:.1f})\"\n                    ),\n                    \"recommendation\": \"Check for network congestion, device malfunction, or MITM attack\",\n                }\n        return None\n\n    def detect_function_code_anomaly(self, src_ip, dst_ip, port, func_code):\n        \"\"\"Detect unauthorized Modbus\u002FDNP3 function codes.\"\"\"\n        key = f\"{src_ip}->{dst_ip}:{port}\"\n        profile = self.profiles.get(key)\n\n        if profile and func_code not in profile.function_codes:\n            severity = \"critical\" if func_code in {5, 6, 15, 16, 8} else \"high\"\n            return {\n                \"type\": \"UNAUTHORIZED_FUNCTION_CODE\",\n                \"severity\": severity,\n                \"detail\": (\n                    f\"Function code {func_code} from {src_ip} to {dst_ip}:{port} \"\n                    f\"not in baseline. Allowed: {list(profile.function_codes.keys())}\"\n                ),\n                \"recommendation\": \"Investigate source - possible command injection attack\",\n            }\n        return None\n\n    def analyze_flow(self, flow):\n        \"\"\"Analyze a single network flow against all detection models.\"\"\"\n        results = []\n\n        # Topology check\n        topo = self.detect_topology_anomaly(flow[\"src\"], flow[\"dst\"], flow[\"port\"])\n        if topo:\n            results.append(topo)\n\n        # Timing check\n        if \"interval_ms\" in flow:\n            timing = self.detect_timing_anomaly(\n                flow[\"src\"], flow[\"dst\"], flow[\"port\"], flow[\"interval_ms\"])\n            if timing:\n                results.append(timing)\n\n        # Function code check\n        if \"function_code\" in flow:\n            fc = self.detect_function_code_anomaly(\n                flow[\"src\"], flow[\"dst\"], flow[\"port\"], flow[\"function_code\"])\n            if fc:\n                results.append(fc)\n\n        self.anomalies.extend(results)\n        return results\n\n    def generate_report(self):\n        \"\"\"Generate anomaly detection report.\"\"\"\n        print(f\"\\n{'='*60}\")\n        print(f\"ICS ANOMALY DETECTION REPORT\")\n        print(f\"{'='*60}\")\n        print(f\"Baseline Profiles: {len(self.profiles)}\")\n        print(f\"Anomalies Detected: {len(self.anomalies)}\")\n\n        severity_counts = defaultdict(int)\n        for a in self.anomalies:\n            severity_counts[a[\"severity\"]] += 1\n\n        for sev in [\"critical\", \"high\", \"medium\", \"low\"]:\n            if severity_counts[sev]:\n                print(f\"  {sev.upper()}: {severity_counts[sev]}\")\n\n        for a in self.anomalies[:20]:\n            print(f\"\\n  [{a['severity'].upper()}] {a['type']}\")\n            print(f\"    {a['detail']}\")\n\n\nif __name__ == \"__main__\":\n    print(\"ICS Anomaly Detection System\")\n    print(\"Load baseline data and call analyze_flow() for real-time detection\")\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Deterministic Traffic | ICS networks exhibit highly predictable communication patterns where the same master polls the same slaves at fixed intervals with identical function codes |\n| Isolation Forest | Unsupervised machine learning algorithm that isolates anomalies by randomly partitioning feature space, effective for OT traffic with low anomaly rates |\n| Polling Interval | Time between consecutive SCADA master requests to a slave device, typically fixed and configurable (100ms to 10s) |\n| Function Code Allowlist | Set of permitted industrial protocol operations for each communication pair, enforced by anomaly detection rules |\n| Topology Baseline | Complete map of all authorized device-to-device communication paths in the OT network |\n| Physics-Based Detection | Using physical process models (thermodynamics, fluid dynamics) to detect attacks that manipulate the process while spoofing sensor data |\n\n## Tools & Systems\n\n- **Nozomi Networks Guardian**: OT anomaly detection with AI-powered baseline learning and industrial protocol analysis\n- **Dragos Platform**: Threat detection using behavioral analytics and threat intelligence specific to ICS environments\n- **Scikit-learn**: Python ML library with Isolation Forest, One-Class SVM, and Local Outlier Factor for anomaly detection\n- **Zeek with OT plugins**: Network security monitor with Modbus, DNP3, and BACnet protocol analyzers for baseline building\n\n## Output Format\n\n```\nICS Anomaly Detection Report\n==============================\nDetection Period: YYYY-MM-DD to YYYY-MM-DD\nBaseline Size: [N] communication profiles\n\nANOMALIES DETECTED: [N]\n  Critical: [N]  High: [N]  Medium: [N]  Low: [N]\n\n[SEVERITY] ANOMALY_TYPE\n  Source: [IP] -> Target: [IP]:[Port]\n  Detail: [Description of deviation from baseline]\n  Baseline: [Expected behavior]\n  Observed: [Actual behavior]\n```\n","> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Detecting Anomalies in Industrial Control Systems\n\n## When to Use\n\n- When deploying continuous monitoring for OT environments that lack intrusion detection\n- When building behavior-based detection to complement signature-based IDS in OT networks\n- When establishing baselines for deterministic SCADA communications to detect deviations\n- When integrating machine learning anomaly detection with OT security monitoring platforms\n- When investigating alerts from Nozomi Guardian or Dragos Platform that require deeper analysis\n\n**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).\n\n## Prerequisites\n\n- Passive network monitoring sensors on OT network SPAN\u002FTAP ports\n- Minimum 2-4 weeks of baseline traffic capture during normal operations\n- Python 3.9+ with scikit-learn, numpy, pandas for ML model training\n- Process historian access for physical process correlation data\n- Understanding of normal operational patterns including shift changes, batch processes, and maintenance windows\n\n## Workflow\n\n### Step 1: Build Multi-Dimensional Baseline Model\n\nCapture and model the deterministic behavior of ICS communications across multiple dimensions: timing, protocol behavior, and network topology.\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"ICS Anomaly Detection System.\n\nBuilds multi-dimensional baselines from OT network traffic and\ndetects anomalies using statistical and machine learning methods.\nDesigned for deterministic SCADA communication patterns.\n\"\"\"\n\nimport json\nimport sys\nimport time\nimport warnings\nfrom collections import defaultdict\nfrom datetime import datetime, timedelta\nfrom dataclasses import dataclass, field\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.ensemble import IsolationForest\nfrom sklearn.preprocessing import StandardScaler\n\nwarnings.filterwarnings(\"ignore\")\n\n\n@dataclass\nclass CommunicationProfile:\n    \"\"\"Profile for a single master-slave communication pair.\"\"\"\n    src_ip: str\n    dst_ip: str\n    protocol: str\n    port: int\n    avg_interval_ms: float = 0.0\n    std_interval_ms: float = 0.0\n    avg_payload_size: float = 0.0\n    function_codes: dict = field(default_factory=dict)\n    packets_per_minute: float = 0.0\n    first_seen: str = \"\"\n    last_seen: str = \"\"\n\n\nclass ICSAnomalyDetector:\n    \"\"\"Multi-dimensional anomaly detection for ICS environments.\"\"\"\n\n    def __init__(self):\n        self.profiles = {}\n        self.topology_baseline = set()\n        self.timing_model = None\n        self.isolation_forest = None\n        self.scaler = StandardScaler()\n        self.anomalies = []\n        self.training_data = []\n\n    def build_baseline_from_pcap(self, pcap_data):\n        \"\"\"Build baselines from parsed pcap data (list of flow records).\"\"\"\n        print(\"[*] Building ICS communication baselines...\")\n\n        for flow in pcap_data:\n            key = f\"{flow['src']}->{flow['dst']}:{flow['port']}\"\n\n            if key not in self.profiles:\n                self.profiles[key] = CommunicationProfile(\n                    src_ip=flow[\"src\"],\n                    dst_ip=flow[\"dst\"],\n                    protocol=flow.get(\"protocol\", \"TCP\"),\n                    port=flow[\"port\"],\n                    first_seen=flow.get(\"timestamp\", \"\"),\n                )\n\n            profile = self.profiles[key]\n            profile.last_seen = flow.get(\"timestamp\", \"\")\n\n            # Track function codes for industrial protocols\n            fc = flow.get(\"function_code\")\n            if fc is not None:\n                profile.function_codes[fc] = profile.function_codes.get(fc, 0) + 1\n\n            # Add to topology baseline\n            self.topology_baseline.add((flow[\"src\"], flow[\"dst\"], flow[\"port\"]))\n\n        # Calculate interval statistics\n        self._calculate_timing_stats(pcap_data)\n\n        print(f\"  Communication pairs: {len(self.profiles)}\")\n        print(f\"  Topology entries: {len(self.topology_baseline)}\")\n\n    def _calculate_timing_stats(self, flows):\n        \"\"\"Calculate packet timing statistics per communication pair.\"\"\"\n        timestamps = defaultdict(list)\n        for flow in flows:\n            key = f\"{flow['src']}->{flow['dst']}:{flow['port']}\"\n            ts = flow.get(\"timestamp_epoch\")\n            if ts:\n                timestamps[key].append(ts)\n\n        for key, ts_list in timestamps.items():\n            if key in self.profiles and len(ts_list) > 1:\n                ts_sorted = sorted(ts_list)\n                intervals = [\n                    (ts_sorted[i+1] - ts_sorted[i]) * 1000\n                    for i in range(len(ts_sorted) - 1)\n                ]\n                self.profiles[key].avg_interval_ms = np.mean(intervals)\n                self.profiles[key].std_interval_ms = np.std(intervals)\n                duration_min = (ts_sorted[-1] - ts_sorted[0]) \u002F 60\n                if duration_min > 0:\n                    self.profiles[key].packets_per_minute = len(ts_list) \u002F duration_min\n\n    def train_isolation_forest(self, features_df):\n        \"\"\"Train Isolation Forest model on feature vectors from baseline traffic.\"\"\"\n        print(\"[*] Training Isolation Forest model...\")\n\n        feature_cols = [\n            \"interval_ms\", \"payload_size\", \"packets_per_window\",\n            \"unique_func_codes\", \"new_connection_flag\",\n        ]\n\n        available_cols = [c for c in feature_cols if c in features_df.columns]\n        X = features_df[available_cols].fillna(0).values\n\n        X_scaled = self.scaler.fit_transform(X)\n\n        self.isolation_forest = IsolationForest(\n            n_estimators=200,\n            contamination=0.01,  # Expect 1% anomaly rate in baseline\n            random_state=42,\n            n_jobs=-1,\n        )\n        self.isolation_forest.fit(X_scaled)\n\n        scores = self.isolation_forest.decision_function(X_scaled)\n        print(f\"  Model trained on {len(X)} samples\")\n        print(f\"  Anomaly score range: [{scores.min():.4f}, {scores.max():.4f}]\")\n        print(f\"  Threshold: {np.percentile(scores, 1):.4f}\")\n\n    def detect_topology_anomaly(self, src_ip, dst_ip, port):\n        \"\"\"Detect new\u002Funauthorized communication pairs.\"\"\"\n        if (src_ip, dst_ip, port) not in self.topology_baseline:\n            return {\n                \"type\": \"NEW_COMMUNICATION_PAIR\",\n                \"severity\": \"high\",\n                \"detail\": f\"New connection: {src_ip} -> {dst_ip}:{port} not in baseline\",\n                \"recommendation\": \"Verify if this is an authorized new device or configuration change\",\n            }\n        return None\n\n    def detect_timing_anomaly(self, src_ip, dst_ip, port, interval_ms):\n        \"\"\"Detect polling interval deviations.\"\"\"\n        key = f\"{src_ip}->{dst_ip}:{port}\"\n        profile = self.profiles.get(key)\n\n        if profile and profile.std_interval_ms > 0:\n            z_score = abs(interval_ms - profile.avg_interval_ms) \u002F profile.std_interval_ms\n            if z_score > 4.0:\n                return {\n                    \"type\": \"TIMING_ANOMALY\",\n                    \"severity\": \"medium\",\n                    \"detail\": (\n                        f\"Interval {interval_ms:.1f}ms deviates from baseline \"\n                        f\"{profile.avg_interval_ms:.1f}ms (z-score: {z_score:.1f})\"\n                    ),\n                    \"recommendation\": \"Check for network congestion, device malfunction, or MITM attack\",\n                }\n        return None\n\n    def detect_function_code_anomaly(self, src_ip, dst_ip, port, func_code):\n        \"\"\"Detect unauthorized Modbus\u002FDNP3 function codes.\"\"\"\n        key = f\"{src_ip}->{dst_ip}:{port}\"\n        profile = self.profiles.get(key)\n\n        if profile and func_code not in profile.function_codes:\n            severity = \"critical\" if func_code in {5, 6, 15, 16, 8} else \"high\"\n            return {\n                \"type\": \"UNAUTHORIZED_FUNCTION_CODE\",\n                \"severity\": severity,\n                \"detail\": (\n                    f\"Function code {func_code} from {src_ip} to {dst_ip}:{port} \"\n                    f\"not in baseline. Allowed: {list(profile.function_codes.keys())}\"\n                ),\n                \"recommendation\": \"Investigate source - possible command injection attack\",\n            }\n        return None\n\n    def analyze_flow(self, flow):\n        \"\"\"Analyze a single network flow against all detection models.\"\"\"\n        results = []\n\n        # Topology check\n        topo = self.detect_topology_anomaly(flow[\"src\"], flow[\"dst\"], flow[\"port\"])\n        if topo:\n            results.append(topo)\n\n        # Timing check\n        if \"interval_ms\" in flow:\n            timing = self.detect_timing_anomaly(\n                flow[\"src\"], flow[\"dst\"], flow[\"port\"], flow[\"interval_ms\"])\n            if timing:\n                results.append(timing)\n\n        # Function code check\n        if \"function_code\" in flow:\n            fc = self.detect_function_code_anomaly(\n                flow[\"src\"], flow[\"dst\"], flow[\"port\"], flow[\"function_code\"])\n            if fc:\n                results.append(fc)\n\n        self.anomalies.extend(results)\n        return results\n\n    def generate_report(self):\n        \"\"\"Generate anomaly detection report.\"\"\"\n        print(f\"\\n{'='*60}\")\n        print(f\"ICS ANOMALY DETECTION REPORT\")\n        print(f\"{'='*60}\")\n        print(f\"Baseline Profiles: {len(self.profiles)}\")\n        print(f\"Anomalies Detected: {len(self.anomalies)}\")\n\n        severity_counts = defaultdict(int)\n        for a in self.anomalies:\n            severity_counts[a[\"severity\"]] += 1\n\n        for sev in [\"critical\", \"high\", \"medium\", \"low\"]:\n            if severity_counts[sev]:\n                print(f\"  {sev.upper()}: {severity_counts[sev]}\")\n\n        for a in self.anomalies[:20]:\n            print(f\"\\n  [{a['severity'].upper()}] {a['type']}\")\n            print(f\"    {a['detail']}\")\n\n\nif __name__ == \"__main__\":\n    print(\"ICS Anomaly Detection System\")\n    print(\"Load baseline data and call analyze_flow() for real-time detection\")\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Deterministic Traffic | ICS networks exhibit highly predictable communication patterns where the same master polls the same slaves at fixed intervals with identical function codes |\n| Isolation Forest | Unsupervised machine learning algorithm that isolates anomalies by randomly partitioning feature space, effective for OT traffic with low anomaly rates |\n| Polling Interval | Time between consecutive SCADA master requests to a slave device, typically fixed and configurable (100ms to 10s) |\n| Function Code Allowlist | Set of permitted industrial protocol operations for each communication pair, enforced by anomaly detection rules |\n| Topology Baseline | Complete map of all authorized device-to-device communication paths in the OT network |\n| Physics-Based Detection | Using physical process models (thermodynamics, fluid dynamics) to detect attacks that manipulate the process while spoofing sensor data |\n\n## Tools & Systems\n\n- **Nozomi Networks Guardian**: OT anomaly detection with AI-powered baseline learning and industrial protocol analysis\n- **Dragos Platform**: Threat detection using behavioral analytics and threat intelligence specific to ICS environments\n- **Scikit-learn**: Python ML library with Isolation Forest, One-Class SVM, and Local Outlier Factor for anomaly detection\n- **Zeek with OT plugins**: Network security monitor with Modbus, DNP3, and BACnet protocol analyzers for baseline building\n\n## Output Format\n\n```\nICS Anomaly Detection Report\n==============================\nDetection Period: YYYY-MM-DD to YYYY-MM-DD\nBaseline Size: [N] communication profiles\n\nANOMALIES DETECTED: [N]\n  Critical: [N]  High: [N]  Medium: [N]  Low: [N]\n\n[SEVERITY] ANOMALY_TYPE\n  Source: [IP] -> Target: [IP]:[Port]\n  Detail: [Description of deviation from baseline]\n  Baseline: [Expected behavior]\n  Observed: [Actual behavior]\n```\n",{"hide":49,"name":5,"source":50,"license":15,"description":51,"authorized_lab":45,"origin_frontmatter":52},true,"mukul975\u002FAnthropic-Cybersecurity-Skills","This skill covers deploying anomaly detection systems for industrial control environments using machine learning models trained on OT network baselines, physics-based process models, and behavioral analysis of industrial protocol communications. It addresses building normal behavior profiles for SCADA polling patterns, detecting deviations in Modbus\u002FDNP3\u002FOPC UA traffic, identifying rogue devices, ","name: detecting-anomalies-in-industrial-control-systems | description: 'This skill covers deploying anomaly detection systems for industrial |   control environments using machine learning models trained on OT network baselines, |   physics-based process models, and behavioral analysis of industrial protocol communications. |   It addresses building normal behavior profiles for SCADA polling patterns, detecting |   deviations in Modbus\u002FDNP3\u002FOPC UA traffic, identifying rogue devices, and correlat","main","4c6d8d65f3d6096e2fc25b0845e481dda73c2794",".claude\u002Fskills\u002Fcyber-detecting-anomalies-in-industrial-control-systems",0,"https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions","Building deterministic AI governance and continuity systems. Workflow architect + visual storyteller","2026-11-14 03:05:17",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":49},[63,66,69],{"tool":64,"command":65},"npx","npx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-detecting-anomalies-in-industrial-control-systems",{"tool":67,"command":68},"bunx","bunx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-detecting-anomalies-in-industrial-control-systems",{"tool":70,"command":71},"pnpm","pnpm dlx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-detecting-anomalies-in-industrial-control-systems","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-detecting-anomalies-in-industrial-control-systems\u002FSKILL.md",[],[75,84,91,98,105,112],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":83},"01M73K12W8K0GSTB4ABKS8BD7H","executing-plans","Use when you have a written implementation plan to execute in a separate session with review checkpoints","MIT","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fexecuting-plans\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":83},"01M73HC2NSXYYN54GBASVG2RDJ","using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":83},"01M73HC12557CB08VDEF1YTF3H","triage","Triage issues through a state machine driven by triage roles. Use when user wants to create an issue, triage issues, review incoming bugs or feature requests, prepare issues for an AFK agent, or manage issue workflow.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftriage\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":83},"01M73HBXB8F8ED4KQXVXEWCV8B","trade-edge-audit","The EDGE LENS for trading peers — recalls EVERY factor\u002Findicator running from the live forecast ledger (no enumeration) and renders the whole pile through the edge arsenal off ONE call: multi-horizon scoring (the ladder) + deflated Sharpe (overfit) + Benjamini-Hochberg FDR (multiple-testing across the fleet) + spread-bounce + maker-fee falsification, then ranks only what survives ALL of it. Use when a peer must answer \"does ANY running factor have real, overfit-corrected, multiple-testing-corrected, fee-surviving edge, and at which horizon\" without hand-assembling 6 tools. The trade-engine analog of quantum-hypothesis-simulation.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftrade-edge-audit\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":83},"01M73HBT5ZRCA82SQJ781NWVNQ","trade-decision-sim","The DECISION LENS for trading peers — recalls the CURRENT signal snapshot per market from the live ledger and renders it through the sim arsenal off ONE call: quantum factor-circuit order-optimal sequencing + decision-sim CVaR-robust sizing, sized against the MEASURED per-factor edge (from the edge-audit), correlation-aware. Emits an actionable call per market {side, sizePct, confidence, sequence}. Flat\u002Fzero-size when there is no measured edge after cost — the honest default. Sibling of trade-edge-audit (the EDGE lens); the trade-engine analog of quantum-hypothesis-simulation for a live decision.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftrade-decision-sim\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":83},"01M73HBN2WTKGN790WYQD6GBM4","to-issues","Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fto-issues\u002FSKILL.md",[],[]]