Attack Surface of Supply Chain: Exploiting Software Architecture Design of Industrial Controllers

Marina Krotofil

Swiss Cyber Storm 2021 · Day 1 · Scenario_2

Overview

In this compelling and highly technical talk at Swiss Cyber Storm, Marina Krotofil unveils a groundbreaking research into the inherent vulnerabilities residing within the software architecture design of industrial controllers, specifically Programmable Logic Controllers (PLCs). Titled "Attack Surface of Supply Chain: Exploiting Software Architecture Design of Industrial Controllers," the presentation details a novel, stealthy, and highly precise method for reconnaissance, data exfiltration, and control logic manipulation that leverages previously overlooked memory allocation patterns. This research, initially accepted for Black Hat USA 2020 but withdrawn due to speaker job changes, exposes a critical blind spot in the security of Operational Technology (OT) and Industrial Control Systems (ICS), revealing how attackers can achieve automated, high-precision attacks that remain undetectable by recommended security appliances and network monitoring solutions.

Watch on YouTube · Slides

Visual summary for Attack Surface of Supply Chain: Exploiting Software Architecture Design of Industrial Controllers by Marina Krotofil
Visual summary for Attack Surface of Supply Chain: Exploiting Software Architecture Design of Industrial Controllers by Marina Krotofil

Key moments

  1. 2:00 NotPetya: A devastating supply chain attack
  2. 8:00 Industrial controller certification: Claims vs. reality
  3. 16:00 Unused memory in PLCs allows function block enumeration
  4. 19:00 Stealthy exfiltration of PLC data and credentials
  5. 23:00 Covert C2 channel bypasses industrial firewalls
  6. 26:00 Vendor inaction and call for shared responsibility
  7. 29:00 Inherent design flaws in industrial controllers

Attack Surface of Supply Chain: Exploiting Software Architecture Design of Industrial Controllers

Speakers: Marina Krotofil, Experienced Pen Tester, Researcher on Industrial Control Systems

Conference: Swiss Cyber Storm

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

Overview

In this compelling and highly technical talk at Swiss Cyber Storm, Marina Krotofil unveils a groundbreaking research into the inherent vulnerabilities residing within the software architecture design of industrial controllers, specifically Programmable Logic Controllers (PLCs). Titled "Attack Surface of Supply Chain: Exploiting Software Architecture Design of Industrial Controllers," the presentation details a novel, stealthy, and highly precise method for reconnaissance, data exfiltration, and control logic manipulation that leverages previously overlooked memory allocation patterns. This research, initially accepted for Black Hat USA 2020 but withdrawn due to speaker job changes, exposes a critical blind spot in the security of Operational Technology (OT) and Industrial Control Systems (ICS), revealing how attackers can achieve automated, high-precision attacks that remain undetectable by recommended security appliances and network monitoring solutions.

Krotofil, an expert in offensive cyber-physical security, frames the discussion within the broader context of supply chain attacks, emphasizing the often-underestimated attack surface of the assets we purchase. Her work challenges the efficacy of existing security standards and certifications, demonstrating that even certified devices harbor fundamental design flaws exploitable by non-state-sponsored actors. The talk serves as a stark warning to asset owners and a call to action for vendors, highlighting how deeply embedded architectural decisions can lead to widespread, systemic vulnerabilities that undermine the very foundation of critical infrastructure security.

Background

▶ Watch: NotPetya: A devastating supply chain attack (2:00)

The concept of a supply chain attack has evolved from theoretical threats to devastating real-world incidents, most notably the NotPetya attack, which crippled Ukraine's infrastructure in less than 24 hours. Marina Krotofil, drawing on her experience as a Ukrainian national involved in incident response, underscores the profound impact such attacks can have, classifying NotPetya as a military-grade operation. Beyond state-sponsored threats, the increasing sophistication of cybercriminals means that the supply chain is now a recognized, key attack vector, as evidenced by its prominence at conferences like Black Hat USA. Supply chain security encompasses two main areas: using the supply chain as an attack delivery vector (e.g., infected hardware, compromised subcontractors) and, critically, understanding the inherent attack surface of purchased assets. This talk focuses on the latter, particularly in the context of critical infrastructure.

In the OT/ICS domain, security efforts are often guided by standards like IEC 62443, which sets requirements for vendors, integrators, and asset owners. A key aspect is the concept of Security Levels (SL1-SL4), which supposedly indicate a device's robustness against different threat actors, from script kiddies to state-sponsored entities. However, Krotofil critically points out the arbitrary nature of these levels and the severe limitations of current certification processes. These certifications often involve only a few weeks of "functional security testing," checking for basic requirements like password length, rather than comprehensive vulnerability assessments. This leads to a false sense of security, as devices certified for high security levels have repeatedly been found to contain severe vulnerabilities in communication stacks and easily bypassable authentication schemes, often exploitable by "master-level" students, not just advanced state actors.

Marina Krotofil's research specialization is offensive cyber-physical security, focusing on designing and executing physical damage scenarios in critical infrastructure. Her work involves reverse-engineering damage scenarios and then identifying the necessary exploits and asset compromises. She employs a custom cyber-physical attack lifecycle that emphasizes reconnaissance, or "process comprehension," as a crucial, yet under-researched, stage in OT. Unlike IT, where reconnaissance tools are abundant, OT lacks public tools and a deep understanding of what constitutes effective process comprehension for industrial control systems. A core component of exploiting industrial processes is understanding the control logic, which is the code running the physical process. This logic is often written in languages like Ladder Logic and utilizes Standard Function Blocks (SFBs)—pre-tested, reusable code modules provided by PLC vendors (e.g., for Modbus communication). These SFBs interact with data blocks (DBs), which store variable values at specific memory offsets. It is within the seemingly benign design choices of these architectures that Krotofil's research uncovers a profound vulnerability.

Key Findings

▶ Watch: Unused memory in PLCs allows function block enumeration (16:00)

Marina Krotofil's research unveils a critical, previously unrecognized attack surface within the software architecture design of industrial controllers, specifically Siemens PLCs. The key finding revolves around the intrinsic memory allocation strategy employed by these devices and the resulting unused memory patterns.

The core discovery is that Siemens PLCs allocate memory for variables in a standardized, yet inefficient, manner. Regardless of the variable type, such as a single boolean that only requires one bit, the system consistently allocates a fixed size, typically two bytes (sometimes four). The remaining portion of this allocated memory block, which is not used by the variable itself, results in a unique pattern of "empty" or unused memory.

This seemingly innocuous design choice is, in fact, a significant information leakage vulnerability. Krotofil and her team discovered that this pattern of unused memory is unique for every Standard Function Block (SFB) within the PLC's library. Because the library of standard functions is known and accessible (e.g., through Siemens' TIA Portal software), an attacker can pre-map these unique unused memory patterns. This allows for the creation of "rainbow tables" of SFB memory fingerprints.

The most profound implication of this finding is the ability to enumerate all function blocks used in a PLC's control logic in an automated and stealthy manner. Previously, interrogating control logic was considered extremely difficult, often requiring complex reverse engineering of compiled code. This novel technique offers an unprecedented level of process comprehension for an attacker, providing detailed insight into the specific functionalities, communication protocols, and safety mechanisms implemented on a target PLC. This high-precision reconnaissance capability represents a significant breakthrough, enabling attackers to understand the operational context of the industrial process without triggering alarms or requiring advanced, detectable commands.

Technical Deep Dive

▶ Watch: Stealthy exfiltration of PLC data and credentials (19:00)

The technical heart of Krotofil's research lies in the method developed to exploit the unused memory patterns for comprehensive PLC reconnaissance and manipulation. The process begins with enumerating Standard Function Blocks (SFBs), a capability previously deemed almost impossible to automate stealthily.

Traditional methods for PLC interrogation, such as the get block info command or a bulk upload command, provide some information about SFBs. However, these commands are considered "rare" and are easily detectable by network monitoring solutions, making them unsuitable for stealthy operations. The innovation lies in using standard read requests. These requests are legitimate and ubiquitous, continuously used by Human Machine Interfaces (HMIs) and databases to read operational data from the PLC. This normalcy makes them exceptionally difficult to detect as malicious.

The technique involves systematically reading from the beginning of a data block, byte by byte, across the entire memory space. By analyzing the returned data and mapping the unused memory segments, an attacker can identify the unique "fingerprint" of each SFB. Once these patterns are matched against pre-generated rainbow tables (derived from known SFB libraries), the attacker can precisely identify every SFB used in the PLC's control logic. This method can enumerate hundreds of SFBs, covering critical functionalities such as communications, remote administration, control algorithms, and safety functions. This level of detail provides an attacker with unparalleled insights, akin to the reconnaissance capabilities demonstrated in the Havoc attack, but with far greater stealth and precision.

Beyond enumeration, the research demonstrates the ability to exfiltrate the context—the actual values of variables associated with these SFBs. Since the location of each variable within a data block is known (data block number, offset), standard read requests can again be used to retrieve these values. Large variables, such as passwords or email addresses, are often stored in separate global databases and addressed by pointers within the SFBs. The attacker's process involves:

  1. Reading the pointer from the SFB's data block offset.
  2. Decoding the pointer, which is stored in a specific format.
  3. Using the decoded pointer to access the global database.
  4. Exfiltrating the sensitive information, which is frequently stored in cleartext. This allows an attacker to retrieve critical data like alert recipient emails and their associated passwords.

The next logical step, and perhaps the most impactful, is content manipulation. With knowledge of SFB structures, variable locations, and the ability to read and write, an attacker can modify the value of any chosen variable. This is performed using standard write requests, which are also legitimate commands. The standardized nature of these libraries means that this entire process—enumeration, exfiltration, and manipulation—can be fully automated. This enables high-precision attacks without requiring human intervention or on-site engineering presence, a capability previously thought impossible. While there are caveats, such as race conditions, Krotofil notes that "smart tricks" and existing techniques can overcome these challenges.

A particularly insidious aspect of this research is the demonstration of how this unused memory can be leveraged to establish a covert Command and Control (C2) channel. In a typical industrial architecture (e.g., remote water monitoring with local substations, a data center with a SCADA server, and remote alarm management), network segmentation and industrial firewalls are deployed to isolate critical components. If an attacker compromises both the SCADA server and an HMI within the substation, they can use the legitimate read and write requests to relay commands to the PLC. The unused memory in the PLC can serve as a communication buffer. For instance, an attacker could send a "ping" command via the compromised SCADA server to the HMI, which then relays it to the PLC using a series of read/write operations on the unused memory. The PLC responds similarly, and the HMI relays the response back.

Extensive testing revealed that this covert C2 channel is undetectable by recommended security appliances. Industrial firewalls, designed to enforce network segmentation, permit these read/write commands because they originate from trusted devices (the compromised SCADA server and HMI) and use legitimate protocols. Similarly, network monitoring solutions like Clarity, which baseline network traffic, might detect a "baseline deviation change" if the volume of read/write requests increases, but they do not generate a security alert or classify it as a risky change. Such events are typically not even forwarded to a Security Operations Center (SOC), rendering the attack completely stealthy. This vulnerability is not exclusive to Siemens, as other vendors employing similar memory allocation strategies are also susceptible. The research thus exposes a profound flaw in the foundational design and monitoring of critical infrastructure.

Demo / Proof of Concept

▶ Watch: Vendor inaction and call for shared responsibility (26:00)

While the talk itself did not feature a live, real-time demonstration of the exploit, Marina Krotofil extensively detailed the methodology and presented the results of comprehensive testing that served as a robust proof of concept for her findings. The research involved:

  1. Systematic analysis of PLC memory allocation: This involved understanding how Siemens PLCs, and by extension other vendors using similar design principles, allocate memory for variables and the resulting creation of unused memory patterns.
  2. Development of SFB "rainbow tables": The team mapped the unique unused memory fingerprints of standard function blocks from known PLC libraries.
  3. Implementation of stealthy enumeration techniques: The talk described the process of using standard, legitimate read requests to interrogate PLC memory byte-by-byte and identify SFBs based on their memory patterns.
  4. Validation of data exfiltration and content manipulation: The researchers confirmed that sensitive data (e.g., cleartext passwords, emails) could be reliably exfiltrated and control logic variables could be modified using standard read/write commands.
  5. Extensive testing of covert C2 channels: The architecture for establishing an undetectable C2 channel was conceptualized and tested within a simulated industrial environment, including industrial firewalls and network monitoring solutions like Clarity. The key finding here was the lack of security alerts, with only benign "baseline deviation" events being generated.

The presentation of architectural diagrams illustrating the covert channel, along with the detailed explanation of the technical steps and the outcomes of testing against security controls, effectively served as a proof of concept. The confidence in the findings stems from the deep technical analysis and the validation against real-world security mechanisms.

Defensive Implications

▶ Watch: Inherent design flaws in industrial controllers (29:00)

The findings presented by Marina Krotofil carry profound defensive implications for the security of industrial control systems and critical infrastructure. The research highlights a fundamental flaw in current security paradigms, where design vulnerabilities are overlooked, certifications provide a false sense of security, and monitoring solutions fail to detect sophisticated, stealthy attacks.

One of the most striking revelations is Siemens' response to the disclosure of this "gigantic attack surface." According to Krotofil, the vendor's reaction was essentially "bad luck, apply security practices," without even issuing an advisory to customers. This underscores a critical issue of vendor accountability and the need for a paradigm shift in how vulnerabilities in OT devices are handled. The fact that high-precision, automated attacks are possible and undetectable by recommended security appliances is a severe indictment of the current state of industrial cybersecurity.

Defenders need to re-evaluate their assumptions about the security of their purchased assets. Key defensive actions and considerations include:

  • Memory Hardening: A basic, yet effective, mitigation suggested is to fill unused memory with "rubbish" or canaries. This would disrupt the unique patterns that enable SFB enumeration, making the reconnaissance technique significantly harder, if not impossible.
  • Enhanced Read/Write Protections: Implementing stronger authentication and authorization mechanisms specifically for read and write requests to PLCs is crucial. While these are legitimate commands, their indiscriminate use by potentially compromised devices needs to be tightly controlled.
  • Secure Software Architecture Design: The root cause of this vulnerability lies in poor software architecture design. Krotofil emphasizes that engineers developing PLC code need to be educated in secure development lifecycle (SDL) principles and the practical application of secure design, beyond theoretical cryptographic primitives. This includes evaluating attack surfaces and exploitability at the design stage.
  • Rethinking Certification and Standards: The research exposes the inadequacy of current IEC 62443 certifications. Asset owners should demand more rigorous, penetration-testing-based assessments rather than relying on functional security checks. Standards bodies need to evolve to address architectural vulnerabilities.
  • Advanced Anomaly Detection: While current network monitoring solutions like Clarity may only flag "baseline deviations," defenders need to configure these systems to treat even subtle deviations in PLC communication patterns (especially read/write volumes) with higher suspicion, potentially triggering investigations rather than benign events.
  • Supply Chain Scrutiny: The talk highlights that even custom function blocks developed by subcontractors can be reverse-engineered by attackers to create new rainbow tables. This necessitates a deeper scrutiny of the security practices of subcontractors and a demand for secure coding from all parties involved in the OT supply chain.
  • Addressing Legacy Systems: A significant challenge is the long operational lifespan of PLCs. Many devices susceptible to these vulnerabilities will remain in service for decades, with limited or no update capabilities. This necessitates compensating controls and robust network segmentation, although the research shows even these can be bypassed.
  • Shifting Accountability: Krotofil advocates for a shift in responsibility from solely the asset owner to include the asset vendor. Vendors, who design and produce these inherently vulnerable systems, should bear a greater share of the responsibility for their security posture.

Ultimately, the research serves as a wake-up call, urging defenders to move beyond perimeter security and basic functional checks to a deeper understanding of the internal architecture and potential exploitation vectors within their critical industrial assets.

Key Takeaways

  • Inherent PLC Design Flaws: Modern industrial controllers, particularly Siemens PLCs, possess fundamental software architecture design flaws, specifically in memory allocation, that create a unique and exploitable attack surface.
  • Stealthy Automated Reconnaissance: A novel technique allows attackers to enumerate all Standard Function Blocks (SFBs) used in a PLC's control logic by mapping unique "unused memory" patterns, providing unprecedented and undetectable process comprehension.
  • Undetectable Data Exfiltration and Manipulation: Utilizing legitimate read/write requests, attackers can exfiltrate sensitive cleartext data (e.g., passwords, emails) and manipulate control logic variables with high precision, all in an automated and stealthy manner.
  • Covert C2 Channel Establishment: The unused memory and legitimate read/write commands can be leveraged to establish undetectable Command and Control (C2) channels, bypassing industrial firewalls and network monitoring solutions by appearing as normal operational traffic.
  • Failure of Current Security Measures: Existing security certifications (IEC 62443) are insufficient, providing a false sense of security, and recommended security appliances often fail to detect these sophisticated, architectural-level attacks.
  • Urgent Need for Secure Design and Vendor Accountability: There is a critical need for engineers to be trained in secure software design principles and for vendors to take greater responsibility for the inherent security of their products, moving beyond "bad luck" responses to architectural vulnerabilities.

About the Speaker(s)

Marina Krotofil is an experienced pen tester and researcher specializing in industrial control systems (ICS). Her work focuses on reverse engineering, security analysis of Programmable Logic Controllers (PLCs), and exploiting software architecture design for offensive cyber-physical security. Krotofil's unique expertise lies in designing and executing physical damage scenarios, working backwards from desired physical effects to identify necessary exploits and asset compromises within critical infrastructure. She is a recognized voice in the field, having published academic papers and spoken at various conferences. Her personal background as a Ukrainian national also led to her involvement in investigations and incident response related to the devastating NotPetya cyberattack, giving her firsthand experience with the real-world impact of advanced supply chain operations.

Reviews

Dr. Zero (Offensive Security Researcher) — MUST SEE

This is masterclass OT vulnerability research. Krotofil didn't just find a bug; she weaponized Siemens' fundamental memory architecture choices to build a completely stealthy control-logic mapper and C2 channel.

Heather Calloway (CISO) — MUST SEE

Krotofil dismantles the illusion that OT network segmentation and compliance standards like IEC 62443 actually protect industrial controllers. It exposes a structural supply chain risk that your current OT monitoring tools are completely blind to. This is required viewing for any CISO with manufacturing or critical infrastructure in their portfolio.

→ Top-rated talks at Swiss Cyber Storm 2021

All talks from Swiss Cyber Storm 2021