DevOps security firm JFrog has discovered malicious npm packages that appear to have been developed by malware authors to target rivals.
On February 22, JFrog cybersecurity researchers Andrey Polkovnychenko and Shachar Menashe said that 25 malicious Node Package Manager (npm) packages had recently been detected by the firm’s scanners, many of which are Discord token stealers.
If an attacker is able to steal tokens, they can be used to infiltrate a victim’s account and hijack Discord servers. They can also be valuable assets suitable for sale in underground, criminal markets.
“This masquerading is probably due to the fact that colors.js is still one of the most installed packages in npm,” JFrog says.
In addition, other packages were found including Python remote code injectors and environmental variable stealers.
While the reported packages were “quickly” removed by npm maintainers, one package, in particular, caught JFrog’s eye. Called “Lemaaa,” the npm package is a library “meant to be used by malicious threat actors to manipulate Discord accounts,” according to the researchers.
Lemaaa included utilities such as bot list functions, removing friends, password checks, grabbing backup codes, and also stealing billing information when a Discord token is supplied.
The module itself is obfuscated, which shouldn’t be a surprise considering its malicious purposes. However, after peeling apart Lemaaa’s code, the researchers found that the package had been trojanized to hijack the secret Discord tokens supplied to the library and transfer them to Lemaaa’s developer.
As npm is used by millions of developers worldwide, malicious npm package detection is set to continue – and potentially rise over time.
“We estimate this trend will only continue to increase, due to the fact that we are still seeing tens of new malicious packages that are flagged each day by our npm scanners,” the researchers say.
In December, JFrog uncovered 17 malicious npm packages also designed to steal Discord tokens. These packages were able to hijack account credentials, allowing attackers to take over a Discord server.
Previous and related coverage
Have a tip? Get in touch securely via WhatsApp | Signal at +447713 025 499, or over at Keybase: charlie0