Antpact Toolbox
中文
Home › Blog › General › When a standby pump starts on its own: decoding Modbus coil bits before an automated attacker does
General

When a standby pump starts on its own: decoding Modbus coil bits before an automated attacker does

Oct 31, 2026 · 35 views · By Antpact Toolbox Team #Modbus #coil #register bit #OT security #industrial control #bit packing

The night a standby pump started itself

A friend who runs water-boost automation called me last month about a pump that kept switching on with nobody around. His controller used coil 00001 for the main pump and 00002 for the standby. We were watching the 16-bit holding register when, just after 2 a.m., bit 00002 flipped to 1 and the standby pump spun up on its own. The log on the commissioning laptop told the story: someone had left an auto-test script running that broadcast write-coil commands to everything on the bus. Coils are just bits. Anyone who can reach the bus can flip them, and one wrong bit takes the whole line down.

October 2026 put the "bit" layer on the table

This was not a one-off. A security team published a live test this month where a frontier model, given only a target and a toolset, scanned ports, read holding registers, forged frames, and wrote coils to push a simulated line past its pressure limit — with no human pressing Enter. The same week, Mitsubishi's MELSEC iQ-F compact PLC drew CVE-2026-75890, a Modbus RTU buffer overflow that overwrites memory and can stall an axis. NIST's SP 800-82 Rev. 4 draft lists "identify every device that can write the process" as the first check for any engineering team. In almost every case, the attack lands on a single coil bit or a single register bit.

What coils and register bits actually are

In Modbus, coils live in the 0x area: function code 01 reads them, 05 writes one coil, 15 writes many at once. Discrete inputs are read-only switches. A 16-bit holding register, though, packs up to 16 booleans into one number — valve 1 open, valve 2 open, interlock bypass, manual mode, fault reset, all sharing the same word. Models read registers to infer your process; attackers write bits to change your setpoints. Both are staring at the same thing: the bits you stopped watching.

Unpacking the 16 bits

Antpact's "bit and coil packer/unpacker" tool does exactly this in the browser. You paste a captured value, say the hex 0x002A or its decimal 42, and it lays every bit out: bit 0 is 0, bit 1 is 1, bit 3 is 1, bit 5 is 1, which reconstructs to 0b00101010. Flip it around and the tool packs your chosen bits back into 0x002A. The whole calculation runs on-device; the bytes and the frame never leave the machine.

An example you can use today

Suppose your packet capture shows a write-multiple-coils frame whose data field starts with the two bytes 0x00 0x0C. That is decimal 12, or binary 0b00001100, so bits 2 and 3 are set. Against your tag table, bit 2 is "stirrer motor 2 start" and bit 3 is "feed valve open." You now know in one glance whether that write should have happened, or whether a script is writing blindly. People who have been burned by this know the alarm usually fires after the damage is done.

Pitfall 1: read the bits, not just the decimal

Most troubleshooting stops at the decimal in the register — 42 versus 43 looks close, so it gets ignored. But 42 and 43 differ only in the lowest bit, which is one valve opening or closing. Real anomalies hide in bits you assumed were untouched, so always break the value down to bits.

Pitfall 2: function code 15 is the favorite abuse vector

Writing a single coil (05) changes one thing and is easy to track. Function code 15 rewrites a whole run of coils in one frame, which is exactly why attack scripts lean on it to blanket a bus. When you see a 15 frame, check the data length first, then unpack bit by bit against your tag table — far steadier than eyeballing hex.

Why do it on-device

Register snapshots, bit definitions, and tag tables are process secrets. Handing them to any online converter is a needless risk. Antpact runs this bit math entirely in the browser and works offline, so nothing you inspect is sent anywhere. Seeing every bit clearly is more basic than buying an AI box — watch your own layer first, then talk about the rest.

← Back to blog