Self-Replicating Malware Compromises Open Source Software and Wipes Machines in Iran

A new self-replicating malware is compromising open source software and destroying machines in Iran. Software companies must check their networks for infections.

Self-Replicating Malware Compromises Open Source Software and Wipes Machines in Iran
Graphic representation of a cyberattack that compromises open source software and destroys machines in Iran.

A new hacking group known as TeamPCP has launched an ongoing campaign using a self-replicating malware never seen before, which compromises open source software and, oddly, destroys machines located in Iran. This attack poses a significant threat to software development companies, which urgently need to check their networks for possible infections.

The Emerging Threat: TeamPCP and the Self-Replicating Malware

TeamPCP gained visibility in December, when researchers at the security firm Flare observed the group launching a worm that targeted poorly secured cloud platforms. The goal was to build a distributed infrastructure to compromise servers, exfiltrate data, deploy ransomware, extort money and mine cryptocurrency. The group is known for its skill at large-scale automation and for combining well-known attack techniques.

Trivy Compromise and the Spread of the Malware

Recently, TeamPCP compromised practically every version of the Trivy vulnerability scanner in a supply chain attack, gaining privileged access to the GitHub account of Aqua Security, the creator of Trivy. The group then spread a powerful self-replicating malware known as CanisterWorm, which propagates automatically to new machines without any user interaction. After infecting a machine, the malware searches for access tokens for the npm registry and compromises any publishable packages it finds, creating a new version with malicious code. In under 60 seconds, the worm targeted 28 packages.

Innovative Control Mechanism: The Use of ICP Canisters

The worm is controlled by an unusual mechanism designed to be tamper-proof. It uses a canister based on the Internet Computer protocol, a form of self-executing smart contract designed to be impossible for third parties to take down or alter. The canister can point to constantly changing URLs for servers hosting malicious binaries, allowing the attackers to change the URLs at any time. Infected machines connect to the canister every 50 minutes.

Additional Payload: The Wiper That Targets Iran

In a recent development, the worm was updated to include an additional payload: a wiper that targets only machines in Iran. When the worm infects a machine, it checks whether the machine is in the Iran time zone or is configured for use in that country. If so, the malware does not trigger credential theft but instead activates a wiper called Kamikaze. This wiper is designed to destroy data on infected machines, including Kubernetes clusters and virtual machines, with no clear motive apparent to the attackers. Although there is no indication that the worm has caused actual damage to machines in Iran, there is a clear potential for large-scale impact if it spreads actively.

Implications for Software Development Companies

The spread of self-replicating malware such as CanisterWorm poses a significant threat to software development companies. The compromise of widely used open source tools, such as Trivy, underlines the need for constant vigilance and robust security measures. Companies must implement strict security controls, actively monitor their networks for suspicious activity and make sure all the tools and libraries they use are up to date and free of known vulnerabilities. It is also essential to train development teams on security best practices and on handling credentials safely to prevent future compromises.

Conclusion

The case of TeamPCP and the CanisterWorm malware highlights the evolution of cyber threats and the importance of a proactive security posture. Software development companies must be aware of the risks associated with using open source software and take appropriate measures to protect their infrastructure and sensitive data. Collaboration between developer communities, security researchers and companies is essential to tackle these emerging threats effectively.

  • Continuous monitoring: Implement monitoring systems to detect suspicious activity and respond promptly to potential threats.
  • Regular updates: Keep all tools and libraries up to date to reduce the risk of known vulnerabilities.
  • Staff training: Educate development teams on security best practices and on the safe handling of credentials.
  • Collaboration: Work together with the security community to share information and resources to counter emerging threats.
  • Risk assessment: Conduct regular risk assessments to identify and mitigate potential vulnerabilities in infrastructure and business processes.