OnlineUnknowns/ICS-OT-Security-Toolkit

GitHub: OnlineUnknowns/ICS-OT-Security-Toolkit

一款模块化的工业控制系统(ICS/OT)安全框架,集资产发现、协议深度分析、漏洞匹配、威胁映射与合规审计于一体,解决关键基础设施网络安全评估的痛点。

Stars: 1 | Forks: 0

🛡️ ICS-OT Security Toolkit

工业控制系统防御 · SCADA · OT · 关键基础设施



[![状态](https://img.shields.io/badge/Status-Active%20Research-1D9E75?style=for-the-badge&logo=checkmarx&logoColor=white)](.) [![Python](https://img.shields.io/badge/Python-3.11+-3776AB?style=for-the-badge&logo=python&logoColor=white)](.) [![License](https://img.shields.io/badge/License-MIT-7F77DD?style=for-the-badge&logo=opensourceinitiative&logoColor=white)](LICENSE) [![MITRE](https://img.shields.io/badge/MITRE-ATT%26CK%20ICS-E24B4A?style=for-the-badge&logo=target&logoColor=white)](https://attack.mitre.org/matrices/ics/) [![IEC](https://img.shields.io/badge/IEC-62443-EF9F27?style=for-the-badge)](.) [![NIST](https://img.shields.io/badge/NIST-SP%20800--82-378ADD?style=for-the-badge)](.)
## 📋 目录 - [概述](#-overview) - [架构](#-architecture) - [核心模块](#-core-modules) - [支持的协议](#-supported-protocols) - [快速开始](#-quick-start) - [使用示例](#-usage-examples) - [技术栈](#-tech-stack) - [框架与标准](#-frameworks--standards) - [集成](#-integrations) - [贡献](#-contributing) - [免责声明](#-disclaimer) ## 🌐 概述 **ICS-OT Security Toolkit** 是一个模块化的 Python 框架,专为在工业环境中工作的安全专业人员设计。 它涵盖协议级侦察、CVE 映射、MITRE ATT&CK for ICS TTP 分析以及合规性审计——在关键基础设施领域实现**基于威胁情报的防御**。 **目标领域:** ``` Energy · Water · Manufacturing · Oil & Gas · Transportation · Healthcare ``` **核心功能:** - 🔍 跨 ICS/OT 网络的主动与被动资产发现 - 📡 深度协议分析(Modbus、DNP3、S7comm、OPC-UA 等) - 🎯 MITRE ATT&CK for ICS 技术映射(涵盖 82 项技术) - 🐛 针对 300+ 条 ICS 专用特征的 CVE 匹配 - 📋 自动化合规性审计(IEC 62443、NIST 800-82、NERC CIP) - 📊 面向管理层与技术层的 PDF 报告生成 ## 🏗️ 架构 ``` ICS-OT-Security-Toolkit/ ├── core/ │ ├── asset_discovery/ # Passive & active device enumeration │ ├── protocol_analysis/ # OT protocol parsers & inspectors │ ├── vulnerability_engine/ # CVE matching & CVSS scoring │ ├── risk_assessment/ # Risk quantification engine │ ├── threat_detection/ # Real-time anomaly detection │ ├── compliance_engine/ # Framework auditing (IEC, NIST, NERC) │ └── reporting_engine/ # PDF & JSON report generation ├── protocols/ │ ├── modbus/ # Modbus TCP/RTU implementation │ ├── dnp3/ # DNP3 parser & analyzer │ ├── opcua/ # OPC-UA client & inspector │ ├── ethernet_ip/ # Allen-Bradley EtherNet/IP │ ├── profinet/ # Siemens PROFINET │ └── s7comm/ # Siemens S7 communication ├── scanners/ # Discovery & enumeration engines ├── intelligence/ # Threat intel feed integrations ├── detection/ # Signature & anomaly rules ├── integrations/ # SIEM & external platform connectors ├── tests/ # Unit & integration tests ├── docs/ # Architecture diagrams & threat model ├── main.py # CLI entrypoint └── requirements.txt ``` ## 🛠️ 核心模块 | # | 模块 | 描述 | 状态 | |---|--------|-------------|--------| | 01 | `asset-discovery` | 主动与被动 ICS 设备枚举 | ✅ 稳定 | | 02 | `protocol-analysis` | OT 协议的深度包检测 | ✅ 稳定 | | 03 | `vulnerability-engine` | 针对 300+ 条 ICS 特征的 CVE 匹配 | ✅ 稳定 | | 04 | `risk-assessment` | CVSS v3 + ICS 上下文风险评分 | 🔧 Beta | | 05 | `threat-detection` | 实时异常与特征检测 | 🔧 Beta | | 06 | `compliance-engine` | IEC 62443 / NIST 800-82 / NERC CIP 审计 | ✅ 稳定 | | 07 | `reporting-engine` | 面向管理层与技术层的 PDF 报告生成 | ✅ 稳定 | | 08 | `attck-mapper` | MITRE ATT&CK for ICS TTP 关联分析 | ✅ 稳定 | ## 📡 支持的协议 | 协议 | 端口 | 用例 | 支持级别 | |----------|---------|----------|---------------| | **Modbus TCP/RTU** | 502 | PLC、RTU、传感器 | ✅ 完整 | | **DNP3** | 20000 | SCADA / 变电站 | ✅ 完整 | | **OPC-UA** | 4840 | 工业中间件 | ✅ 完整 | | **S7comm** | 102 | 西门子 S7 PLC | ✅ 完整 | | **EtherNet/IP** | 44818 | Allen-Bradley PLC | 🔧 部分 | | **PROFINET** | 34964 | 西门子现场设备 | 🔧 部分 | | **BACnet** | 47808 | 楼宇自动化 | 🔧 部分 | | **IEC 60870-5-104** | 2404 | 电网 SCADA | 🗓️ 计划中 | ## ⚡ 快速开始 ### 前置条件 ``` Python 3.11+ Docker (optional, for isolated scanning) ``` ### 安装 ``` # 克隆仓库 git clone https://github.com/OnlineUnknowns/ICS-OT-Security-Toolkit cd ICS-OT-Security-Toolkit # 创建虚拟环境 python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate # 安装依赖 pip install -r requirements.txt ``` ### 基本用法 ``` # 发现子网上的 ICS/OT 设备 python main.py --module asset-discovery --target 192.168.1.0/24 # 分析来自 PCAP 捕获的 OT 流量 python main.py --module protocol-analysis --pcap captures/plant_traffic.pcap # 将发现的调查结果映射到 MITRE ATT&CK for ICS python main.py --module attck-mapper --input results/scan.json # 针对 IEC 62443 运行合规性审计 python main.py --module compliance --standard iec62443 --target config/plc.yaml # 生成完整评估报告 python main.py --module report --format pdf --output reports/assessment.pdf ``` ## 🧪 使用示例 ### 资产发现 ``` from core.asset_discovery import ICSScanner scanner = ICSScanner(target="192.168.100.0/24", passive=True) devices = scanner.run() for device in devices: print(f"[+] {device.ip} | {device.protocol} | {device.vendor} | {device.firmware}") ``` **示例输出:** ``` [+] 192.168.100.10 | Modbus TCP | Schneider Electric | v3.2.1 [+] 192.168.100.15 | S7comm | Siemens | SIMATIC S7-300 [+] 192.168.100.22 | DNP3 | ABB | RTU560 ``` ### CVE 漏洞匹配 ``` from core.vulnerability_engine import CVEMatcher matcher = CVEMatcher() results = matcher.scan(device_list=devices) for vuln in results.critical: print(f"[!] {vuln.device_ip} — {vuln.cve_id} (CVSS: {vuln.score}) — {vuln.description}") ``` **示例输出:** ``` [!] 192.168.100.10 — CVE-2022-32512 (CVSS: 9.8) — Modbus auth bypass in Schneider EcoStruxure [!] 192.168.100.15 — CVE-2019-13945 (CVSS: 8.8) — Siemens S7 remote code execution ``` ### MITRE ATT&CK for ICS 映射 ``` from intelligence.attck_mapper import ICSAttckMapper mapper = ICSAttckMapper() ttps = mapper.correlate(scan_results=results) print(f"Mapped {len(ttps)} ATT&CK for ICS techniques") mapper.export_navigator_layer("output/attck_layer.json") ``` ## ⚙️ 技术栈 | 层级 | 技术 | |-------|-----------| | 核心语言 | Python 3.11+ | | 协议解析 | Scapy、pyModbus、python-snap7、opcua-asyncio | | 威胁情报 | STIX2、TAXIIClient、AlienVault OTX SDK | | 数据存储 | PostgreSQL、Redis | | 监控 | Elasticsearch、Grafana | | 报告 | ReportLab、Jinja2 | | 容器化 | Docker、Kubernetes | | CI/CD | GitHub Actions | ## 📚 框架与标准 | 框架 | 领域 | 覆盖范围 | |-----------|--------|----------| | MITRE ATT&CK for ICS v14 | 威胁情报 | 82 项技术 | | IEC 62443 | 工业网络安全 | 完整 | | NIST SP 800-82 Rev 3 | OT 安全指南 | 完整 | | NERC CIP | 能源行业 | 完整 | | CIS Controls v8 | 基线强化 | 部分 | | STIX/TAXII 2.1 | 威胁共享 | 完整 | ## 🔗 集成 | 平台 | 用途 | |----------|---------| | Shodan API | 互联网暴露的 ICS 设备情报 | | Censys | 基于证书和 Banner 的 OT 发现 | | VirusTotal | 恶意软件与 IOC 富化 | | Elastic SIEM | 日志摄取与实时告警 | | Splunk | 企业级 SIEM 转发 | | CISA ICS Feeds | 实时公告摄取 | | AlienVault OTX | 开源威胁情报 | | OpenCTI | 结构化威胁情报平台 | ## 📁 研究领域 ``` ▸ Adversarial simulation against ICS/SCADA environments ▸ Protocol-level vulnerability research (Modbus, DNP3, S7comm) ▸ PLC / RTU / HMI firmware analysis & reverse engineering ▸ OT network traffic anomaly detection & baselining ▸ Supply chain risk modeling for industrial components ▸ Purple team operations mapped to ATT&CK for ICS ▸ Zero-day triage & responsible disclosure workflows ``` ## 📊 覆盖统计 | 🔌 ICS 协议 | 🐛 CVE 特征 | 🎯 ATT&CK 技术 | 📋 框架 | |:---:|:---:|:---:|:---:| | **12+** | **300+** | **82** | **5** | ## ⚠️ 免责声明 ## 📖 参考 - [MITRE ATT&CK for ICS](https://attack.mitre.org/matrices/ics/) - [CISA ICS 公告](https://www.cisa.gov/ics-advisories) - [NIST SP 800-82 Rev 3](https://csrc.nist.gov/publications/detail/sp/800-82/rev-3/final) - [IEC 62443 概述](https://www.iec.ch/ics) - [The DFIR Report](https://thedfirreport.com)
Quote
**精准构建 · 实地测试 · 知识防御**
[![LinkedIn](https://img.shields.io/badge/LinkedIn-OnlineUnknown-0077B5?style=flat-square&logo=linkedin)](https://linkedin.com/in/onlineunknown) [![YouTube](https://img.shields.io/badge/YouTube-Subscribe-FF0000?style=flat-square&logo=youtube)](.) [![GitHub](https://img.shields.io/badge/GitHub-OnlineUnknowns-181717?style=flat-square&logo=github)](https://github.com/OnlineUnknowns)
标签:CVE映射, OT安全, PKINIT, Python, 协议分析, 子域名突变, 工控安全, 搜索引擎查询, 无后门, 权限提升, 测试用例, 自动化攻击, 请求拦截, 逆向工具