Security researchers at Jamf Threat Labs have uncovered a new attack campaign linked to North Korean state-sponsored hacking groups. The attackers are targeting macOS software developers by abusing malicious Visual Studio Code (VS Code) project files shared through trusted code repositories.

How This Campaign Is Different

This campaign is an evolution of earlier North Korean operations such as Operation Dream Job, Contagious Interview, ClickFix Interview, and DeceptiveDevelopment. Previous attacks often relied on web-based tricks like HTML smuggling or fake browser prompts.
In contrast, this new approach targets developers directly by abusing the built-in trust and automation features of modern development tools, especially VS Code.

Initial Attack Method

The attackers pose as recruiters or hiring managers and contact developers with fake job offers. Victims are asked to complete coding assignments or technical tests that appear legitimate. These projects are hosted on well-known platforms like GitHub and GitLab, making them look safe and familiar.

Inside these repositories are hidden malicious files, mainly VS Code workspace configuration files such as .vscode/tasks.json. These files contain heavily obfuscated JavaScript designed to hide its real purpose and avoid detection by security tools.

How the Attack Executes

  1. A developer clones or opens the project in Visual Studio Code.
  2. VS Code asks whether the project should be trusted, as part of its normal security model.
  3. If the developer approves the trust request, VS Code allows predefined tasks in the project to run.
  4. The malicious task runs shell commands on macOS without further warning.

The initial command downloads additional malicious JavaScript from attacker-controlled servers using tools like curl. This code is run directly through Node.js without being saved to disk, making it harder to detect and remove. The malware continues running even after VS Code is closed.

What the Malware Does

Jamf’s analysis shows that the malware has advanced backdoor features:

Persistence – the malware installs itself using macOS LaunchAgents or LaunchDaemons, allowing it to restart automatically after a reboot.

System Information Collection – it gathers detailed information about the infected system, including:

  • macOS version and kernel details
  • Hardware and hostname information
  • Network data such as MAC addresses
  • External IP address using online services or STUN servers

Command-and-Control Communication – the malware connects to remote servers controlled by the attackers using encrypted connections. It regularly sends system data and waits for further instructions.

Remote Code Execution – attackers can send new JavaScript code to the infected system and execute it on demand. This allows them to run commands, install new tools, or expand the malware’s functionality at any time.

Modular Design – the malware can download additional code modules in stages. Some of these modules appear to be partially generated or assisted by AI coding tools. Each module runs in separate processes, which helps the attackers stay hidden and reduce the risk of detection.

Security Recommendations for Developers

Defense recommendations against packed malwareTo reduce the risk of these attacks, developers and organizations should take a cautious and disciplined approach when working with external code. This includes carefully reviewing Visual Studio Code workspace configuration files such as .vscode/tasks.json, .vscode/settings.json, and .vscode/launch.json before trusting a project, and avoiding the automatic execution of tasks from unknown or unverified repositories. Untrusted projects should be evaluated in isolated or virtualized environments to limit potential impact. Development systems should be protected with endpoint security solutions that focus on detecting suspicious behavior rather than relying solely on known malware signatures, and teams should actively monitor outbound network traffic for unusual or unauthorized connections. In addition, developers should verify the authenticity and reputation of repositories before cloning or opening them and remain aware of evolving attack techniques that specifically target software developers and the software supply chain.

References: