Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

URL has been copied successfully!
URL has been copied successfully!
Malicious npm packages found to create a backdoor in legitimate code
URL has been copied successfully!

Collecting Cyber-News from over 60 sources

Malicious npm packages found to create a backdoor in legitimate code

Attackers open a reverse shell: This payload is a reverse shell that uses the ssh2 client functionality from the original ethers-provider2 to establish an SSH connection to an attacker-controlled server. The ethers-provider2 ssh client code is modified to listen to certain messages from the server and turn into a reverse shell, meaning the server can send commands to the client in order for them to be executed locally on the victim machine that is acting as a remote shell for the attackers.The ethers-providerz package is very similar to ethers-provider2, but earlier versions reveal the attackers experimented with different approaches until landing on the current implementation. For example, in that version the attackers tried to patch files from a package called @ethersproject/providers.Also, the additional file loader.js that contains the download code for the third-stage payload is created in the node_modules folder, where usually all npm packages reside. The interesting part is that there is a legitimate npm package called loader.js that has over 24 million downloads and 5,200 dependent applications. If this package is already present locally, the malware will patch it. If it’s not, it will impersonate it.”While not as common as infostealers on the npm platform, downloaders are far from uncommon and are frequently encountered,” the ReversingLabs researchers said. “However, this downloader is notable because of the exceptional strategies employed by the attackers to hide the malicious payload it delivered. These evasive techniques were more thorough and effective than we have observed in npm-based downloaders before.”

Detection and mitigation: The problem is if the ethers-providerz and ethers-provider2 packages are removed, the malicious functionality they injected into the legitimate ethers package would still remain. Because of this, the ReversingLabs researchers created a YARA scanning rule that can help security teams and developers check if the locally installed instance of the ethers package has malicious code injected into it.Moreover, after completing their initial research, additional packages have been found that were likely connected to the same malicious campaign: reproduction-hardhat and @theoretical123/providers. While all of these packages have been removed from npm, they need to be removed from local installations as well if they were ever deployed.The ReversingLabs team has published a list of indicators of compromise, such as file hashes for the different versions of these malicious packages, which can help security teams create scanning rules.

First seen on csoonline.com

Jump to article: www.csoonline.com/article/3855530/malicious-npm-packages-found-to-create-a-backdoor-in-legitimate-code.html

Loading

Share via Email
Share on Facebook
Tweet on X (Twitter)
Share on Whatsapp
Share on LinkedIn
Share on Xing
Copy link