Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

2025/07/22 12:00

Author: Joker&Thinking

Edited by: KrsMt.

background

In early July 2025, the SlowMist security team received a request for help from a victim user, asking for assistance in analyzing the cause of the theft of his crypto assets. The investigation found that the incident originated from the user's use of an open source project zldp2002/solana-pumpfun-bot hosted on GitHub, which triggered a covert theft of coins. For details, see GitHub's popular Solana tool has hidden coin theft traps.

Recently, another user used a similar open source project, audiofilter/pumpfun-pumpswap-sniper-copy-trading-bot, which resulted in the theft of encrypted assets, and contacted the SlowMist security team. In response, the team further analyzed the attack method.

Analysis process

Static Analysis

We first used static analysis to find traps set by attackers. After analysis, we found that the suspicious code was located in the /src/common/config.rs configuration file, mainly in the create_coingecko_proxy() method:

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

As can be seen from the code, the create_coingecko_proxy() method first calls import_wallet(), which further calls import_env_var() to obtain the private key.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

In the import_env_var() method, it is mainly used to obtain the environment variable configuration information in the .env file.

During the call, if the environment variable exists, it will return directly; if it does not exist, it will enter the Err(e) branch and print the error message. Since there is a loop {} with no exit condition, resources will continue to be consumed.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

Sensitive information like PRIVATE_KEY (private key) is also stored in .env file.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

Back to the import_wallet() method, when import_env_var() is called to obtain the PRIVATE_KEY (private key), the malicious code will determine the length of the private key:

  • If the private key length is less than 85, the malware will print an error message, and because there is a loop {} with no exit condition, resources will continue to be consumed, and the malware will not be able to exit normally;
  • If the private key length is greater than 85, use the Solana SDK to convert the Base58 string into a Keypair object, which contains the private key information.

The malicious code then uses Arc to encapsulate the private key information to support multi-threaded sharing.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

Back to the create_coingecko_proxy() method, after successfully obtaining the private key information, the malicious code then decodes the malicious URL address.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

The method first gets the encoded HELIUS_PROXY (attacker server address) hardcoded constant.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

The malicious code then decodes HELIUS_PROXY (the attacker's server address) using bs58, converts the decoded result into a byte array, and further converts the byte array into a UTF-8 string using from_utf8().

By writing a script, the real address of HELIUS_PROXY after decoding can be restored as follows:

After successfully decoding the URL (http://103.35.189.28:5000/api/wallets), the malicious code first creates an HTTP client and converts the obtained private key information payer into a Base58 string using to_base58_string().

Subsequently, the malicious code constructs a JSON request body and encapsulates the converted private key information in it. By constructing a POST request, the private key and other data are sent to the server pointed to by the above URL, while ignoring the response result.

Regardless of the result returned by the server, the malicious code will continue to run to avoid user awareness.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

In addition, the create_coingecko_proxy() method also contains normal functions such as obtaining prices to cover up its malicious behavior; the method name itself is also disguised and confusing.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

Through analysis, we can know that the create_coingecko_proxy() method is called when the application starts, specifically in the configuration file initialization phase of the main() method in main.rs.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

In the new() method of the configuration file src/common/config.rs, the malicious code first loads the .env file and then calls the create_coingecko_proxy() method.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

According to analysis, the server's IP address is located in the United States.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

 (https://www.virustotal.com/gui/ip-address/103.35.189.28)

It is observed that the project was updated recently (July 17, 2025) on GitHub, and the main changes are concentrated in the configuration file config.rs in the src directory.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

In the src/common/config.rs file, you can see that the original address encoding of HELIUS_PROXY (attacker server address) has been replaced with the new encoding.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

After using the script to decode the original address encoding, the original server address can be obtained.

Dynamic Analysis

In order to more intuitively observe the theft process of malicious code, we used a dynamic analysis method and wrote a Python script to generate Solana public and private key pairs for testing.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

At the same time, we built an HTTP server on the server that can receive POST requests.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

Write a Python script to generate the code corresponding to the test server, and replace it with the malicious server address code set by the original attacker, that is, HELIUS_PROXY (attacker server address).

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

Then, replace the PRIVATE_KEY in the .env file with the test private key you just generated.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

Next, launch the malicious code and observe the response of the server-side interface.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

We can see that the test server successfully received the JSON data sent by the malicious project, which contained the PRIVATE_KEY information.

Malicious robots reappear in Solana ecosystem: Private key leak trap hidden in configuration files

Indicators of Compromise (IoCs)

IPs:

103.35.189.28

Domains:

storebackend-qpq3.onrender.com

SHA256:

  • 07f0364171627729788797bb37e0170a06a787a479666abf8c80736722bb79e8 - pumpfun-pumpswap-sniper-copy-trading-bot-master.zip
  • ace4b1fc4290d6ffd7da0fa943625b3a852190f0aa8d44b93623423299809e48 - pumpfun-pumpswap-sniper-copy-trading-bot-master/src/common/config.rs

Malicious warehouse:

Similar implementation methods:

  • https://github.com/BitFancy/Solana-MEV-Bot-Optimized
  • https://github.com/0xTan1319/solana-copytrading-bot-rust
  • https://github.com/blacklabelecom/SAB-4
  • https://github.com/FaceOFWood/SniperBot-Solana-PumpSwap
  • https://github.com/Alemoore/Solana-MEV-Bot-Optimized
  • https://github.com/TopTrenDev/Raypump-Executioner-Bot
  • https://github.com/deniyuda348/Solana-Arbitrage-Bot-Flash-Loan

Summarize

In the attack method shared this time, the attacker disguised himself as a legitimate open source project to trick users into downloading and executing the malicious code. The project reads sensitive information from the .env file locally and transmits the stolen private key to a server controlled by the attacker. This type of attack is usually combined with social engineering techniques, and users may fall into the trap if they are not careful.

We recommend that developers and users be highly vigilant about GitHub projects from unknown sources, especially when it comes to wallet or private key operations. If you really need to run or debug, it is recommended to do so in an independent environment without sensitive data to avoid executing malicious programs and commands from unknown sources.

Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact service@support.mexc.com for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.

You May Also Like

2025 Ripple Whales Are Quietly Betting Big on This Cloud Mining Opportunity – Here’s Why

2025 Ripple Whales Are Quietly Betting Big on This Cloud Mining Opportunity – Here’s Why

Cloud mining has long been a favourite among cryptocurrency enthusiasts due to its ease of use and accessibility. Unlike traditional mining, it doesn’t require expensive hardware, technical expertise or constant monitoring. Cloud mining simplifies the process and allows anyone (regardless of experience) to participate in the cryptocurrency revolution. Instead of investing in expensive mining equipment and managing complex setups, users can rent mining arithmetic from remote data centres and receive a share of the profits generated. One-click registration will give you random rewards of 10-100$ . It is suitable for everyone to participate. Download the official app with one click. Why Ripple Whales Are Betting Big on Cloud Mining Crypto whales are always ahead, while now Ripple whales made the far-reaching move into AI-powered cloud mining. As the crypto market develops at lightning speed, the best investment strategies started to move from simple accumulation of tokens to passive income with high-yield and stable return. This is the wake-up call for every smart investor who wants to maximize his or her profit in 2025. Unimaginable Earning Opportunities What sets CRYPTOMININGFIRM apart is its extraordinary daily passive income, which offers the opportunity to earn 100-$1 Million or more per day, enabling users to realise their dream of becoming rich online. Imagine earning a substantial income without constant effort or complicated setups – that’s what CRYPTOMININGFIRM offers. Security and Sustainability In the world of mining, trust and security are crucial, CRYPTOMININGFIRM understands this and puts the safety of its users first, CRYPTOMININGFIRM is committed to transparency and legitimacy, ensuring that your investment is protected and allowing you to focus on making a profit. All mines use clean energy power, making cloud mining join the ranks of the carbon neutral. Renewable energy protects the environment from pollution and delivers superb returns, allowing every investor to enjoy the opportunity and the benefits. Best Cloud Mining for a New Frontier in the Creation of Crypto Wealth Cloud mining is fast becoming the gold standard of crypto investing, and for good reason. Unlike traditional mining-which requires expensive equipment and electricity-intensive setups-cloud mining allows investors to rent powerful mining hardware remotely. This means zero maintenance, no technical headaches, and 24/7 passive income generation. Specifically, AI-driven cloud mining is rewriting the script for the whole sector. While leveraging machine learning algorithms to attain the very pinnacle of mining performance, the likes of CRYPTO MINING FIRM guarantee unmatched efficiency and profitability. Unlike DOGE, XRP, or Solana multi-baggers based on speculation in the market, cloud mining is real-world and steady returns that investors can actually rely on. Cloud Mining vs DOGE Whales: Stability Over Speculation While DOGE whales are known for their high-risk, high-reward strategies, cloud mining presents a smarter, more stable alternative. The volatile nature of meme coins means that fortunes can be made or lost overnight. In contrast, cloud mining delivers predictable earnings, making it a safer, more sustainable option for those who want long-term financial security. Cloud Mining vs. XRP Whales: A Passive Income Revolution Ripple whales have long dominated the remittance and cross-border payments sector, but even they acknowledge the power of cloud mining. With AI-enhanced mining algorithms, CRYPTO MINING FIRM makes sure your earnings compound daily for a far superior risk-reward ratio compared to simply holding XRP tokens. Cloud Mining vs Solana Multi-Baggers: Consistency Wins Solana’s explosive growth has created multi-bagger opportunities, but network congestion and security concerns remain a challenge. Meanwhile, cloud mining platforms like CRYPTO MINING FIRM operate with 100% uptime, offering continuous profits without the risks of network failures or unpredictable price crashes. What is CRYPTO MINING FIRM? The Game-Changer in Cloud Mining Established in 2021, CRYPTO MINING FIRM is the leading AI-powered cloud mining platform, trusted by over 9.39 million investors worldwide. The platform leverages cutting-edge mining technology, ensuring maximum efficiency and profitability. Unlike traditional mining, CRYPTO MINING FIRM eliminates hardware costs, energy bills, and technical barriers, making it accessible to everyone. CRYPTO MINING FIRM has an intuitive interface, a high payout every day, and instant withdrawals. It is the best service for those who seek financial well-being and require minimum effort for its achievement. Choose a trial contract, recharge $100 according to the platform process, and earn $8 in 2 days of trial contract. Choose a premium contract and easily earn up to $7050 per day depending on your personal financial situation. Whether you start with a modest $500 investment or go big with $100,000+ contracts, the platform’s AI-driven mining technology ensures optimal performance, guaranteeing top-tier returns for investors. Cloud mining is not just about making money – it’s about financial freedom. With CRYPTO MINING FIRM , your investments work for you around the clock, allowing you to focus on what truly matters while your crypto portfolio grows effortlessly. How Bitcoin Mining Works & Why It’s Still Profitable Mining remains the backbone of the crypto industry, whereby miners validate transactions and are rewarded with newly minted BTC. However, traditional mining has become increasingly cost-prohibitive, with expensive ASIC rigs, sky-high electricity costs, and constant maintenance requirements. CRYPTO MINING FIRM solves all these problems by offering a fully managed, AI-powered mining solution. Investors simply purchase a contract, and CRYPTO MINING FIRM ‘s state-of-the-art mining farms handle the rest. With renewable energy solutions and AI-driven efficiency, CRYPTO MINING FIRM ensures continuous profit potential in a sustainable, eco-friendly manner. The Power of Compounding Many investors compound returns by reinvesting day-to-day earnings, hence turning a small investment into passive income of six figures. For instance, with an initial investment of $5,000, you could: Generate $5000/month in passive income Reinvest your earnings and scale up your mining power Double your investment in only a few months Getting Started with CRYPTO MINING FIRM in Just a Few Steps Starting your cloud mining journey with CRYPTO MINING FIRM is fast and simple. Here’s how you can start earning passive income today: Instant Sign-up: Just go to the official website of CRYPTO MINING FIRM and sign up with your e-mail only. Choose a Mining Plan: Choose the suitable contract for your budget, starting from an investment of just $10. Deposit Funds: You will have to deposit funds into your account via BTC, USDT, ETH, or some other popular cryptocurrency. Start Mining: Once activated, your daily earnings start rolling in automatically. Withdraw Anytime: Cash out your profits instantly or reinvest to amplify your returns. You can register to get started with cloud mining here .
Share
CryptoNews2025/07/22 18:33
DWF Labs co-founder: Falcon Finance funds have all been withdrawn from CEX, and the new transparency page will be launched this week

DWF Labs co-founder: Falcon Finance funds have all been withdrawn from CEX, and the new transparency page will be launched this week

PANews reported on July 22 that Andrei Grachev, co-founder of DWF Labs and co-founder of Falcon Finance, wrote that Falcon Finance has withdrawn all funds from centralized exchanges and obtained
Share
PANews2025/07/22 18:31