Ethereum private key stealer on PyPI downloaded over 1,000 times



The Mysterious ‘set-utils’ Package

Imagine downloading a cool new tool for your Python projects, only to discover it’s secretly stealing your Ethereum private keys! That’s exactly what happened with a Python Package Index (PyPI) package called “set-utils.” This sneaky package was swiping Ethereum keys by sneaking into wallet creation functions, then sending the stolen data through the Polygon blockchain. But how did it manage to go unnoticed, and who exactly was in danger?



What is ‘set-utils’?

‘Set-utils’ pretended to be a helpful Python utility. It mimicked well-known packages like “python-utils,” which boasts over 712 million downloads, and “utils,” with more than 23.5 million installs. By doing this, it tricked many people into thinking it was just another useful tool. However, it had a hidden agenda.

Discovery by Socket Researchers

Thanks to the keen eyes of researchers from the cybersecurity platform Socket, this malicious package was discovered. They reported that ‘set-utils’ was downloaded over a thousand times since being uploaded to PyPI on January 29, 2025. Even though a thousand might not sound like a lot, if each download was used to create a wallet, that’s potentially thousands of compromised wallets!

The malicious package on PyPIThe malicious package on PyPI
Source: Socket

See also  Crypto-Stealing Python Pack Distributed via StackExchange

Who Was at Risk?

This malicious package mainly targeted blockchain developers, particularly those using ‘eth-account’ for creating and managing wallets. It also aimed at Python-based DeFi projects, Web3 apps that support Ethereum, and personal wallets that use Python automation. Essentially, if you were involved in any of these areas and used ‘set-utils,’ you were in danger of having your Ethereum keys stolen.

How ‘set-utils’ Stole Ethereum Keys

The Sneaky Stealing Method

The package was really clever in how it stole Ethereum keys. It embedded the attacker’s RSA public key—this is a special type of encryption key—used for encrypting the stolen data. It also had an Ethereum sender account that the attacker controlled. When you created a wallet using standard functions like ‘from_key()’ or ‘from_mnemonic(),’ ‘set-utils’ would intercept and steal the private keys right from under your nose.

Exfiltrating the Data

Once the package had the private keys, it encrypted them and stuck them into the data field of an Ethereum transaction. This transaction was then sent to the attacker’s account via a special endpoint called “rpc-amoy.polygon.technology/.” This was a super sneaky way to send the data because it looked just like a regular Ethereum transaction.



Exfiltrating stolen private keysExfiltrating stolen private keys
Source: Socket

Why This Method Was So Sneaky

Blending In

Using Ethereum transactions to move stolen data was genius because it blended in with normal activity. Unlike regular network methods, which might get flagged by antivirus tools or firewalls, these blockchain transactions looked completely normal. This meant they flew under the radar, making them hard to detect and stop.

See also  Mastering Ethereum analytics (part 3) | by MicroBioscopicData (by Alexandros Athanasopoulos) | Jul, 2025

Low-Cost and Effortless

Another reason this method was so clever was its low cost. Polygon transactions have super low fees, and there’s no rate limiting for small transactions. Plus, they offer free public RPC endpoints, so the attackers didn’t even need to create their own infrastructure. This made the whole process easy and cheap for them.

Permanence of the Blockchain

Once the data was sent, it was stored permanently on the blockchain. This meant that the attackers could access it anytime they wanted. So, if your keys were stolen, the attackers had them forever.

What Happened Next?

After the discovery of ‘set-utils,’ the package was quickly removed from PyPI. But for those who had already downloaded and used it, the damage might have already been done. If you were one of those users, it was advised to uninstall the package immediately and assume any Ethereum wallets created with it were compromised.

Protecting Your Funds

If any of your wallets contained funds, it was crucial to move them to a new wallet as soon as possible. This was the only way to ensure your money was safe from being stolen.

See also  These 8 Programming Languages Are Running the Crypto-Economy

Tines Needle

Patching used to mean complex scripts, long hours, and endless fire drills. Not anymore.

In this new guide, Tines breaks down how modern IT orgs are leveling up with automation. Patch faster, reduce overhead, and focus on strategic work—no complex scripts required.

Get the free guide

Lessons Learned

Always Be Cautious

This incident serves as a stark reminder to always be cautious when downloading and using third-party software. Even if a package looks legitimate, it’s always worth doing a bit of research and checking for any red flags.

See also  AI Trading Bots Revolutionize Crypto Markets with Custom GPTs

Regular Security Checks

It’s also important for developers to perform regular security checks on the software they use. This way, any suspicious activity can be caught before it causes too much damage.

Stay Informed

Finally, staying informed about the latest security threats can help you stay one step ahead of attackers. By knowing what to look out for, you can better protect your digital assets.

Hot Topics

Related Articles

bitcoin
Bitcoin (BTC) $ 118,270.69
ethereum
Ethereum (ETH) $ 3,771.49
tether
Tether (USDT) $ 1.00
bnb
BNB (BNB) $ 795.17
xrp
XRP (XRP) $ 3.20
cardano
Cardano (ADA) $ 0.828476
usd-coin
USDC (USDC) $ 1.00
matic-network
Polygon (MATIC) $ 0.236822
binance-usd
BUSD (BUSD) $ 0.997766
dogecoin
Dogecoin (DOGE) $ 0.238938
okb
OKB (OKB) $ 48.25
polkadot
Polkadot (DOT) $ 4.18
shiba-inu
Shiba Inu (SHIB) $ 0.000014
tron
TRON (TRX) $ 0.320619
uniswap
Uniswap (UNI) $ 10.60
wrapped-bitcoin
Wrapped Bitcoin (WBTC) $ 118,154.66
dai
Dai (DAI) $ 1.00
litecoin
Litecoin (LTC) $ 114.83
staked-ether
Lido Staked Ether (STETH) $ 3,767.73
solana
Solana (SOL) $ 186.57
avalanche-2
Avalanche (AVAX) $ 25.00
chainlink
Chainlink (LINK) $ 18.68
cosmos
Cosmos Hub (ATOM) $ 4.80
the-open-network
Toncoin (TON) $ 3.32
ethereum-classic
Ethereum Classic (ETC) $ 23.09
leo-token
LEO Token (LEO) $ 8.99
filecoin
Filecoin (FIL) $ 2.69
bitcoin-cash
Bitcoin Cash (BCH) $ 570.21
monero
Monero (XMR) $ 322.17