Time-Delayed Destructive Payloads in Malicious NuGet Packages Threaten Industrial Control Systems

Socket’s Threat Research Team has uncovered nine malicious NuGet packages designed to deliver time-delayed destructive payloads, posing a severe threat to .NET developers and industrial control systems (ICS).

Published under the alias shanhai666 between 2023 and 2024, these packages weaponize legitimate patterns, such as repository and unit-of-work implementations, to hide sabotage code that can randomly terminate applications or corrupt operations years after deployment.

Time-Triggered Sabotage Hidden in Legitimate Code

Each malicious package embeds roughly 20 lines of destructive logic within thousands of lines of genuine functionality 99% of the code works as advertised, including ORM mapping, async queries, and logging.

However, after preset trigger dates August 8, 2027, and November 29, 2028, the code introduces a 20% probability of calling Process.GetCurrentProcess().Kill() during database queries.

This means applications can abruptly terminate at random once the trigger date passes, appearing as transient software or hardware faults rather than systematic compromise.

The most dangerous variant, Sharp7Extend, targets Siemens S7 PLC communication systems used across manufacturing facilities. Unlike the database-related payloads, Sharp7Extend activates immediately upon installation and remains active until June 6, 2028.

It not only randomly terminates PLC processes but also silently sabotages write operations after a 30–90-minute delay, returning zero instead of the actual results 80% of the time.

This stealthy effect can turn off actuators, halt safety systems, and disrupt production while operators see no visible errors.

Typosquatting and AI Evasion Tactics

The attacker published 12 packages in total, mixing nine malicious ones with three genuine libraries to create a veneer of legitimacy. Sharp7Extend, for example, typosquats the trusted Sharp7 library, bundling the legitimate PLC code within its payload.

shanhai666 NuGet profile showing legitimate and benign packages
shanhai666 NuGet profile showing legitimate and benign packages

This made the package appear fully functional in testing environments. Additionally, the threat actor used inconsistent author metadata and forged Microsoft code-signing certificates to evade automated detection on NuGet.

Socket’s analysis found Chinese-language strings (“出现异常”, “连接失败”) embedded in the binaries, suggesting a likely Chinese origin. The alias shanhai666 derived from “山海” (mountains and seas) and Chinese internet slang further reinforces this attribution.

Long-Term Supply Chain Risk

With nearly 9,500 downloads, the campaign’s delayed activation strategy makes detection and attribution almost impossible. Developers who imported these dependencies in 2024 may not experience failures until years later.

Organizations are advised to audit projects for the listed packages immediately, monitor PLC communications for silent write failures, and implement dependency verification tools such as the Socket GitHub App and CLI to block time-based or probabilistic behaviors before integration.

Indicators of Compromise (IOCs)

Malicious Packages:

Find this Story Interesting! Follow us on Google News , LinkedIn and X to Get More Instant Updates

Priya
Priya
Priya is a Security Reporter who tracks malware campaigns, exploit kits, and ransomware operations. Her reporting highlights technical indicators and attack patterns that matter to defenders

Trending News

Related Stories