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
7508540
downloads
Zona

Zona

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

4
614 reviews
1735143
downloads
WinRAR

WinRAR

Streamline file management with fast compression, secure your documents, and save space.

5
735 reviews
746683
downloads
Minecraft

Minecraft

Shape environments, explore vast worlds, and survive against monsters with endless creativity.

5
750 reviews
495098
downloads

News and reviews for Desktop

Visio 2021 Professional Now $9.97 Until February 8

Microsoft offers Visio 2021 Professional for $9.97, down from $249, with added templates, until February 8.

Read more

Code Vein Offers Stylish Combat, Discounted Editions

Code Vein captivates with anime-style combat and offers discounted editions. Fast-paced action meets fun builds in this cult classic.

Read more

Microsoft Phases Out RC4 in Kerberos for Windows Security

Microsoft to eliminate RC4 in Kerberos by July 2026, enhancing Windows security.

Read more

Highguard Faces Criticism but Shows Potential for Growth

Highguard, launched with controversy, holds potential despite poor reviews. Offering genre innovation, it aims to evolve against negative feedback.

Read more

PS2Recomp Boosts Native PS2 Games with Recompilation

PS2Recomp, a new tool, promises enhanced native PS2 game ports, sparking interest among developers for PC platforms.

Read more

NVIDIA Introduces RTX Remix Logic for Classic Game Mods

NVIDIA's RTX Remix Logic, launched on 2026-01-27, enables dynamic modding of classic PC games with a no-code node-based interface.

Read more

Windows 11 Update KB5074109 Affects Legacy Modems

The Windows 11 update KB5074109 disrupts modems by removing several legacy drivers, causing connectivity issues for select users.

Read more

Anytype Replaces Notion, Obsidian, and Todoist for Unified Workflow

Anytype consolidates Notion, Obsidian, and Todoist functions, reducing context-switching and improving workflow efficiency.

Read more

ReBlade: Cyberpunk Roguelike Announced by ChillyRoom

ReBlade from ChillyRoom and Spiral Up Games announced for PC: cyberpunk roguelike offers high-speed action in a dystopian setting.

Read more

Artorias Battles Elden Ring Bosses in New Video Showcase

Artorias from Dark Souls faces Elden Ring bosses, demonstrating impressive skills in Fights' YouTube video.

Read more