Smart Contracts for C&C: How ClearFake Hid in Plain Sight on BSC Testnet

Smart Contracts for C&C: How ClearFake Hid in Plain Sight on BSC Testnet
TrendAI Research described an EtherHiding campaign that used BNB Smart Chain testnet smart contracts to deliver ClearFake payloads and route victims to Windows and macOS-specific stages. The attack ended with SectopRAT and ACRStealer deployment and used an on-chain execution tracker to confirm compromises in real time. #EtherHiding #ClearFake #SectopRAT #ACRStealer #BNBSmartChain

Keypoints

  • Threat actors hid ClearFake payload-routing logic inside BNB Smart Chain testnet smart contracts using EtherHiding.
  • The blockchain-based delivery chain was immutable, decentralized, and free to operate on the testnet, making takedown difficult.
  • Stage 1 used injected JavaScript on a compromised WordPress site to query Smart Contract A via eth_call and retrieve the next payload.
  • Anti-analysis checks blocked headless browsers, localhost/private IP ranges, and sandbox-like environments before payload routing continued.
  • Windows victims received a ClickFix overlay that led to clipboard-based command execution, remote DLL loading, and browser credential theft activity.
  • macOS victims were routed to a separate payload that used a bash one-liner, spoofed a macOS user agent, and added Yandex Metrika tracking.
  • The campaign deployed SectopRAT and ACRStealer, while Smart Contract D recorded victim execution confirmations on-chain in real time.

MITRE Techniques

  • [T1059.007 ] JavaScript – Used as the initial injected loader and blockchain query mechanism in the compromised website (‘an injected JavaScript loader into compromised websites’ and ‘the injected JavaScript on compromised websites queried these contracts’).
  • [T1027 ] Obfuscated Files or Information – The Stage 1 script used string-array rotation and runtime shuffling to hide its logic (‘The obfuscation uses a standard anti-static-analysis technique’).
  • [T1497.001 ] Virtualization/Sandbox Evasion: System Checks – The script checked for headless browsers, automation frameworks, and zero-sized windows to avoid analysis (‘navigator.webdriver === true’, ‘HeadlessChrome’, ‘Puppeteer’, ‘Playwright’).
  • [T1036 ] Masquerading – The malware used a fake Google reCAPTCHA/ClickFix overlay and blended FileZilla-like paths to appear legitimate (‘a convincing Google reCAPTCHA lookalike’ and ‘chosen to blend with the legitimate FileZilla FTP client’).
  • [T1105 ] Ingress Tool Transfer – Payloads and scripts were fetched from smart contracts and remote URLs (‘retrieve and route victims to the next stage’ and ‘downloads and executes a remote shell script via curl’).
  • [T1115 ] Clipboard Data – The overlay injected commands into the victim clipboard via navigator.clipboard.writeText() (‘to inject the command into the victim’s clipboard’).
  • [T1204.002 ] User Execution: Malicious File – The victim had to interact with the fake verification flow and execute a clipboard-sourced command (‘press Enter on your keyboard to finish’ and ‘the victim opened the Run dialog and executed the clipboard command’).
  • [T1055 ] Process Injection – rundll32.exe injected remote threads into browser processes for credential theft (‘injecting remote threads into chrome.exe and msedge.exe’).
  • [T1218.011 ] Signed Binary Proxy Execution: Rundll32 – rundll32.exe was used to host the payload and drive browser injection (‘rundll32.exe process (hosting the put34b.camp payload)’).
  • [T1071.001 ] Web Protocols – The campaign used JSON-RPC/eth_call over HTTP(S) to query blockchain contracts (‘eth_call’, ‘a JSON-RPC method’, ‘constructs an eth_call JSON-RPC request’).

Indicators of Compromise

  • [Smart contract addresses] Blockchain payload and tracker contracts – 0xA1decFB75C8C0CA28C10517ce56B710baf727d2e, 0x46790e2Ac7F3CA5a7D1bfCe312d11E91d23383Ff, and other 2 items.
  • [Wallet address] Shared deployer wallet for all four contracts – 0xd71f4cdC84420d2bd07F50787B4F998b4c2d5290.
  • [Domain / RPC endpoint] BNB Smart Chain testnet query endpoint used by the injected loader – bsc-testnet-rpc.publicnode[.]com, ip-info.ff.avast[.]com.
  • [File names] Dropped payloads and helper components on Windows and macOS – put34b.camp, helper.py, and other 2 items.
  • [URLs / network destinations] Secondary download and telemetry destinations observed from the Python payload – api.github[.]com, registry.npmjs[.]org, and other 2 items.
  • [Transaction hashes] On-chain contract activity and execution tracker events – tx 0x029adddb5a03f16ffbe2907d17b36cb4032850f7856d9d38d3d9aba7ec3e2857.


Read more: https://www.trendmicro.com/en_us/research/26/e/smart-contracts-for-command-and-control.html