Sonatype says that once installed, discord.dll will run malicious code to search a developer's computer for certain applications and then retrieve their internal LevelDB databases.
Targeted apps include browsers like Google Chrome, Brave, Opera, and the Yandex Browser, but also the Discord instant messaging app, popular today with most online gamers.
The files the malware retrieves are LevelDB databases, which the aforementioned apps use to store information such as browsing histories and various access tokens.
Discord.dll would read the files and attempt to post their content in a Discord channel (as a Discord webhook).
Links to another malicious npm package
Sonatype said that after a review, it found that the malicious code was an improved version of a malicious library it saw in August. Named fallguys, this library, too, was collecting the same information, although in a less complicated manner.
Sonatype, a company that monitors public package repositories as part of its developer security operations (DevSecOps) services, said discord.dll was published more than five months ago and has been downloaded more than 100 times.
In contrast, despite being available on the npm portal for only two weeks, the fallguys package was downloaded more than 300 times.
The reason for the success of the first package can be linked to the fact that fallguys contained a README file advertising the library as an interface to the "Fall Guys: Ultimate Knockout" game API. On the other hand, the discord.dll package contained an empty README, suggesting that the project was either abandoned or never "officially" launched by its creator.
Other suspicious npm packages detected
The discord.dll package is still available on the npm portal, but Sonatype said it already notified the npm security team, and the package will most likely be removed in the coming days.
Since the EXE files could not be retrieved, researchers were unable to fully confirm the nature of the three libraries, named discord.app (88 downloads), ac-addon (46 downloads), and wsbd.js (38 downloads).
What's in a name? These DevOps tools come with strange backstories