DYODE

Arnaud Soullié (Penetration Tester and Researcher · Wavestone)

BruCON 0x09 · Day 2

Overview

In the realm of Industrial Control Systems (ICS), securing operational technology (OT) networks from cyber threats while maintaining necessary data flows presents a persistent challenge. Arnaud Soullié's talk, "DYODE: Do Your Own Diode," introduces an innovative, open-source, and remarkably low-cost solution designed to bridge this gap. DYODE, which stands for "Do Your Own Diode," is a project focused on building do-it-yourself data diodes specifically tailored for ICS environments.

Watch on YouTube

Visual summary for DYODE by Arnaud Soullié
Visual summary for DYODE by Arnaud Soullié

Key moments

  1. 0:00 Introduction to DYODE: DIY low-cost data diode
  2. 4:40 Why DYODE? Costly commercial solutions & ICS risks
  3. 11:45 Video Demo: File transfer, Modbus, screen sharing (V1)
  4. 24:00 DYODE V2: Reducing cost with optocouplers
  5. 28:00 Live Demo: One-way Modbus data transfer with PLC
  6. 31:00 DYODE's limitations and threat model guarantees
  7. 36:00 Future roadmap and call for contributions

DYODE

Speakers: Arnaud Soullié, Penetration Tester and Researcher, Wavestone

Conference: BruCON

YouTube: https://www.youtube.com/watch?v=JjqPOesXje4

Overview

In the realm of Industrial Control Systems (ICS), securing operational technology (OT) networks from cyber threats while maintaining necessary data flows presents a persistent challenge. Arnaud Soullié's talk, "DYODE: Do Your Own Diode," introduces an innovative, open-source, and remarkably low-cost solution designed to bridge this gap. DYODE, which stands for "Do Your Own Diode," is a project focused on building do-it-yourself data diodes specifically tailored for ICS environments.

The core problem DYODE addresses is the inherent connectivity of ICS to corporate networks or the internet, creating significant attack vectors. While commercial data diodes offer robust one-way data transfer security, their exorbitant cost—often tens of thousands of dollars annually—makes them impractical for many organizations, especially for non-critical or low-bandwidth applications. Soullié, a Penetration Tester and Researcher at Wavestone, highlights how DYODE provides an accessible alternative, enabling secure, one-way data flow using commercial off-the-shelf (COTS) hardware and open-source software, aiming for a unit cost well under $200.

This talk is crucial for anyone involved in ICS security, critical infrastructure protection, or general network segmentation strategies. By demonstrating the feasibility of an affordable, physically-backed one-way data transfer solution, DYODE empowers organizations to implement a fundamental security control that was previously out of reach due to cost. It provides a blueprint for enhancing the security posture of OT networks, particularly for use cases like predictive maintenance data exfiltration or read-only third-party access, without introducing the risks associated with bidirectional connections.

Background

▶ Watch: Introduction to DYODE: DIY low-cost data diode (0:00)

Industrial Control Systems (ICS) are the backbone of modern society, controlling everything from manufacturing plants and energy grids to building automation and transportation networks. These systems typically feature a hierarchical network architecture: at the lowest level, sensors and actuators interact directly with the physical process, managed by Programmable Logic Controllers (PLCs). Above this, a supervision network hosts Human-Machine Interfaces (HMIs) and servers for centralized management. Crucially, these OT networks are almost invariably connected to the corporate IT network, and often, by extension, to the internet. This connectivity, while enabling efficiency and remote management, introduces significant cybersecurity risks.

The concept of a data diode, also known as a one-way gateway, has long been recognized as a robust security mechanism for enforcing unidirectional data flow. Unlike traditional network connections that allow data to travel in both directions, data diodes are engineered to permit information flow only from a "lower" security domain to a "higher" one, or vice-versa, without allowing any return path. This security guarantee is fundamentally backed by physics, often utilizing optical components where the physical properties of light-emitting diodes (LEDs) and photodiodes prevent electrons from flowing backward, thereby ensuring data cannot traverse in the reverse direction. Historically, these devices have found extensive use in high-security environments, particularly within the defense industry, where absolute assurance of data isolation is paramount.

However, the widespread adoption of commercial data diodes in general ICS environments has been severely hampered by their prohibitive cost. Soullié points out that these high-performance, enterprise-grade solutions can cost tens of thousands of dollars annually, making them an impossible sell for many clients, especially for use cases that are not mission-critical or involve relatively low bandwidth. He provides two illustrative examples: a pharmaceutical client needing to provide a third-party vendor with near-real-time read access to PLC outputs for cooling unit optimization, and a scenario requiring periodic, low-bandwidth data transfer (e.g., 100 KB every six hours) for predictive maintenance. In both cases, the business need for connectivity exists, but the cost-benefit analysis for a commercial data diode simply doesn't add up, leaving a critical security vulnerability unaddressed.

The DYODE project was born out of this identified need, building upon previous academic and DIY attempts to create one-way gateways. Soullié acknowledges prior work by researchers like LogiTech, Osteen, Scott, and Robert Gabriel, who explored similar concepts. However, these earlier implementations were often difficult to reproduce or lacked the ease of deployment required for practical application in industrial settings. The project's objective was to develop a truly low-cost, do-it-yourself solution using readily available commercial off-the-shelf (COTS) components and open-source software, targeting a unit cost of approximately $200. The aim was to deliver a proof-of-concept that was easy to deploy, repeatable, and whose results could be openly shared with the community, thereby democratizing access to this vital security control.

Key Findings

▶ Watch: Video Demo: File transfer, Modbus, screen sharing (V1) (11:45)

The DYODE project successfully demonstrated the feasibility of constructing functional, low-cost data diodes for ICS environments, offering a viable alternative to prohibitively expensive commercial solutions. The key findings revolve around the development of two distinct versions of the data diode, each showcasing different approaches to achieving one-way data flow at a significantly reduced cost.

The first version of DYODE, while a proof-of-concept, proved the core concept using readily available copper-optical converters. This iteration achieved a respectable data transfer rate of approximately 3 megabytes per second (MB/s) for file transfers. Although its initial build cost of €374 exceeded the target of $200, it laid the groundwork for the project. This version successfully navigated the complexities of TCP/IP communication over a unidirectional link by employing Raspberry Pi "counters" on each side to perform necessary protocol translations, effectively making a three-way handshake possible over a physically one-way connection.

The project's most significant finding emerged with the second version of DYODE, which focused heavily on cost reduction and miniaturization. By replacing the more expensive copper-optical converters with direct optocouplers (a single integrated circuit containing an LED and a photodiode), the team dramatically lowered the hardware cost. Utilizing Raspberry Pi Zero boards, the total unit cost was brought down to an impressive €80, well within the initial $200 target. This version, while having a lower bandwidth of approximately 20 kilobytes per second (KB/s) when using a Raspberry Pi 2, and further reduced to 3-4 KB/s with a Raspberry Pi Zero, proved entirely sufficient for the targeted low-bandwidth ICS use cases such as Modbus data transfer.

Through both versions, DYODE successfully demonstrated one-way data transfer for critical ICS applications, including:

  • File transfers: Securely moving logs or other data out of the ICS network.
  • Modbus data transfer: Providing read-only access to PLC values for monitoring or third-party applications.
  • Screen sharing: Enabling remote, read-only support or monitoring of ICS workstations.

A crucial aspect of the project's success is its commitment to open-source principles. Both the hardware design (including PCB schematics and 3D printable case files) and the software (Python scripts and configurations) are openly available on GitHub. This open approach not only fosters community contribution and independent verification but also makes the solution easily reproducible and adaptable by organizations worldwide, democratizing access to this vital security technology. The project explicitly states it's not selling a product but providing an R&D blueprint for others to build upon.

Technical Deep Dive

▶ Watch: DYODE V2: Reducing cost with optocouplers (24:00)

The technical ingenuity of DYODE lies in its dual approach to enforcing one-way data flow, evolving from a COTS-heavy solution to a custom, component-level design. Both versions rely on the fundamental principle of using light as the transport medium to physically prevent data from flowing backward.

Version 1: Copper-Optical Converter Approach

The initial prototype of DYODE leveraged readily available copper-optical converters, such as those from TP-Link. These devices typically have an Ethernet port (copper) and two fiber optic ports (one for transmit, one for receive). The core idea was simple: connect the transmit (Tx) port of the "input" converter to the receive (Rx) port of the "output" converter using a fiber optic cable, and leave the reverse connection unplugged. This physically ensures one-way data flow.

However, a practical challenge arose: standard Ethernet links require both Tx and Rx paths to be active for the link to be established. The input converter would not send data if it didn't detect a link on its Rx side. To overcome this, a clever "trick" was employed: a third, dummy copper-optical converter was used. The Tx of the input converter was connected to the Rx of the dummy, and the Tx of the dummy was looped back to its own Rx, effectively "tricking" the input converter into believing a full duplex link was present, allowing it to transmit.

Because a one-way physical connection prevents the TCP three-way handshake (SYN, SYN-ACK, ACK), standard TCP protocols cannot operate directly. This necessitated the use of two Raspberry Pis (referred to as "counters"), one on each side of the optical connection. These Raspberry Pis act as protocol translators. The input Raspberry Pi receives TCP connections, extracts the application data, and then forwards it unidirectionally across the optical link using a custom one-way protocol. The output Raspberry Pi then reconstructs the application data and serves it to the destination system.

For data transfer, the initial implementation utilized UDPcast, a Linux-based tool primarily designed for efficient file transfers over UDP, particularly in scenarios like satellite downlinks where the uplink is expensive or nonexistent. UDPcast includes forward error correction (FEC) capabilities, ensuring data integrity even over potentially lossy connections. On top of UDPcast, custom Python code was developed to handle specific features:

  • File Transfer: Files are dropped into a network share on the input Raspberry Pi. The input Pi calculates a checksum, sends the filename and checksum, then the file itself. The output Pi verifies the checksum and places the file in its own network share for the corporate network to access.
  • Modbus Transfer: To address latency issues observed with UDPcast for small, frequent Modbus data, a more naive but faster Python UDP socket implementation was created. The input Raspberry Pi acts as a Modbus client, polling a real PLC. It serializes the Modbus register values and sends them via UDP. The output Raspberry Pi runs a Modbus server, updating its values based on the incoming data. Critically, the output Raspberry Pi can be configured with the same IP address as the original PLC, allowing target systems on the corporate network to connect to the data diode as if it were the PLC itself, requiring no software reconfiguration on the client side.
  • Screen Sharing: Inspired by commercial data diodes, this module captures screenshots twice per second from an ICS workstation. These images are sent through the data diode, and the output Raspberry Pi, running an Apache web server, serves them as an MJPEG (Motion JPEG) stream. This creates the illusion of a low-frame-rate video feed, suitable for read-only support.

Version 2: Optocoupler-Based Approach

To drastically reduce cost and size, Version 2 shifted from off-the-shelf copper-optical converters to direct optocouplers. An optocoupler is a tiny integrated circuit containing an LED and a photodiode, providing electrical isolation and one-way signal transmission. This approach offers a purer physical one-way guarantee at the component level.

This version primarily uses Raspberry Pi Zero boards for their low cost (around $5 each). A custom PCB (Printed Circuit Board) was designed to integrate the optocoupler, a few capacitors, and the necessary connections. The optocoupler offers an acceptable bandwidth, achieving about 20 KB/s with a Raspberry Pi 2 and 3-4 KB/s with a Raspberry Pi Zero. While significantly lower than Version 1, this bandwidth is more than sufficient for Modbus data transfer and other low-frequency data exfiltration needs.

The configuration of both DYODE versions is managed via a simple text file. This file defines the static IP and MAC addresses for both Raspberry Pis. Static ARP entries are essential because dynamic ARP resolution cannot function across a physically one-way link. The configuration also specifies the modules to be used (e.g., folder share, PLC Modbus polling) and their parameters, such as network share paths, PLC IP addresses, and Modbus register ranges.

A common question addressed by Soullié is "Why not just cut a pair of wires in an Ethernet cable?" While theoretically possible to force half-duplex, this is not a true data diode. It still requires active network interface configuration on both sides and leaves open potential side channels (e.g., manipulating link up/down frequencies to transmit covert data). The DYODE project emphasizes a physically enforced one-way mechanism that is more robust against such scenarios.

Demo / Proof of Concept

▶ Watch: DYODE's limitations and threat model guarantees (31:00)

The presentation included compelling demonstrations for both versions of the DYODE project, showcasing its practical application in ICS environments.

Version 1 (Video Demonstration)

The first version of DYODE was demonstrated via video, illustrating three core functionalities:

  1. File Transfer: The setup involved an ICS workstation and a corporate network workstation, separated by the DYODE. To transfer a file from the ICS to the corporate network, a user simply dropped a file into a designated network share on the input Raspberry Pi. The file would then disappear from the input share as it was processed. On the corporate side, the user could access another network share on the output Raspberry Pi, where the transferred file would appear. This demonstrated a simple yet effective method for securely exfiltrating documents or log files from the OT network.
  1. Modbus Transfer: This demo simulated a PLC on the ICS side using Modbus Poll, a PLC simulator. On the corporate side, a Modbus client was configured to pull values from the output Raspberry Pi. When values were modified on the simulated PLC in the ICS, they appeared on the corporate workstation's Modbus client with a delay of one to two seconds. This proved the ability to securely provide near-real-time, read-only access to PLC data, crucial for applications like remote monitoring or predictive maintenance, without allowing any control commands back into the ICS.
  1. Screen Sharing: The final feature demonstrated for Version 1 was screen sharing. A script was launched on an ICS PC, capturing its screen. On the corporate network, a web browser accessed a website hosted on the output Raspberry Pi. This website displayed screenshots updated twice per second, creating the illusion of a low-frame-rate video. The demo highlighted a one to two-second delay, but the quality was sufficient for level 3 support scenarios, allowing remote experts to view an ICS operator's screen for troubleshooting without gaining any control capabilities.

Version 2 (Live Demonstration)

The second version of DYODE, built with optocouplers and Raspberry Pi Zeros, was showcased with a live demonstration using a real Schneider PLC connected to a traffic light.

The setup consisted of two virtual machines: one representing the ICS (left side of the screen) running a SCADA software connected to the physical PLC, and another representing an external provider or corporate network (right side of the screen) running the same SCADA software, but connected to the output Raspberry Pi of the DYODE.

The presenter first demonstrated the one-way data flow by interacting with the SCADA software on the ICS side. When he switched the traffic lights on or off via the ICS SCADA, the corresponding status changes were reflected on the corporate network's SCADA display after a few seconds of delay. This visually confirmed that real-time process data was successfully flowing through the DYODE.

Crucially, the presenter then attempted to manipulate the traffic lights from the corporate network's SCADA interface. As expected, these attempts failed. The lights on the physical PLC remained unchanged, and the SCADA interface on the corporate side would momentarily show the attempted change before being overwritten by the actual (unchanged) status from the ICS side. This vividly illustrated the core security guarantee of the data diode: no control commands or data could traverse from the output (corporate) side back to the input (ICS) side, physically preventing unauthorized remote control.

The presenter acknowledged a key point: while the DYODE prevents reverse data flow to the PLC, compromising the output Raspberry Pi could allow an attacker to modify the data presented to the corporate network's SCADA. However, this compromise would only affect the data consumed by the external party and would not propagate back to the physical process, as demonstrated by the unchanging traffic lights. This reinforces the specific threat model addressed by the data diode – preventing inbound attacks to the ICS – while also highlighting the need for logical hardening of the data diode components themselves.

Defensive Implications

▶ Watch: Future roadmap and call for contributions (36:00)

The DYODE project offers significant defensive implications for organizations operating Industrial Control Systems, particularly those struggling with the cost of traditional data diode solutions. However, its implementation requires a clear understanding of its capabilities and limitations.

Targeted Use Cases

DYODE is not a universal panacea for ICS security but is highly effective for specific scenarios where one-way data flow is required. These include:

  • Predictive Maintenance: Securely sending operational data (e.g., sensor readings, equipment status) to third-party vendors or cloud analytics platforms for analysis, without exposing the ICS to inbound connections.
  • Regulatory Compliance & Logging: Exfiltrating audit logs, security events, or production data to corporate SIEMs or data archives.
  • Read-Only Third-Party Access: Providing external partners (e.g., equipment manufacturers, specialized support) with visibility into PLC values or HMI screens for monitoring and troubleshooting, without granting them control.
  • Isolating Safety PLCs: As mentioned in the roadmap, one client is exploring using DYODE to isolate safety PLCs from process control networks, ensuring that safety-critical data can be monitored but not interfered with.

Threat Modeling and Limitations

It is critical to understand the precise security guarantees of DYODE. Like any data diode, its primary assurance is that no data will flow from the output Raspberry Pi back to the input Raspberry Pi, regardless of software configuration. This physical separation is the bedrock of its security.

However, DYODE does not protect against all threats:

  • Logical Hardening: The Raspberry Pis themselves, as general-purpose computers, require proper logical hardening. Leaving default credentials (e.g., for SSH) or unpatched software on the Raspberry Pis would allow an attacker to compromise the diode's processing capabilities. A compromised output Raspberry Pi could, for example, modify the data being sent to the corporate network, leading to misinformation or a denial of service for the external consumer, though crucially, this would not propagate back to the ICS.
  • Denial of Service (DoS): An attacker could potentially overwhelm the data diode with excessive packets, causing a DoS on the diode itself, preventing data from reaching the corporate network. However, this DoS would be contained to the diode and would not propagate to the underlying ICS, preserving the integrity and availability of the physical process.
  • Side Channels: For extremely high-security environments, the project acknowledges that sophisticated adversaries (e.g., national state actors) could potentially exploit side channels. These could include:
  • Radio Frequency (RF) Emissions: Covertly modifying Raspberry Pis to emit RF signals, allowing communication between the input and output sides.
  • GPIO Pin Exploitation: Using the General Purpose Input/Output (GPIO pins) on Raspberry Pis for frequency modulation to transmit data.
  • The project explicitly states that preventing such advanced side channel attacks is out of scope for its current threat model, which focuses on standard and sophisticated attackers rather than nation-state capabilities. For such extreme requirements, additional physical countermeasures (e.g., Faraday cages, physically cutting GPIO pins) would be necessary.
  • Two-Way Needs: DYODE is unsuitable for scenarios requiring bidirectional communication, such as software updates for ICS components, remote command execution, or interactive remote access. Organizations must still manage these two-way connections securely, often through alternative means like patch management systems or secure remote access solutions.

Roadmap for Enhanced Defensive Capabilities

The project roadmap outlines several planned enhancements that would further bolster DYODE's defensive posture:

  • Expanded Protocol Support: Adding support for other common ICS protocols like DNP3, S7 (Siemens PLCs), and OPC UA would broaden its applicability.
  • Link Status Monitoring: Implementing a heartbeat mechanism where the input diode periodically sends a small data packet to the output. Failure to receive this heartbeat would indicate a problem with the diode, allowing for proactive intervention (e.g., rebooting) and addressing the current limitation of not being able to send alerts backward.
  • File Integrity Checks: For file transfer modules, implementing robust checks such as validating file extensions, MIME types, stripping active content (e.g., using Exiftool), and potentially digital signature verification to prevent the transfer of malicious files.
  • Logging and Traceability: Storing detailed logs of all transferred files and data points to enhance auditability and traceability, crucial for incident response and compliance.

In essence, DYODE provides a powerful, affordable tool for segmenting and securing ICS networks at the physical layer. Defenders should leverage it for appropriate one-way data flows while simultaneously implementing robust logical hardening on the Raspberry Pis and maintaining awareness of its specific threat model.

Key Takeaways

  • Cost-Effective ICS Security: DYODE successfully demonstrates the creation of functional, low-cost data diodes for Industrial Control Systems, with a second version achieving a unit cost of just €80, significantly undercutting commercial solutions that cost tens of thousands of dollars annually.
  • Physically Enforced One-Way Flow: The solution leverages physical properties (optical isolation via copper-optical converters or optocouplers) to guarantee unidirectional data transfer, providing a fundamental security primitive that prevents inbound attacks to critical OT networks.
  • Versatile Data Transfer Capabilities: DYODE supports essential ICS data transfer needs, including file exfiltration, near-real-time Modbus data polling, and read-only screen sharing, addressing common requirements for predictive maintenance, monitoring, and remote support.
  • Open-Source and Reproducible: The entire project, including hardware designs (PCBs, 3D printable cases) and software (Python scripts, configuration files), is open-source and available on GitHub, encouraging community contribution, independent verification, and widespread adoption.
  • Specific Threat Model and Limitations: While robust for its intended purpose, DYODE is not a universal security solution. It requires careful threat modeling, proper logical hardening of the Raspberry Pi components (e.g., securing SSH), and does not protect against advanced side channel attacks or scenarios requiring bidirectional communication.
  • Community-Driven Development: The project actively encourages contributions from the community to expand protocol support (e.g., DNP3, S7, OPC UA) and enhance features like link status monitoring and file integrity checks, aiming to establish a widely adopted open-source standard for data diodes.

About the Speaker(s)

The DYODE project was presented by Arnaud Soullié, a French Penetration Tester and Researcher at Wavestone. Arnaud specializes in ICS security and Active Directory security, bringing a wealth of practical experience from performing security audits and penetration tests on industrial control systems. He is actively involved in giving workshops to educate others on how to pen test ICS, a role he even balanced with his presentation at BruCON, leaving a colleague to conduct a workshop in the ICS village. Arnaud mentions that the initial idea for the DYODE project originated from his colleague, Ari, with whom he collaborated on ICS assessments, and who is now working at a "big four" firm in Switzerland.

Reviews

  • Dr. Zero (Offensive Security Researcher) — MUST SEE ★★★★★
  • Heather Calloway (CISO) — MUST SEE ★★★★★

→ Top-rated talks at BruCON 0x09

All talks from BruCON 0x09