Skip to content

Build1 publisher3 min readPublished

A PROFINET lab in Linux namespaces separates what the capture proves from what the device did

RUGERO Tesla built a PROFINET testbed out of Linux network namespaces and the p-net stack, and the write-up shows where a crafted frame sitting in a capture stops being evidence about the device that received it.

The Engineer · Build desk

Illustration accompanying A PROFINET lab in Linux namespaces separates what the capture proves from what the device did

What happened

  • RUGERO Tesla built a PROFINET testbed using Linux network namespaces to isolate controller and device, with p-net as the implementation and custom Python and Scapy harnesses feeding Wireshark and TShark.
  • The work ran in five phases: DCP and LLDP discovery, DCE/RPC application-relation traffic, cyclic Real-Time frame analysis, Layer 2 generation and malformed inputs, and a review of PROFINET security mechanisms.
  • Tesla reports that some parts of PROFINET were easy to observe, while others depended on controller/device behavior that the available open-source stack only partly exposed.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • constraint A malformed-input result from this rig can claim transmission only: the lab does not surface whether the device accepted, rejected or ignored the frame.
  • capability Discovery, AR establishment and cyclic RT framing become reproducible on one Linux host, so the parts of PROFINET that can be taught and regression-tested no longer need plant hardware.
  • decision Anyone reusing the setup has to decide how much weight the security-mechanism section carries, since that phase is a reading of the specification.
  • exposure Detection rules written against these identity fields will match the p-net sample device, and teams that ship them as plant signatures inherit a lab artifact.

Four components, two addressing schemes. DCP provides Layer 2 discovery and configuration functions, and LLDP contributes neighboring-device and topology information [5]. Acyclic application-relation traffic runs over DCE/RPC on UDP port 34964, carrying the structures associated with AR and IOCR configuration [6]. Cyclic Real-Time communication uses PROFINET's EtherType 0x8892 and puts process data directly onto Ethernet [7]. Tesla reports the DCP traffic on that same EtherType [8], so a capture filtered on `ether proto 0x8892` returns discovery and process data in one stream [17].

Discovery identifies a device without establishing a cyclic I/O relationship, and AR-related traffic has meaning only within a controller/device relationship [9]. A cyclic RT frame can have a recognizable layout and still depend on endpoint state and implementation behavior for acceptance [9]. The available open-source stack did not fully expose that controller/device behavior [4].

Tesla kept three kinds of evidence apart: what the captures established, what the application printed, and what a security conclusion could then claim [10]. On the last of those, he wrote that "a captured crafted frame proves that the frame reached the capture point. It does not tell me whether the target accepted it, rejected it, ignored it, or processed it in some other way" [11]. He added: "That sounds obvious, but it becomes easy to lose track of when a script reports a successful send and the capture looks exactly like the frame that was intended" [12].

A DCP Identify query from the controller side returned station name `rt-labs-dev`, vendor ID 0x0493, device ID 0x0002, and IP address 192.168.1.20 [13]. Those are the values the p-net device answered with inside a namespace. A fingerprinting rule keyed on them identifies that sample device; for it to identify plant hardware, the identity fields would have to come from plant hardware. The same condition governs the netload and malformed-input work: a namespace pair reproduces the framing, and firmware decides what to do with it.

Of the five phases, four involved direct laboratory experimentation and the fifth was a specification-driven review connecting the observations to PROFINET's historical Security Class model and newer secure application mechanisms [3]. The fifth produced no packets [18]. The security-mechanism conclusions rest on reading documents, which is a legitimate way to write that section and a different kind of evidence from a capture. The unglamorous part took the longest: Tesla reports spending considerable time on namespaces, virtual interfaces, routing, and the behavior of the open-source implementation before any of it worked [15].

The stated goal was to build a reproducible PROFINET laboratory, examine its observable protocol surfaces, and document the point where packet construction, implementation output, and verified endpoint behavior stop answering the same question [14]. The text as published breaks off during the discovery phase, before the DCE/RPC and cyclic RT captures appear [16].

What to watch

  • Whether a follow-up publishes device-side state or reject counters from p-net, which is what a malformed-frame test needs before it can claim acceptance or rejection.
  • Whether the Security Class phase is ever tested on the wire against a device implementing the newer secure application mechanisms.
  • Whether the namespace, virtual interface and routing setup is published in a form another team can rebuild without guessing.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories