Skip to content

Validate against recorded traffic of real Rockwell devices; fix template reads, BOOL writes and the SendRRData timeout - #25

Merged
boeboe merged 9 commits into
mainfrom
capture-validation
Nov 8, 2026
Merged

boeboe merged 9 commits into
mainfrom
capture-validation

Conversation

@boeboe

@boeboe boeboe commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Validates go-ethernetip against recorded traffic of real Rockwell devices, after the go-s7comm v0.11/v0.12 method: decode every recorded message, encode it back, replay the client and the Logix client against the recorded replies, send the recorded requests to the server and the Logix emulation and compare with the devices' answers.

  • Devices identified by their own answers (class A): 1756-L63/A ControlLogix 15.4 (RSLinx / RSLogix 5000 / FactoryTalk), 1756-ENBT/A 4.3, Micro850 2080-LC50-48QBB 12.11, MicroLogix 1400 (PCCC). Others: unidentified (class C) or the Micro850's lab without identity (class B).
  • 20 captures (29 MB) committed byte-identical under <client-or-peer>_<device>_<operation> names; original names, URLs, revisions and stated terms in manifest.json; coverage.json per exchange; SHA256SUMS. All tests run in make test (no network).

Defects found and fixed

  1. logix Client.Template asked Read Template for words×4−23 octets; RSLogix 5000 asks the 1756-L63 for ×4−20 and the controller holds exactly that, so the last member name was cut ("U" for "UN"). FactoryTalk frames 99–113.
  2. logix emulation kept a written BOOL 0xFF; the Micro850 reads it back as 1 (16 write-then-read sequences).
  3. server SendRRData replies carried timeout 0; the ControlLogix and Logix-like targets echo the request's (Micro850/MicroLogix answer constants: pinned).

Pinned differences

Command 0x0001, Identity 0x65/0x66, Message Router class list, Rockwell-private / Micro800 objects, PCCC, Micro850 ListServices capabilities and extra Identity octets, Template GAA, ;n template suffix, multicast group, MicroLogix originator's non-zero reserved Forward_Open octets. See testdata/captures/README.md.

Tests

internal/capture (pcap/pcapng, TCP reassembly, pairing; 98.7 %), decode/re-encode and malformed variants (encap, cip, implicit), client replay (a request no recorded originator sent fails), logix templates, bit writes and Micro850 tags, server parity replay and 300 seeded mutated streams, fuzz seeds for 16 targets. SAST: 0 findings (one G115 in the capture reader fixed). Interop pins unchanged.

No public API change. RELEASE.md v0.6.0.

🤖 Generated with Claude Code

boeboe and others added 4 commits November 8, 2026 12:25
testdata/captures: captures of a 1756-L63 ControlLogix (15.4) and a
1756-ENBT/A (4.3) with Rockwell software, and of unidentified targets,
with manifest.json (provenance, SHA256, evidence class), coverage.json and
SHA256SUMS. Files whose terms do not permit redistribution are held as
excerpts of their EtherNet/IP messages; make captures-fetch,
captures-check and captures-extended fetch the raw files (SHA256-pinned)
and run the capture tests on them.

internal/capture reads pcap and pcapng, reassembles TCP, splits
encapsulation messages, keeps UDP 44818 and 2222, and pairs requests with
replies; its counts equal Wireshark 4.6's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ta timeout

Recorded traffic of a 1756-L63 showed two differences:

- logix: Client.Template asked Read Template for attribute 4 x 4 - 23
  octets; RSLogix 5000 asks the controller for x 4 - 20 (COUNTER 100,
  TIMER 76 octets), which it holds in full, so the end of the last
  member's name was lost. The client now asks x 4 - 20.
- server: SendRRData replies carried timeout 0; the recorded targets echo
  the request's timeout.

Capture tests for encap, cip, implicit, client (replay against recorded
replies), logix (templates, bit writes) and server (parity replay with
pinned differences, seeded mutated streams); fuzz seeds of recorded
messages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

boeboe and others added 4 commits November 8, 2026 12:45
As go-s7comm names its captures: lower case, words joined by hyphens, the
original extension, the directory the source. Contents unchanged (same
SHA256); manifest.json keeps each file's original name, path and URL, the
cache stores the raw files under the new names, and the README lists the
names with their originals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… writes read back as 1

All 20 EtherNet/IP captures of the sources are committed byte-identical
under <client-or-peer>_<device>_<operation> names (owner decision); the
excerpt layer, its tool and the extended build tag are gone, and every
capture test runs on the raw files in make test.

New captures of ICS-Pcaps: a Micro850 2080-LC50-48QBB (identified by its
Identity object) with 65,000 symbolic Read Tag and Write Tag exchanges,
and a MicroLogix 1400 (PCCC). They showed that the Logix emulation kept a
written BOOL 0xFF where the Micro850 reads back 1: fixed. The SendRRData
timeout of the Micro850 and MicroLogix replies is a constant, pinned as
device-specific; the MicroLogix originator's reserved Forward_Open octets
are non-zero, pinned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boeboe boeboe changed the title Validate against recorded traffic of real Rockwell devices; fix template reads and the SendRRData timeout Validate against recorded traffic of real Rockwell devices; fix template reads, BOOL writes and the SendRRData timeout Nov 8, 2026
…once

The race jobs timed out (2 min) reading the 29 MB corpus for every test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boeboe
boeboe merged commit 427d97e into main Nov 8, 2026
45 checks passed
@boeboe
boeboe deleted the capture-validation branch November 8, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant