Third-Party Logic_When You Run Code You've Never Seen

 

By Muhammad Ali Khan ICS/ OT Cybersecurity Specialist — AAISM | CISSP | CISA | CISM | CEH | ISO27001 LI | CHFI | CGEIT | CDCP

                       Code You’ve Never Seen

At some point on every plant floor, an uncomfortable truth gets quietly accepted:

“You are running code you’ve never seen, never reviewed, and don’t fully control.”

And in OT and ICS environments, that is a daily operational reality.

From OEM-supplied PLC blocks to vendor remote support tools, from safety logic libraries to AI-driven optimization modules, third-party logic is deeply embedded into modern industrial systems. It often arrives wrapped in trust, urgency, or contractual obligation. And once deployed, it tends to stay there for years, untouched, unquestioned, and largely invisible.

That’s where the danger begins.

The Hidden Reality of Third-Party Logic

Unlike IT software, third-party logic in OT is rarely transparent. Vendors routinely deliver compiled function blocks, encrypted ladder logic, or “black box” firmware updates that operators are discouraged, or contractually prohibited, from inspecting. As a result, asset owners end up executing logic whose behavior they infer rather than understand.

Because of this, trust quietly replaces verification. The logic works, the process runs, and production targets are met, so nobody asks what else the code might be doing. However, operational success does not equal security assurance. In fact, in ICS environments, reliability often masks risk rather than eliminating it.

Why This Problem Is Unique to OT and ICS

In IT environments, running third-party code is expected, but it’s surrounded by layers of visibility: source reviews, sandboxing, EDR, patch cycles, and rapid rollback. In OT, the situation is fundamentally different.

To begin with, availability outweighs inspection. Plant teams are trained to avoid touching working systems, which means third-party logic often remains frozen in time. Additionally, many controllers lack native logging or runtime visibility, making it difficult to observe what logic is actually doing during execution.

Furthermore, third-party logic often interacts directly with physical processes. This means a logic flaw is not only a cyber issue, it can translate into unsafe states, equipment damage, or environmental harm. In OT, software behavior has kinetic consequences.

How Third-Party Logic Becomes a Silent Attack Surface

Because third-party logic is trusted by default, it often bypasses traditional security scrutiny. Vendors are given broad access privileges, remote connectivity is left enabled, and logic updates are applied without independent validation.

As a result, several risks quietly accumulate.

First, malicious intent becomes hard to detect. A logic block that subtly alters thresholds, delays alarms, or suppresses fault conditions can blend seamlessly into normal operations. Second, unintentional vulnerabilities persist. Poorly written logic, hardcoded credentials, or insecure communication routines can sit unnoticed for years. And third, supply chain compromise becomes invisible. If a vendor’s development environment is breached, compromised logic can enter your plant without triggering any alarms.

Each of these risks exists not because teams are careless, but because the environment was never designed for transparency.

The Contractual Trap of “Vendor Intellectual Property”

One of the most overlooked aspects of this issue is legal rather than technical. Many vendors classify control logic as intellectual property, restricting access to source code or even detailed documentation. This places asset owners in a paradoxical position: they are responsible for the safety and security of systems they are not allowed to fully inspect.

Consequently, cybersecurity governance stops at the vendor boundary. Risk assessments exclude logic internals. Incident response plans assume vendor availability. And security accountability becomes blurred between ownership and authorship.

In practice, this means you are accountable for outcomes, but dependent on third parties for understanding causes.

                                            Cybersecurity threat in industrial control room

Why Traditional Security Controls Don’t Solve This

It’s tempting to assume that firewalls, network segmentation, and access controls are enough. While they are essential, they do nothing to address the logic itself. Once third-party code is running inside a PLC, safety controller, or industrial application, perimeter controls are irrelevant.

Similarly, vulnerability scanning and patch management fall short. You can scan the device, but not the logic. You can patch the firmware, but not the hidden behavior embedded in function blocks. Without logic-level visibility, security remains superficial.

Therefore, the real risk is authorized execution of unverified behavior.

Building Visibility Without Breaking Operations

The solution is not to ban third-party logic; that’s unrealistic. Modern industrial systems depend on vendor expertise and prebuilt functionality. Instead, the goal must be controlled trust.

This begins with architectural visibility. Asset inventories should include not just devices, but logic ownership: who wrote it, who maintains it, and when it was last reviewed. Change management must extend to logic updates, even when provided by vendors.

In addition, behavioral monitoring becomes critical. Instead of trying to read every line of code, organizations should focus on understanding expected behavior and detecting deviations at runtime. Process-aware anomaly detection, logic checksum validation, and configuration baselining provide practical ways to gain assurance without disrupting operations.

Equally important is contractual evolution. Security review rights, incident disclosure requirements, and update transparency must be embedded into vendor agreements. Trust should be formalized, not assumed.

The Mindset Shift OT Needs

Ultimately, the biggest change is cultural. OT teams must move from “it works, don’t touch it” to “it works, but do we understand it?” Security teams, in turn, must respect operational constraints while pushing for deeper assurance.

Third-party logic is not inherently dangerous. What makes it risky is invisibility combined with permanence. When code runs for a decade without review, it becomes infrastructure, and infrastructure is hard to question.

Final Thought

Every PLC cycle executes instructions that shape physical reality. When those instructions come from sources you’ve never seen, you are operating on borrowed trust.

In modern OT and ICS environments, cybersecurity is no longer just about keeping attackers out. It’s about knowing what you’ve already let in.

And the most dangerous code is not the one that crashes systems, it’s the one that runs perfectly, silently, and unquestioned.


Comments

Popular posts from this blog

Agentic AI as a New Failure Mode in ICS/OT

Agentic AI vs ICS & OT Cybersecurity

Are You Ready for the 2026 OT Cyber Compliance Wave?