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 causeAuthor: 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

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

2025/07/22 12:00
5 min read

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 [email protected] 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

Exploring Market Buzz: Unique Opportunities in Cryptocurrencies

Exploring Market Buzz: Unique Opportunities in Cryptocurrencies

In the ever-evolving world of cryptocurrencies, recent developments have sparked significant interest. A closer look at pricing forecasts for Cardano (ADA) and rumors surrounding a Solana (SOL) ETF, coupled with the emergence of a promising new entrant, Layer Brett, reveals a complex market dynamic. Cardano's Prospects: A Closer Look Cardano, a stalwart in the blockchain space, continues to hold its ground with its research-driven development strategy. The latest price predictions for ADA suggest potential gains, predicting a double or even quadruple increase in its valuation. Despite these optimistic forecasts, the allure of exponential gains drives traders toward more speculative ventures. The Buzz Around Solana ETF The potential introduction of a Solana ETF has the crypto community abuzz, potentially catapulting SOL prices to new heights. As investors await regulatory decisions, the impact of such an ETF on Solana's value could be substantial, potentially reaching up to $300. However, as with Cardano, the substantial market capitalization of Solana may temper its growth potential. Why Layer Brett is Gaining Traction Amidst established names, a new contender, Layer Brett, has started to capture the market's attention with its early presale stages. Offering a low entry price of just $0.0058 and promising over 700% in staking rewards, Layer Brett presents a tempting proposition for those looking to maximize returns. Comparative Analysis: ADA, SOL, and $LBRETT While both ADA and SOL offer stable investment choices with reliable growth, Layer Brett emerges as a high-risk, high-reward option that could potentially offer significantly higher returns due to its nascent market position and aggressive economic model. Initial presale pricing lets investors get in on the ground floor. Staking rewards currently exceed 690%, a persuasive incentive for early adopters. Backed by Ethereum's Layer 2 for enhanced transaction speed and reduced costs. A community-focused $1 million giveaway to further drive engagement and investor interest. Predicted by some analysts to offer up to 50x returns in coming years. Shifting Sands: Investor Movements As the crypto market landscape shifts, many investors, including those traditionally holding ADA and SOL, are beginning to diversify their portfolios by turning to high-potential opportunities like Layer Brett. The combination of strategic presale pricing and significant staking rewards is creating a momentum of its own. Act Fast: Time-Sensitive Opportunities As September progresses, opportunities to capitalize on these low entry points and high yield offerings from Layer Brett are likely to diminish. With increasing attention and funds being directed towards this new asset, the window to act is closing quickly. Invest in Layer Brett now to secure your position before the next price hike and staking rewards reduction. For more information, visit the Layer Brett website, join their Telegram group, or follow them on X by clicking the following links: Website Telegram X Disclaimer: This is a sponsored press release and is for informational purposes only. It does not reflect the views of Bitzo, nor is it intended to be used as legal, tax, investment, or financial advice.
Share
Coinstats2025/09/18 18:39
Trump's 'pretty boring' State of the Union was a flop: MS NOW's Lemire

Trump's 'pretty boring' State of the Union was a flop: MS NOW's Lemire

Donald Trump's record-long State of the Union address got about as low of marks as possible from MS NOW’s Jonathan Lemire who claimed he couldn’t see it changing
Share
Rawstory2026/02/25 20:03
Ripple Links RLUSD Stablecoin to Franklin Templeton Fund on DBS Digital Exchange

Ripple Links RLUSD Stablecoin to Franklin Templeton Fund on DBS Digital Exchange

TLDR: DBS, Ripple, and Franklin Templeton will enable sgBENJI token trades using RLUSD stablecoin on DBS Digital Exchange. Investors can rebalance portfolios 24/7 and earn yield by holding tokenized money market funds on the XRP Ledger. DBS will explore repo lending, allowing sgBENJI tokens to serve as collateral for credit and wider liquidity access. Franklin [...] The post Ripple Links RLUSD Stablecoin to Franklin Templeton Fund on DBS Digital Exchange appeared first on Blockonomi.
Share
Blockonomi2025/09/18 13:21