DEV Community

Cover image for How Attackers Are Using Blockchains to Hide Malware
GuardingPearSoftware
GuardingPearSoftware

Posted on

How Attackers Are Using Blockchains to Hide Malware

While cryptocurrency is a known vector for financial crime and user-targeted cyber attacks such as account compromise, its foundational blockchain technology has remained largely secure against cryptographic breaches. However, the same blockchain technology known for its security can also be exploited by threat actors, introducing a new layer of challenges in cybersecurity.

Ethereum has long been a target for cybercriminals, with hackers frequently exploiting vulnerabilities in smart contracts to steal the cryptocurrency they store. Since late 2023, however, a new tactic known as EtherHiding has emerged.

EtherHiding is a technique in which attackers store pieces of malicious code, configuration data, or command-and-control (C2) instructions inside blockchain transactions or smart contract storage, then retrieve and assemble those pieces on victim systems to load malware. The result is an attack infrastructure that is highly resilient, hard to take down, and difficult for defenders to block using ordinary URL- or domain-based controls. The technique isn’t limited to Ethereum, and it can be applied across various smart contract platforms.

How EtherHiding Works

1. Initial Access

Attackers usually gain a foothold through social engineering, such as through bogus job interviews or malicious crypto games. Attackers may also first compromise a legitimate site (often WordPress) by exploiting vulnerabilities or using stolen credentials.

2. Loader Injection

The intruder plants a tiny JavaScript “loader” into the breached website.

3. Retrieving the Payload

When a visitor loads the infected page, the loader runs in the browser and queries the blockchain to fetch the main malicious payload hosted off-site. Attackers commonly use read-only calls (for example, eth_call) so no on-chain transaction is generated, which keeps the operation stealthy and avoids gas fees.

4. Execution and Impact

After retrieval, the payload runs on the victim’s machine, which can result in fake login prompts, data-stealing malware installations, ransomware deployment, and other malicious outcomes.

Why EtherHiding Is So Difficult to Defend Against

1. Decentralization and Durability

Because the malicious content is stored on a decentralized, permissionless blockchain, there is no single point of failure or central server for authorities to dismantle. As long as the blockchain network remains active, the harmful code stays accessible.

2. Anonymity

The pseudonymous structure of blockchain transactions obscures the identities of the individuals behind malicious smart contracts, complicating attribution efforts.

3. Immutability

Once deployed, a smart contract’s contents are nearly impossible to modify or erase without the original owner’s private key, ensuring the persistence of the embedded malicious code.

4. Stealth

Attackers can use read-only blockchain queries to retrieve their payloads. Since these operations don’t create on-chain transactions, they leave no visible trace, allowing threat actors to operate discreetly.

5. Flexibility

Control over the smart contract enables attackers to modify their malicious payloads at will. They can switch attack strategies, update domains, or deploy new malware variants by altering the data tied to the contract.

Known Attacks Involving EtherHiding

One example of EtherHiding in action is the ClearFake campaign, in which cybercriminals compromised WordPress websites by embedding concealed JavaScript code within article pages.

In another incident, attackers combined EtherHiding with the Fake-Updates technique. In this scheme, victims were deceived into downloading malware disguised as software updates. Pop-up messages urged users to install what seemed like legitimate updates. The downloads contained malicious code delivered through the blockchain, resulting in website defacement and widespread malware infections.

In October 2025, Google Threat Intelligence Group noticed a North Korea-aligned actor using EtherHiding to steal cryptocurrency, marking the first time a nation-state actor adopted the technique. Similar tactics have been attributed to other groups that combine compromised websites with on-chain payload hosting.

Reporting from multiple outlets describes campaigns where attackers lured developers with fake job postings or coding challenges, caused victims to download a loader, then used on-chain fragments to assemble final payloads like info-stealers or backdoors. Those campaigns specifically targeted Web3 developers and crypto professionals because compromising them can directly yield access to crypto wallets and private keys.

Conclusion

EtherHiding marks a major evolution in cybercrime tactics. What was once praised as a secure and transparent innovation is now being repurposed to conceal and distribute malicious payloads, making detection and mitigation far more difficult. Attackers are leveraging decentralized platforms to gain persistence, anonymity, and resilience against takedowns, advantages that traditional hosting infrastructures cannot offer.

Read more on my blog: www.guardingpearsoftware.com!

Top comments (0)