Skip to content

Malicious npm packages sneakily employ Ethereum blockchain for unlawful software distribution

Malicious GitHub repository initiates an attack chain by embedding Ethereum smart contracts imbuing URLs that lead to additional malware components.

Dangerous npm packages secretly distribute malware through Ethereum blockchain
Dangerous npm packages secretly distribute malware through Ethereum blockchain

Malicious npm packages sneakily employ Ethereum blockchain for unlawful software distribution

In a recent cybersecurity incident, hackers have been found to use rogue GitHub repositories and npm packages to deliver malware payloads via Ethereum smart contracts.

The attackers concealed malicious command-and-control URLs on the Ethereum blockchain by using npm packages named "colortoolsv2" and "mimelib2". This novel approach allowed them to evade security scans, making it difficult for victims to identify the malicious activity.

Researchers from ReversingLabs have written a report on the attack, which suggests that the attacks likely targeted users and developers from the cryptocurrency space. Last year, ReversingLabs detected 32 similar attack campaigns involving malicious code uploaded to open-source repositories targeting cryptocurrency-related developers and users.

The rogue npm packages contained code that connected to the Ethereum blockchain to obtain URLs from Ethereum smart contracts for downloading malware payloads. The packages were part of a larger coordinated campaign to trick users into running code from fake GitHub repositories.

The fake GitHub repositories were crafted to look legitimate, with fake contributors, commits, and stars. One such repository, 'solana-trading-bot-v2', associated with the campaign, was removed. The majority of GitHub repository commits involved modifying the project's LICENSE file.

The few legitimate commits in the GitHub repository were changes to download and execute the rogue npm packages as dependencies. The infrastructure for automated commit pushing was set up by the malicious actor. The attackers used two rogue npm packages called 'Package1' and 'Package2' for malware delivery in July.

The Ethereum smart contracts were used to automatically execute malicious code when certain conditions were met. The packages contained only the files needed to implement the malicious functionality. The use of Ethereum smart contracts was likely to evade security tools.

Researchers advise developers to assess each library before including it in their development cycle, looking beyond raw numbers to assess the authenticity of the package and its maintainers. This includes checking the package's history, contributors, and the purpose of the library.

As the attackers are likely to set up new rogue npm packages and GitHub repositories, it is crucial for developers to remain vigilant and practise good security hygiene. This includes keeping software up-to-date, using reputable sources for dependencies, and regularly scanning systems for malware.

Read also:

Latest

Study reveals that legislation enabling parents to remove children from religious education classes...

Contestation of a law permitting parental withdrawal of children from Religious Education instruction, based on a study conducted among school principals, calls for its revocation

Law advocating parental removal of children from religious education should be repealed, assert school leaders in a comprehensive study across England. These educators, including heads of religious education, argue that instances where parents selectively withdraw their children in protest...