The Mailman Always Rings Twice (at the Supply Chain’s Door)
- Javier Conejo del Cerro
- 11 nov
- 3 Min. de lectura

A suspicious package arrives at the developer’s doorstep — not by courier, but through the dependency ecosystem. A NuGet supply-chain intrusion targeting industrial control systems silently delivers nine malicious packages published under shanhai666 (~9,488 downloads), embedding time-based sabotage and probabilistic corruption inside otherwise legitimate C# code. The result: industrial logic decay and database integrity collapse, triggered not by a single attack event, but by normal system operation over time.
Phase 1 — The Disguised Package
The intrusion begins with typosquatted NuGet packages, strategically named to appear as natural extensions of widely used ICS and database connectors. The most notable among them, Sharp7Extend, presents itself as a convenient wrapper for Siemens S7 PLC communications — a common need in OT/IT-integrated environments.
But inside, the attacker preserves the real Sharp7 library and grafts malicious extension methods directly into two high-frequency operational chokepoints:
.Exec() in database drivers
.BeginTran() in PLC transaction handlers
This ensures the payload is executed during normal workloads, not during installation. No exploit chain, no shellcode, no lateral movement — just invisible code paths living where developers least expect to look.
Phase 2 — Silent Timing & Probabilistic Sabotage
Once the malicious package is in place, the sabotage does not trigger immediately.
Some variants contain time-delayed activation scheduled for 2027–2028, blending into long-lived industrial infrastructure lifecycles where packages remain untouched for years.
Two distinct sabotage modes emerge:
Delayed Failure Mode (2027–2028) ~20% random process termination per operation, triggered probabilistically to simulate natural instability.
Immediate Failure + Corruption Mode (Sharp7Extend)
Immediate probabilistic crashes during operations
Followed by an ~80% silent PLC write-corruption phase
The second phase is the most dangerous. PLC logic is not just disrupted — it is quietly rewritten. Commands execute, but their meaning is altered.
This shifts the failure mode from “system goes down” to “system operates unpredictably.”
Phase 3 — Cascading Operational Impact
Once corruption begins, the system sabotages itself:
Database writes degrade → records become unreliable
PLC commands mutate → machinery behavior becomes unsafe
Transaction logs lose coherence → integrity verification becomes impossible
Control loops destabilize → safety assumptions collapse
The operational impact is not localized — it propagates:
A plant no longer fails cleanly — it fails while appearing operational.
This is the worst-case failure model in ICS and OT environments:
corruption without visibility.
This campaign is not just another dependency hijack. It is a deliberately engineered operational failure mechanism designed for long-term embedded disruption — the kind that surfaces only when industrial processes are under real load, years after the initial compromise.
The attacker is not trying to break into systems.
They are waiting for systems to break themselves.
And when the mailman rings the second time — it’s already too late.
Measures to Fend Off
Audit and remove the nine shanhai666 packages immediately.
Block unverified NuGet packages across CI/CD and developer endpoints.
Enforce Software Composition Analysis (SCA) and provenance controls.
Perform DB/PLC integrity verification: compare logic, mapping, and ladder sequences.
Isolate affected hosts for forensic baseline comparison.
Configure EDR/XDR to detect:
Probabilistic crash patterns
Repeated transaction failures
Silent write-modification signals
This campaign is not about immediate compromise — it is about embedding failure into the operational fabric itself. By hiding malicious logic inside trusted libraries and triggering it only under real workload conditions — or even years later — the attackers shift the point of failure from intrusion to routine execution. The system doesn’t break because someone attacks it; it breaks because it continues to function. This is the defining danger of supply-chain attacks in industrial environments: once the code is inside the process layer, sabotage becomes indistinguishable from normal operations, and disruption becomes a matter of time, not detection.
GB Hackers




Comentarios