Exploiting OPC-UA in Every Possible Way: Practical Attacks Against Modern OPC-UA Architectures
This talk demonstrates multiple exploitation techniques against the OPC-UA protocol, including heap-based buffer overflows and cross-site scripting (XSS) vulnerabilities. The researchers analyze various OPC-UA protocol stack implementations and server products to identify common flaws in memory management and string handling. The presentation highlights how these vulnerabilities can be chained to achieve remote code execution (RCE) on industrial control systems. The speakers also release an open-source OPC-UA exploitation framework to assist security professionals in testing their own environments.
Breaking Industrial Control Systems: Exploiting OPC-UA Implementations
TLDR: Researchers at Black Hat 2023 demonstrated that the OPC-UA protocol, a cornerstone of modern industrial automation, is riddled with memory corruption and injection vulnerabilities across multiple vendor implementations. By chaining heap-based buffer overflows and XSS, they achieved remote code execution on critical infrastructure components like PTC Kepware and Inductive Automation Ignition. Security professionals should audit their OT environments for these specific protocol stack flaws and apply the newly released OPC-UA exploitation framework to validate their own defenses.
Industrial control systems are often treated as black boxes, but the reality is that they run on the same flawed code patterns as any other software. The recent research presented at Black Hat 2023 on the OPC-UA protocol proves that the "air-gapped" myth is dead. When you look at the protocol stacks powering major platforms like PTC Kepware and Inductive Automation Ignition, you find the same old memory management sins that have plagued web applications for decades.
The Anatomy of the OPC-UA Attack Surface
OPC-UA is designed to be a universal, platform-independent standard for industrial data exchange. However, this complexity is its greatest weakness. The protocol relies on a series of specifications that are often implemented by vendors using custom, proprietary code built on top of aging C/C++ libraries.
The researchers focused on the protocol's handling of "chunks." OPC-UA supports message chunking to manage large data transfers. The vulnerability lies in how these chunks are reassembled. By sending a series of incomplete chunks—specifically, by omitting the final chunk flag—an attacker can force the server to continue allocating memory indefinitely. Because many implementations lack proper bounds checking or resource limits, this leads to a heap-based buffer overflow.
This is not just a theoretical DoS. By manipulating the heap, an attacker can overwrite adjacent memory structures. In the case of CVE-2022-1748, the researchers demonstrated how to trigger a null pointer dereference that, when combined with heap grooming, allows for precise control over the execution flow.
From Memory Corruption to Remote Code Execution
Achieving RCE in an OT environment requires more than just a crash. The researchers showed that by leaking pointers from the heap, they could defeat Address Space Layout Randomization (ASLR). Once the memory layout is known, constructing a ROP chain becomes trivial.
The most impressive part of the research was the pivot to web-based clients. Many modern industrial dashboards are just web interfaces that act as OPC-UA clients. If an attacker can compromise the OPC-UA server, they can inject malicious payloads into the data stream. When the web client reads this data, it renders the payload directly into the Document Object Model (DOM). This is a classic OWASP A03:2021-Injection scenario, but applied to industrial data tags.
For example, by injecting a script tag into a tag name field, the researchers executed arbitrary JavaScript in the context of the client's browser. From there, they could interact with the server's API to upload malicious project files. In the case of Inductive Automation Ignition, this meant uploading a Python script that executes on the server whenever a scheduled event triggers.
Testing Your Own Infrastructure
If you are a pentester or a researcher, you need to stop treating these systems as untouchable. The OPC-UA exploitation framework released by the team is the perfect starting point. It includes 12 out-of-the-box exploits that cover the vulnerabilities discussed in the talk.
When testing these systems, focus on the reassembly logic. Use boofuzz to stress-test the protocol implementation. If you find that a server continues to consume memory while you send incomplete message chunks, you have found a potential DoS vector. If you are testing a web-based client, look for any field that reflects data from the OPC-UA server back to the user interface. If that data isn't sanitized, you have an XSS vector that can be chained into full system compromise.
Defensive Hardening
Defending against these attacks requires a shift in how we view OT security. You cannot rely on perimeter defenses alone.
- Patch Management: Ensure that your OPC-UA servers are updated to the latest versions. The researchers worked closely with vendors to patch these issues, and many of the vulnerabilities, such as CVE-2023-38121, have been addressed.
- Input Validation: If you are a developer, treat all data coming from the OPC-UA protocol as untrusted. Sanitize all strings before rendering them in a web interface.
- Network Segmentation: Limit the exposure of your OPC-UA servers. They should never be directly accessible from the internet, and access within the internal network should be strictly controlled via firewalls.
The era of "security through obscurity" in industrial systems is over. These protocols are now as exposed as any web service, and the tools to break them are becoming increasingly accessible. Start testing your systems now, before someone else does.
CVEs
Vulnerability Classes
Target Technologies
Attack Techniques
OWASP Categories
All Tags
Up Next From This Conference

Chained to Hit: Discovering New Vectors to Gain Remote and Root Access in SAP Enterprise Software

Zero-Touch-Pwn: Abusing Zoom's Zero Touch Provisioning for Remote Attacks on Desk Phones

ODDFuzz: Hunting Java Deserialization Gadget Chains via Structure-Aware Directed Greybox Fuzzing
Similar Talks

Kill List: Hacking an Assassination Site on the Dark Web

Firewalls Under Fire: China's Ongoing Campaign to Compromise Network Protection Devices

