关于 implementing-ot-network-traffic-analysis-with-nozomi
面向 OT 网络监控的技能指南,介绍如何部署 Nozomi Guardian 传感器进行被动监测。内容涵盖资产可视性、威胁分析及 ICS 环境中的多传感器集中管理。
主要功能
- 01被动监测 OT 流量
- 02识别和分类资产
- 03检测行为异常与威胁
- 04通过 Vantage 或 CMC 管理多传感器
适用场景
- 01规划 Guardian 传感器部署
- 02构建基于 Nozomi 的 OT SOC
- 03检查 OT 资产可视性
- 04监测网络分段合规情况
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ mukul975/ anthropic-cybersecurity-skills --skill implementing-ot-network-traffic-analysis-with-nozomi安装后在 Claude Code 中输入/implementing-ot-network-traffic-analysis-with-nozomi确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
LICENSEreferences/api-reference.mdscripts/agent.py详细介绍
使用 Nozomi 实施 OT 网络流量分析
使用时机
- 当使用 Nozomi Networks Guardian 传感器部署被动式 OT 网络监控时
- 当需要在敏感的 ICS 环境中实现资产可见性而不进行主动扫描时
- 当需要通过 Vantage 或 CMC 集中管理来构建基于 Nozomi 的 OT SOC 时
- 当需要将 OT 网络监控与 Fortinet、Splunk 或 ServiceNow 生态系统集成时
- 当需要监控 IEC 62443 网络分段策略的合规性时
请勿使用于对 OT 设备进行主动漏洞扫描(参见 performing-ot-vulnerability-scanning-safely)、已统一采用 Dragos 的环境(参见 implementing-dragos-platform-for-ot-monitoring),或仅针对 IT 网络的监控。
前置条件
- Nozomi Networks Guardian 传感器(硬件、虚拟机或容器)
- 在被监控的 OT 网段上配置的网络 TAP 或 SPAN 端口
- Nozomi Vantage(云端)或 Central Management Console,用于多传感器管理
- Nozomi Threat Intelligence 订阅,用于获取更新的检测特征
- 用于规划传感器部署位置的网络架构文档
工作流
第 1 步:部署 Guardian 传感器进行被动监控
#!/usr/bin/env python3
"""Nozomi Guardian Deployment Manager and Alert Analyzer.
Manages Nozomi Guardian sensor deployment validation, asset inventory
extraction, and threat alert analysis for OT environments.
"""
import json
import sys
from collections import defaultdict
from datetime import datetime
from typing import Dict, List, Optional
try:
import requests
except ImportError:
print("Install requests: pip install requests")
sys.exit(1)
class NozomiGuardianManager:
"""Manages Nozomi Networks Guardian for OT monitoring."""
def __init__(self, guardian_url: str, api_token: str, verify_ssl: bool = False):
self.guardian_url = guardian_url.rstrip("/")
self.session = requests.Session()
self.session.headers.update({
"Authorization": f"Bearer {api_token}",
"Content-Type": "application/json",
})
self.session.verify = verify_ssl
def get_nodes(self, node_type: Optional[str] = None) -> List[Dict]:
"""Retrieve discovered network nodes (assets)."""
params = {}
if node_type:
params["type"] = node_type
resp = self.session.get(f"{self.guardian_url}/api/v1/nodes", params=params)
resp.raise_for_status()
return resp.json().get("result", [])
def get_alerts(self, severity: str = "high", limit: int = 100) -> List[Dict]:
"""Retrieve security alerts."""
params = {"severity": severity, "limit": limit, "status": "open"}
resp = self.session.get(f"{self.guardian_url}/api/v1/alerts", params=params)
resp.raise_for_status()
return resp.json().get("result", [])
def get_links(self) -> List[Dict]:
"""Retrieve communication links between nodes."""
resp = self.session.get(f"{self.guardian_url}/api/v1/links")
resp.raise_for_status()
return resp.json().get("result", [])
def get_vulnerabilities(self) -> List[Dict]:
"""Retrieve detected vulnerabilities."""
resp = self.session.get(f"{self.guardian_url}/api/v1/vulnerabilities")
resp.raise_for_status()
return resp.json().get("result", [])
def validate_deployment(self):
"""Validate Guardian sensor deployment and coverage."""
print(f"\n{'='*65}")
print("NOZOMI GUARDIAN DEPLOYMENT VALIDATION")
print(f"{'='*65}")
print(f"Guardian URL: {self.guardian_url}")
print(f"Validation Time: {datetime.now().isoformat()}")
# Check system status
try:
resp = self.session.get(f"{self.guardian_url}/api/v1/system/status")
if resp.status_code == 200:
status = resp.json()
print(f"\n--- SYSTEM STATUS ---")
print(f" Version: {status.get('version', 'N/A')}")
print(f" Uptime: {status.get('uptime', 'N/A')}")
print(f" Packets Processed: {status.get('packets_processed', 'N/A')}")
print(f" Threat Intelligence: {status.get('threat_intelligence_version', 'N/A')}")
except requests.RequestException as e:
print(f" [!] System status unavailable: {e}")
# Asset discovery summary
nodes = self.get_nodes()
print(f"\n--- ASSET DISCOVERY ---")
print(f" Total Nodes Discovered: {len(nodes)}")
type_counts = defaultdict(int)
vendor_counts = defaultdict(int)
protocol_set = set()
for node in nodes:
type_counts[node.get("type", "unknown")] += 1
vendor_counts[node.get("vendor", "Unknown")] += 1
for proto in node.get("protocols", []):
protocol_set.add(proto)
print(f"\n By Type:")
for ntype, count in sorted(type_counts.items(), key=lambda x: -x[1]):
print(f" {ntype}: {count}")
print(f"\n By Vendor:")
for vendor, count in sorted(vendor_counts.items(), key=lambda x: -x[1])[:10]:
print(f" {vendor}: {count}")
print(f"\n Protocols Observed: {', '.join(sorted(protocol_set))}")
# Alert summary
alerts = self.get_alerts(severity="high")
print(f"\n--- ALERT SUMMARY ---")
print(f" High/Critical Alerts: {len(alerts)}")
alert_types = defaultdict(int)
for alert in alerts:
alert_types[alert.get("type_id", "unknown")] += 1
for atype, count in sorted(alert_types.items(), key=lambda x: -x[1])[:10]:
print(f" {atype}: {count}")
# Vulnerability summary
vulns = self.get_vulnerabilities()
print(f"\n--- VULNERABILITY SUMMARY ---")
print(f" Total Vulnerabilities: {len(vulns)}")
sev_counts = defaultdict(int)
for vuln in vulns:
sev_counts[vuln.get("severity", "unknown")] += 1
for sev in ["critical", "high", "medium", "low"]:
if sev in sev_counts:
print(f" {sev.capitalize()}: {sev_counts[sev]}")
def analyze_communication_patterns(self):
"""Analyze OT communication patterns for anomalies."""
links = self.get_links()
nodes = {n.get("id"): n for n in self.get_nodes()}
print(f"\n--- COMMUNICATION ANALYSIS ---")
print(f" Total Communication Links: {len(links)}")
# Identify cross-zone communications
cross_zone = []
for link in links:
src_node = nodes.get(link.get("source_id"), {})
dst_node = nodes.get(link.get("destination_id"), {})
src_zone = src_node.get("zone", "unknown")
dst_zone = dst_node.get("zone", "unknown")
if src_zone != dst_zone and src_zone != "unknown" and dst_zone != "unknown":
cross_zone.append({
"source": src_node.get("label", "Unknown"),
"source_zone": src_zone,
"destination": dst_node.get("label", "Unknown"),
"dest_zone": dst_zone,
"protocols": link.get("protocols", []),
})
if cross_zone:
print(f"\n Cross-Zone Communications: {len(cross_zone)}")
for comm in cross_zone[:10]:
print(f" {comm['source']} ({comm['source_zone']}) -> "
f"{comm['destination']} ({comm['dest_zone']}) "
f"via {', '.join(comm['protocols'])}")
if __name__ == "__main__":
manager = NozomiGuardianManager(
guardian_url="https://nozomi-guardian.plant.local",
api_token="your-api-token",
)
manager.validate_deployment()
manager.analyze_communication_patterns()
关键概念
| 术语 | 定义 |
|---|---|
| Guardian | Nozomi Networks 的被动式传感器,通过 SPAN/TAP 监控 OT 网络流量,且不会产生额外流量 |
| Vantage | Nozomi 基于云端的集中管理平台,用于聚合来自多个 Guardian 传感器的数据 |
| 行为异常检测(BAD) | Nozomi 由 AI 驱动的方法,用于检测偏离已学习到的正常 OT 网络行为的情况 |
| Smart Polling | Nozomi 的主动查询功能,使用原生协议安全地提取额外的设备详细信息 |
| Asset Intelligence | Nozomi 从网络流量中自动识别和分类 OT/IoT 资产的能力 |
| 威胁情报源 | 由 Nozomi Labs 维护的 OT 专用威胁指标源,基于全球蜜罐数据进行更新 |
输出格式
NOZOMI GUARDIAN OT MONITORING REPORT
=======================================
Site: [site name]
Date: YYYY-MM-DD
ASSET VISIBILITY:
Total Assets: [count]
PLCs: [count] | HMIs: [count] | Switches: [count]
Protocols: [list]
Vendors: [top 5]
THREAT DETECTION:
Critical Alerts: [count]
High Alerts: [count]
Top Alert Categories: [list]
VULNERABILITIES:
Critical: [count]
High: [count]
NETWORK ANALYSIS:
Communication Links: [count]
Cross-Zone Flows: [count]
评论
支持 Markdown