North Korean Hackers Exploit VS Code Auto-Run Tasks to Deploy StoatWaffle Malware

By Azhar Khan
North Korean Hackers Exploit VS Code Auto-Run Tasks to Deploy StoatWaffle Malware

A North Korean-linked threat actor known as WaterPlum, also referred to as Contagious Interview, has been identified targeting developers through a sophisticated malware campaign leveraging Visual Studio Code (VS Code) projects. The operation uses malicious project configurations to automatically execute code and deploy a Node.js-based malware known as StoatWaffle.

The campaign primarily targets developers and cryptocurrency professionals, combining social engineering with supply chain manipulation to gain access to sensitive systems and data.

Abuse of VS Code Auto-Run Tasks

The attack centers on the misuse of the tasks.json configuration file within VS Code projects. Normally used to automate development workflows, this file can define tasks that run automatically when a project is opened.

In this campaign, attackers craft malicious VS Code projects where the tasks.json file is configured to fetch and execute remote payloads without the user’s full awareness.

This technique allows attackers to trigger malware execution as soon as the victim opens the project, making it highly effective against unsuspecting developers.

Delivery of StoatWaffle Malware

The payload delivered through this mechanism is StoatWaffle, a Node.js-based malware capable of deploying multiple malicious components. Once executed, it can install:

  • A browser credential stealer targeting saved passwords and session data
  • A remote access trojan (RAT) enabling full system control

These capabilities allow attackers to harvest sensitive information and maintain persistent access to compromised systems.

Use of Malicious npm Packages and GitHub Repositories

The campaign also leverages compromised or malicious npm packages and GitHub repositories to distribute the infected VS Code projects. By embedding malware within seemingly legitimate development resources, attackers increase the likelihood of successful infection.

This approach reflects a broader trend of supply chain attacks targeting the software development ecosystem.

Developers who trust and reuse open-source code without thorough verification may inadvertently introduce malicious components into their environments.

Social Engineering Through Fake Interviews

WaterPlum uses social engineering tactics to lure victims into downloading and opening malicious projects. The attackers pose as recruiters and invite targets to participate in fake job interviews, often conducted through platforms such as LinkedIn.

Victims are provided with coding assignments or project files that appear legitimate but contain the malicious VS Code configurations.

This tactic is particularly effective against developers seeking new opportunities, as it exploits professional trust and curiosity.

Microsoft’s Response and Mitigations

In response to the campaign, Microsoft has introduced mitigations in VS Code versions 1.109 and 1.110 to reduce the risk associated with auto-run tasks. These updates aim to improve transparency and limit the automatic execution of potentially unsafe tasks.

Users are strongly encouraged to update their VS Code installations to the latest versions to benefit from these security enhancements.

Improved warnings and execution controls are expected to help users identify suspicious configurations before they are executed.

Risks to Developers and Organizations

The campaign poses significant risks to both individual developers and organizations. Compromised systems can lead to:

  • Theft of credentials and sensitive data
  • Unauthorized access to development environments
  • Insertion of malicious code into software projects
  • Compromise of cryptocurrency wallets and assets

Given the interconnected nature of development workflows, a single compromised system can have far-reaching consequences.

Preventive Measures

To protect against such attacks, developers and organizations should adopt secure practices when handling code and development tools.

  • Avoid opening untrusted VS Code projects or files from unknown sources
  • Review tasks.json and other configuration files before execution
  • Use trusted sources for npm packages and verify dependencies
  • Keep development tools and environments updated
  • Be cautious of unsolicited job offers or interview requests

Implementing these measures can significantly reduce the risk of compromise.

Neuracyb Intel's Assessment

The WaterPlum campaign demonstrates a highly targeted evolution of supply chain and social engineering attacks, focusing specifically on developers as high-value targets. By abusing legitimate development tools such as VS Code and combining them with recruitment-themed lures, attackers are effectively blending into trusted workflows.

The use of auto-run task configurations represents a subtle yet powerful technique that exploits developer convenience features for malicious purposes. This approach reduces user friction and increases the likelihood of successful execution.

As software development ecosystems continue to rely heavily on automation and third-party resources, securing these environments will be critical. Organizations must enforce stricter validation of external code and strengthen awareness among developers to defend against increasingly sophisticated threats.

Azhar Khan
Azhar Khan
Azhar is a seasoned Cybersecurity Professional with over 8 years of experience in Cybersecurity Research.