First-hand analysis. We obtained this sample from a YouTube video advertising a "Donut SMP dupe mod" that linked to a Discord server hosting the download. The mod was decompiled, manually deobfuscated and executed in our lab.

What this is

A trojanised Minecraft Fabric mod called "Donut SMP Dupe", advertised through YouTube as a duplication exploit for a popular Minecraft server. Dupe mods do not exist — item duplication is a server-side bug, not something a client mod can provide — but the target audience is kids who do not know that. Download link goes to a Discord server; the Discord serves the JAR.

The JAR is a two-stage info-stealer and loader. Stage 1 steals your Minecraft session (username, UUID, access token) and phones home immediately. Then it downloads Stage 2 — internally called "WeedHack" — entirely into memory via a custom ClassLoader, leaving no second file on disk. Stage 2 is compiled to native code via JNIC, escalates privileges through a CMSTP UAC bypass, adds Windows Defender exclusions, and contains a second in-memory ClassLoader hinting at a possible Stage 3.

The most interesting piece of tradecraft: both stages resolve their C2 domain by reading an Ethereum smart contract. The domain is RSA-signed on-chain, so only the attacker's private key can update it. Take the domain down and they just push a new one to the blockchain.

The disguise

The malware is built on top of the default Fabric mod template — the same skeleton you get when you generate a new mod project. The author did not bother renaming the template scaffolding, so the default com.example package, ExampleMod and ExampleMixin class names are still present. That laziness is itself a detection signal: a legitimate mod would never ship with the template's placeholder names.

The fabric.mod.json lists a real-looking client entrypoint (com.donut.dupe) alongside the malicious com.example.ExampleMod under main. It bundles legitimate LWJGL NanoVG native JARs in META-INF/jars/ to pad out the file and look authentic. The metadata:

Mod ID donutdupe
Display name "Donut SMP Dupe"
Version 1.0.22
Target MC 1.21.4 · Fabric Loader ≥0.17.3 · Java ≥21
Malicious entrypoint com.example.ExampleMod (default Fabric template name, never renamed)

A bundled fabric.api.json contains a hardcoded UUID (3gbhh051-174b-4dt6-kjad-45a457531fx5) that gets sent to the C2 as a campaign identifier. This is not a real Fabric API field — the Fabric loader does not check for or read a fabric.api.json file. It is purely a tracking tag baked into each build.

Stage 1 — the mod

The JAR has two execution paths depending on how it is launched:

Path A: loaded as a Fabric mod

When Minecraft loads the mod, onInitialize() fires and the malware immediately:

  • Harvests the player's Minecraft session — username, UUID and access token.
  • Resolves the C2 domain via Ethereum RPC (see below).
  • Reads the campaign UUID from fabric.api.json.
  • Exfiltrates the session data via HTTP POST to /api/delivery/handler — before Stage 2 even loads. The credentials are gone within seconds of the mod initialising.
  • Spawns a background thread to download and load Stage 2.

Path B: run as a standalone JAR

The JAR can also run outside Minecraft. It checks for a --jw flag; if absent, it relaunches itself through javaw.exe (the windowless Java runtime) with --jw appended, then exits — hiding the console window on Windows. No Minecraft session data is available in this path, so it skips straight to downloading Stage 2.

String obfuscation

Every sensitive string in Stage 1 — URLs, JSON keys, the RSA public key, field names — is hidden behind a custom runtime decoder: Helper.load(int[] d1, int[] d2, int k1, int k2). The algorithm:

  1. Interleave two integer arrays (d1, d2) into one — even indices from d1, odd from d2.
  2. Generate an S-box via sbox[i] = (i * 53 + 97) % 256 and compute its inverse.
  3. For each byte: chained XOR with the previous value (seeded by k2), bit-rotate right by (idx * 5 + k1) % 8, inverse S-box substitution, then a final XOR with a rolling mask derived from k2, a stateful counter and the position.

All 57 call sites in this sample use constants k1=187, k2=67. We wrote a standalone offline decoder (decode/Decode.java) to extract every string without executing the malware. The full mapping of all 57 decoded strings is documented separately.

C2 resolution via Ethereum

This is the standout piece of tradecraft. Instead of hardcoding a C2 domain that can be sinkholed, the malware reads its C2 address from an Ethereum smart contract.

The resolver cycles through 32 public Ethereum JSON-RPC endpoints (Llamarpc, Publicnode, Tenderly, Flashbots, DRPC and others) and sends an eth_call to contract 0x1280a841Fbc1F883365d3C83122260E0b2995B74 with function selector 0xce6d41de. The response is ABI-decoded to a UTF-8 string in the format:

<C2_URL>|<RSA_SIGNATURE>

The RSA signature is verified against a hardcoded RSA-2048 public key (SHA256withRSA) before the URL is accepted. This is the clever part: even if someone finds the contract and writes a new value to it, the malware will reject any domain not signed by the attacker's private key. The on-chain data is authenticated, not just obfuscated.

As of 2026-03-06, the contract resolved to https://whnewreceive.ru. But the attacker can push a new signed domain to the contract at any time — no malware update needed, no new build to distribute. Traditional domain takedowns become a game of whack-a-mole against an append-only ledger.

Stage 2 — WeedHack

Once the C2 domain is resolved, Stage 1 fetches Module.jar from /files/jar/module via HTTP GET. The JAR is parsed in-memory using JarInputStream — it is never written to disk. Class files go into a classMap, everything else into a resourceMap, and a custom ClassLoader serves them at runtime. Stage 1 then reflectively loads dev.majanito.Main and calls initializeWeedhack(String contextJson).

JNIC compilation

Stage 2 is built with JNIC — a Java-to-native compiler that converts bytecode into C/C++ and compiles it to platform-specific DLLs. The decompiled Java source shows method signatures but almost every method body is native. The real logic lives in an embedded LZMA-compressed .dat resource containing two DLLs:

Platform Arch Size
Windows x64 x86_64 / amd64 ≈504 KB
Windows ARM64 aarch64 ≈458 KB

No Linux or macOS support — any other platform gets UnsatisfiedLinkError("Platform not supported"). At runtime the JNIC loader extracts the right DLL to a temp file (lib*.tmp in %TEMP%), marks it deleteOnExit(), and calls System.load().

What Stage 2 does

The class structure and method signatures map out the capabilities:

Class Purpose
dev.majanito.Main Entry point. Receives context JSON from Stage 1. Contains addDefenderExclusions() (Defender evasion) and extractJnaNative().
dev.majanito.Elevator UAC bypass via CMSTP (T1218.003). Creates .xdmf config files, uses JNA to call SendMessage to auto-click the CMSTP elevation prompt. Has a doSystem() method for arbitrary command execution. Downloads an additional "elevator" payload to disk.
dev.majanito.RPCHelper Duplicate of Stage 1's Ethereum RPC resolver — same contract, same key. Allows Stage 2 to resolve C2 independently if needed.
dev.majanito.TelemetryHelper Data exfiltration. initTelemetry(String) sends stolen data to the C2.
dev.majanito.IMCL Another in-memory ClassLoader — same pattern as Stage 1. Suggests a possible Stage 3 payload.

The privilege escalation chain: CMSTP bypass gets admin → addDefenderExclusions() adds the malware's paths to Defender's exclusion list (likely via Set-MpPreference -ExclusionPath) → subsequent payloads run without AV interference. Stage 2 also bundles JNA (net.java.dev.jna) for direct Windows API calls (WinDef.HWND, WinDef.WPARAM, SendMessage).

C2 endpoint behaviour

We probed the C2 server directly to document its responses:

Endpoint Behaviour
POST /api/delivery/handler Credential exfil endpoint. Returns 405 on non-POST, 400 without Content-Type: application/json, 200 with body {} on success. An empty JSON response confirms the server received the data.
GET /files/jar/module Serves the Stage 2 payload (Module.jar) as a file download.

Indicators of compromise

Network

C2 domain whnewreceive.ru (as of 2026-03-06; updatable on-chain)
Exfil endpoint https://whnewreceive.ru/api/delivery/handler
Stage 2 endpoint https://whnewreceive.ru/files/jar/module
ETH contract 0x1280a841Fbc1F883365d3C83122260E0b2995B74
ETH selector 0xce6d41de

File hashes (SHA-256)

DonutSMPDupe.jar 4d7f987531d66309c6847487cd9b1e68c0b20f1314815264513690797160c003
Module.jar 4fd9f44579c4ad64ed3cca30162eced92c8d828e370e3071707ba25d46944133

Host & behavioural indicators

  • Fabric mod with an entrypoint under the com.example package (default template, never renamed).
  • fabric.api.json containing a UUID — not a real Fabric API file.
  • HTTP POST to /api/delivery/handler with JSON containing username, uuid, accessToken fields.
  • eth_call JSON-RPC requests hitting dozens of public Ethereum endpoints with data 0xce6d41de.
  • In-memory JAR loading — no Stage 2 artifacts written to disk.
  • Self-relaunch via javaw.exe --jw to hide the console window.
  • Temp DLL extraction to %TEMP%\lib*.tmp (JNIC loader).
  • cmstp.exe execution with custom .xdmf config files (UAC bypass).
  • Modification of Windows Defender exclusion paths post-escalation.

So what?

The delivery vector is the same story as always: a kid searches YouTube for a cheat, downloads a JAR from a Discord server, and runs it. The social engineering is trivial. What is not trivial is the post-compromise infrastructure.

Ethereum-based C2 resolution with RSA-signed domains is a real problem for defenders. You cannot take down a smart contract the way you take down a domain. The attacker can rotate C2 infrastructure in a single transaction, and the malware does not need to be updated or redistributed. The 32 public RPC endpoints mean there is no single chokepoint to block. The RSA verification means you cannot poison the contract with a sinkhole address.

The in-memory Stage 2 loading is also worth noting. Stage 1 leaves a JAR on disk. Stage 2 does not. If your detection relies on file-system scanning, you will see the mod but miss the payload that actually does the damage.

If this ran on a machine: rotate the Minecraft account credentials immediately (session token, password, associated email). If Stage 2 executed successfully, treat the host as compromised — the UAC bypass and Defender exclusions mean anything else on the system could have been touched.