Just lately found malicious packages on the npmjs.com registry named “solanacore,” “solana-login,” and “walletcore-gen” target Solana crypto builders with Home windows trojans and malware able to keylogging and delicate data exfiltration. Moreover, these packages abuse Slack net hooks and ImgBB APIs to switch collected data to exterior actors.
Not like beforehand found crypto-stealers that contained closely obfuscated code, nevertheless, there’s some oddity to those packages—they do not cover their intent or performance, and bear peculiarities alluding to their simplistic but mysterious nature.
Include Home windows PowerShell scripts and a trojan .exe
Tracked as sonatype-2025-000042, and analyzed by our safety researcher Adam Reynolds, the npm packages listed beneath had been detected by Sonatype’s automated malware detection system that powers groundbreaking choices just like the Sonatype Repository Firewall.
Data retrieved from npm-stat exhibits that these packages have, altogether been downloaded over 1,900 occasions.
These packages, all revealed this month by one npm user, are an identical of their construction, checklist of recordsdata, and code. Here is the file construction of a model of the “solanacore” bundle:
Fils comprise plaintext code with none difficult obfuscation or makes an attempt to ‘cover’ what these scripts are as much as. The “cross” folder additional has an empty “run.txt” file, and a misnomered “WebBrowser.exe” which is a trojan, according to VirusTotal. These recordsdata start execution as quickly because the packages are put in on a system, as a result of a postinstall command:
‘Intel Keyboard Driver’ is an easy PowerShell keylogging script
What’s fascinating right here is the sheer lack of effort on the writer’s half to disguise what these packages are doing. That is presumably a attempt at not elevating alarms—that’s, evade risk detection applied sciences which will set off alerts on seeing heavy obfuscation and evasive makes an attempt. Alternatively, akin to a development we have seen earlier than, these packages could be a throwaway means to check waters earlier than attackers roll out actual world payload within the wild.
For instance, the “intel_keyboard_driver.ps1” PowerShell script in these packages goals to log keystrokes, i.e. accumulate what a consumer is typing:
The collected keystrokes are saved to an “okay.txt” file generated regionally, on the fly:
Abuses Slack WebHooks to exfiltrate data
We noticed {that a} base64-encoded URL within the aforementioned keylogging script is a Slack web hook being abused to exfiltrate “okay.txt” (containing the logged keystrokes), a stark distinction from malicious packages which have to date abused Discord WebHooks and acquainted companies to add stolen data:
hxxps://hooks.slack[.]com/companies/T086XXXX/B086RTXXXXX/YYYYYYYY
‘Accessibly’ script takes screenshots
Equally, the “accessibility” PowerShell script takes screenshots on the system it’s working and makes use of ImgBB’s image upload API to exfiltrate data:
hxxps://api.imgbb[.]com/1/add?key=32XXXXXXXXXX^&expiration=604800^&identify=%USERDOMAIN%-$timestamp
Odd artifacts and strings like ‘LOCKBITAI’
The packages are laced with inexplicable strings and artifacts that depart a little bit of thriller as to the explanation behind their inclusion.
Recordsdata like “index.js,” “savepaste.js”, and “set up.js”, for instance, all use Discord WebHooks to exfiltrate data however repeatedly point out “LOCKBITAI” because the username to this webhook, referencing the infamous ransomware group, LockBit that has claimed duty for several high profile cyber attacks. Though, no credible indicators exist to ascertain a hyperlink between the LockBit group and these packages. Candidly, it is relatively troublesome to see a critical nefarious actor using such unsophisticated methods to conduct an actual world assault, making the connection unlikely:
We additional noticed recordsdata, equivalent to “pds.txt” containing, what seemed to be plaintext passwords harvested from a password administration or keychain-style instruments:
Some variations additionally embody screenshots from a Home windows system that exhibits contents of the “solana-login” bundle opened with Microsoft Visible Studio:
Regardless of the writer’s motivation behind these packages could also be, we suggest strictly in opposition to downloading these and, if executed so, suggest eradicating them fully. Any hosts that downloaded this bundle must be thought of compromised and remediated as applicable.
Open supply malware blocked by Sonatype Repository Firewall
This is not the primary time a stunt like this has been pulled. Simply final month, we found counterfeit ESLint packages downloaded thousands of times that abused Pastebin to retrieve stage 2 payload and execute subsequent assaults.
The incident serves yet one more reminder of risk actors’ evolving techniques and dedication to exploiting the open supply ecosystem for nefarious causes and highlights a urgent want for improved provide chain safety measures and larger vigilance in monitoring third-party software program registries. Builders and organizations should prioritize safety at each stage of the event course of to mitigate dangers related to third-party dependencies.
Malicious open supply is designed to evade typical software composition analysis (SCA) scanners. Nonetheless, customers of Sonatype Repository Firewall can relaxation straightforward figuring out that these packages would mechanically be blocked from reaching their improvement builds and hold their software development life cycle (SDLC) hygienic.
Should you’re not already protected with Sonatype, get in touch so we can show you Repository Firewall in action.