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:
- Understanding Hemorrhagic Gastroenteritis: Key Facts
- Stopping Osteoporosis Treatment: Timeline Considerations
- Trump's Policies: Tariffs, AI, Surveillance, and Possible Martial Law
- Expanded Community Health Involvement by CK Birla Hospitals, Jaipur, Maintained Through Consistent Outreach Programs Across Rajasthan