Install this skill
npx skills add mukul975/Anthropic-Cybersecurity-SkillsFramework mappings
MITRE ATT&CK
NIST CSF 2.0
MITRE ATLAS
When to Use
- When deploying passive OT network monitoring using Nozomi Networks Guardian sensors
- When requiring asset visibility without active scanning in sensitive ICS environments
- When building a Nozomi-based OT SOC with centralized management via Vantage or CMC
- When integrating OT network monitoring with Fortinet, Splunk, or ServiceNow ecosystems
- When monitoring compliance with IEC 62443 network segmentation policies
Do not use for active vulnerability scanning of OT devices (see performing-ot-vulnerability-scanning-safely), for environments standardized on Dragos (see implementing-dragos-platform-for-ot-monitoring), or for IT-only network monitoring.
Prerequisites
- Nozomi Networks Guardian sensor (hardware, VM, or container)
- Network TAP or SPAN port configured on monitored OT network segments
- Nozomi Vantage (cloud) or Central Management Console for multi-sensor management
- Nozomi Threat Intelligence subscription for updated detection signatures
- Network architecture documentation for sensor placement planning
Workflow
Step 1: Deploy Guardian Sensors for Passive Monitoring
#!/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()Key Concepts
| Term | Definition |
|---|---|
| Guardian | Nozomi Networks passive sensor that monitors OT network traffic via SPAN/TAP without generating additional traffic |
| Vantage | Nozomi cloud-based central management platform for aggregating data across multiple Guardian sensors |
| Behavioral Anomaly Detection (BAD) | Nozomi's AI-driven approach to detecting deviations from learned normal OT network behavior |
| Smart Polling | Nozomi's active query feature using native protocols to safely extract additional device details |
| Asset Intelligence | Nozomi's automatic identification and classification of OT/IoT assets from network traffic |
| Threat Intelligence Feed | Nozomi Labs-maintained feed of OT-specific threat indicators, updated based on global honeypot data |
Output Format
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]Source materials
References and resources
Everything below is rendered for inspection. Script files are read-only and never run.
References 1
api-reference.md2.3 KB
API Reference: Implementing OT Network Traffic Analysis with Nozomi
Nozomi Guardian REST API
| Endpoint | Method | Description |
|---|---|---|
/api/v1/alerts |
GET | Retrieve security alerts |
/api/v1/assets |
GET | Get discovered asset inventory |
/api/v1/nodes |
GET | Get network nodes |
/api/v1/links |
GET | Get network links/connections |
/api/v1/sessions |
GET | Get active network sessions |
/api/v1/queries |
POST | Execute N2OS query |
/api/v1/health |
GET | Sensor health status |
Authentication
# Bearer token
curl -s -k -H "Authorization: Bearer <token>" https://guardian/api/v1/assets
# API key (Vantage)
curl -s -H "X-Api-Key: <key>" https://vantage.nozominetworks.com/api/v1/assetsN2OS Query Language
-- Find all PLCs
alerts | where type == plc
-- Find new connections in last 24h
sessions | where first_seen > ago(24h) | sort by bytes desc
-- Find Modbus traffic
sessions | where protocol == modbus | select src_ip, dst_ip, function_codeSupported OT Protocols
| Protocol | Detection | DPI Support |
|---|---|---|
| Modbus/TCP | Full | Function code analysis |
| S7comm | Full | Block read/write detection |
| EtherNet/IP (CIP) | Full | Service code inspection |
| DNP3 | Full | Object group parsing |
| OPC UA | Full | Service/node inspection |
| BACnet | Full | Object/property analysis |
| PROFINET | Full | Cyclic/acyclic detection |
| IEC 60870-5-104 | Full | ASDU type parsing |
Alert Risk Levels
| Level | Score Range | Response |
|---|---|---|
| Critical | 9.0 - 10.0 | Immediate investigation |
| High | 7.0 - 8.9 | Investigate within 4 hours |
| Medium | 4.0 - 6.9 | Investigate within 24 hours |
| Low | 0.1 - 3.9 | Review during next shift |
Sensor Deployment
| Mode | Use Case |
|---|---|
| SPAN/Mirror | Switch mirror port monitoring |
| TAP | Network TAP for full-duplex capture |
| Smart Polling | Active query for asset enrichment |
References
- Nozomi Guardian API Docs: https://www.nozominetworks.com/resources/
- IEC 62443-3-3: https://www.isa.org/standards-and-publications/isa-standards/isa-iec-62443-series-of-standards
- NIST SP 800-82 Rev 3: https://csrc.nist.gov/publications/detail/sp/800-82/rev-3/final
Scripts 1
agent.py3.7 KB
Display-only source. This catalog never executes bundled scripts.
#!/usr/bin/env python3
"""Nozomi Networks OT Traffic Analysis Agent - monitors ICS protocols and detects anomalies."""
import json
import argparse
import logging
import subprocess
from collections import defaultdict
from datetime import datetime
logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s] %(message)s")
logger = logging.getLogger(__name__)
def nozomi_api(base_url, token, endpoint):
cmd = ["curl", "-s", "-k", "-H", f"Authorization: Bearer {token}", f"{base_url}/api/v1{endpoint}"]
result = subprocess.run(cmd, capture_output=True, text=True, timeout=120)
return json.loads(result.stdout) if result.stdout else {}
def get_alerts(base_url, token):
return nozomi_api(base_url, token, "/alerts?limit=500")
def get_assets(base_url, token):
return nozomi_api(base_url, token, "/assets?limit=500")
def get_sessions(base_url, token):
return nozomi_api(base_url, token, "/sessions?limit=500")
def analyze_ot_protocols(sessions):
protocol_counts = defaultdict(int)
ot_protocols = {"modbus", "s7comm", "dnp3", "opcua", "ethernet/ip", "bacnet", "profinet"}
ot_sessions = []
for session in sessions:
proto = session.get("protocol", "").lower()
protocol_counts[proto] += 1
if proto in ot_protocols:
ot_sessions.append({"source": session.get("source_ip", ""), "destination": session.get("destination_ip", ""),
"protocol": proto, "bytes": session.get("bytes_total", 0)})
return {"protocol_distribution": dict(protocol_counts), "ot_sessions": len(ot_sessions), "total_sessions": len(sessions)}
def detect_anomalies(alerts):
anomaly_types = defaultdict(list)
for alert in alerts:
anomaly_types[alert.get("type_id", "unknown")].append({
"description": alert.get("description", ""), "risk": alert.get("risk", ""),
"source": alert.get("source_ip", ""), "timestamp": alert.get("created_at", ""),
})
return {cat: {"count": len(items), "samples": items[:3]} for cat, items in anomaly_types.items()}
def audit_asset_inventory(assets):
by_type = defaultdict(int)
by_vendor = defaultdict(int)
for asset in assets:
by_type[asset.get("type", "unknown")] += 1
by_vendor[asset.get("vendor", "unknown")] += 1
return {"total_assets": len(assets), "by_type": dict(by_type),
"by_vendor": dict(sorted(by_vendor.items(), key=lambda x: x[1], reverse=True)[:10])}
def generate_report(alerts, sessions, assets, base_url):
return {
"timestamp": datetime.utcnow().isoformat(), "nozomi_url": base_url,
"alert_summary": {"total": len(alerts), "critical": sum(1 for a in alerts if a.get("risk") == "critical")},
"protocol_analysis": analyze_ot_protocols(sessions),
"anomalies": detect_anomalies(alerts),
"asset_inventory": audit_asset_inventory(assets),
}
def main():
parser = argparse.ArgumentParser(description="Nozomi Networks OT Traffic Analysis Agent")
parser.add_argument("--nozomi-url", required=True, help="Nozomi Guardian URL")
parser.add_argument("--token", required=True, help="API bearer token")
parser.add_argument("--output", default="nozomi_ot_report.json")
args = parser.parse_args()
alerts = get_alerts(args.nozomi_url, args.token)
sessions = get_sessions(args.nozomi_url, args.token)
assets = get_assets(args.nozomi_url, args.token)
report = generate_report(alerts, sessions, assets, args.nozomi_url)
with open(args.output, "w") as f:
json.dump(report, f, indent=2, default=str)
logger.info("Nozomi: %d alerts, %d sessions, %d assets", len(alerts), len(sessions), len(assets))
print(json.dumps(report, indent=2, default=str))
if __name__ == "__main__":
main()
Keep exploring