GuardDog Software Identifies Malicious npm Packages Linked to North Korea

06 Aug 2024

In a recent analysis of package scanning within the Python Package Index (PyPi) and npm, GuardDog software has successfully identified two malicious packages associated with a North Korean threat actor group known as “Stressed Pungsan.” This cluster of activity exhibits strong ties to Microsoft’s MOONSTONE SLEET, indicating a sophisticated approach to supply chain attacks.

Malicious Packages Uncovered

The identified packages serve as initial access points for malware distribution, facilitating data exfiltration, credential theft, and lateral movement within compromised environments. On July 7, 2024, an npm user by the name of nagasiren978 uploaded two packages, harthat-hash and harthat-api, which were designed to download additional malware from a suspected North Korean command and control (C2) server.

This server is responsible for distributing malicious batch scripts, with a particular focus on Windows systems, aligning with the tactics employed by the MOONSTONE SLEET threat actor group. The two npm packages exhibit similar malicious behavior, utilizing a pre-install script that downloads a harmful DLL from a remote server, executes it via rundll32, and subsequently self-destructs.

Both packages share nearly identical structures, differing only by a unique identifier in the download URL. The harthat-api package masquerades as the legitimate Hardhat package, employing similar naming conventions to deceive users. Despite originating from the reputable node-config repository, the malicious package modifies the package.json file to eliminate the preinstall script and rename itself to config.

Additionally, the package includes two unexplained files, deference.js and pk.json, whose functions remain outside the scope of this analysis. The preinstall script is particularly insidious, downloading a DLL disguised as a temporary file, renaming it to “package.db,” and executing it through the “rundll32” system utility.

Evading Detection

This method, referred to as “System Binary Proxy Execution,” aims to evade detection by cleaning up after itself—deleting the downloaded DLL and restoring the original package.json file to obscure its malicious activities.

The Datadog Security Research team’s examination of the malicious DLL revealed a seemingly innocuous binary with no overtly harmful functionality. It exported two functions, one of which, GenerateKeyW, is anticipated to harbor malicious code. However, both static and dynamic analyses failed to reveal any self-modification or harmful behavior within the DLL.

The lack of discernible malicious code raises questions about the DLL’s purpose, suggesting it may be an incomplete version or a testing iteration, indicating that the threat actor could be experimenting with their operational infrastructure.

Indicators of Compromise

In a recent incident, threat actors managed to compromise targets through the malicious npm packages harthat-api-v1.3.1.zip and harthat-hash-v1.3.3.zip, which likely contained content designed to appear legitimate. The malicious payloads were traced back to the IP address 142.111.77.196. Potential indicators of compromise (IOCs) include the filenames Temp.b (also known as package.db) and its SHA256 hash, d2a74db6b9c900ad29a81432af72eee8ed4e22bf61055e7e8f7a5f1a33778277.

Top charts for Desktop

uTorrent

uTorrent

Latest update uTorrent download for free for Windows PC or Android mobile

5
1032 reviews
6448712
downloads
Zona

Zona

Latest update Zona download for free for Windows PC or Android mobile

4
614 reviews
1298408
downloads
WinRAR

WinRAR

Latest update WinRAR download for free for Windows PC or Android mobile

5
735 reviews
498825
downloads
Minecraft

Minecraft

Latest update Minecraft download for free for Windows PC or Android mobile

5
750 reviews
454624
downloads

News and reviews for Desktop

Finding Slavek's Purse in Mysteria Ecclesiae DLC

Discover how to locate Slavek's purse in the Mysteria Ecclesiae DLC, enhancing gameplay options.

Read more

Crafting a Plague Mask in Kingdom Come: Deliverance 2

Players can craft a plague mask in Kingdom Come: Deliverance 2 by collecting essential items near Sedletz Monastery.

Read more

Anno 117 Earns Top Rating on Metacritic

Anno 117 outperforms its predecessors in Metacritic scores for 2025 strategy games.

Read more

Windows 11 May Introduce Advanced Haptics for Mice and Trackpads

Microsoft's new 'haptic signals' in Windows 11 could enhance feedback for peripherals, offering a tactile buzz for various actions.

Read more

Arc Raiders Sells Over 4 Million Copies, Sets Player Record

Arc Raiders hits 4 million sales, breaks Steam player record. Nexon's biggest global launch.

Read more

Bethesda Adds Creations Bundle to Fallout 4 Amid Criticism

Bethesda's Creations Bundle for Fallout 4 faces issues: player reports of crashes and missing content.

Read more

Bungie Embraces 'Extraction Shooter' Label Despite Criticism

Bungie sticks with 'Extraction shooter' term for Marathon, despite criticism from former director Chris Sides over its clarity in distinguishing games.

Read more

Steam's Animal Fest 2025 Offers Unique PC Game Deals Until 2023-11-17

Animal Fest 2025 on Steam offers significant discounts on animal-themed PC games, running until 2023-11-17.

Read more

Arcane Trigger Offers Free Steam Demo with Unique Bullet System

Arcane Trigger, a retro wizard shooter by MiniWhale and Anotherindie, releases a free demo on Steam, featuring a unique bullet-building system.

Read more

PC Gamer's Top 2025 Reviews: Games That Made the Cut

PC Gamer reveals top games of 2025, highlighting scoring criteria and surprises in reviews.

Read more