Skip to content
ElarnnPublic

About

Scanner for malicious Minecraft mods and plugins: static bytecode analysis plus a monitored run (Fabric, Forge, NeoForge, Bukkit/Spigot/Paper)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

JarProbe

JarProbe - malware scanner for Minecraft mods and plugins

A scanner for malicious code in jar files of Minecraft mods and plugins (and of Java applications in general). It combines two approaches:

  1. Static analysis - the bytecode is parsed with ASM, without running the code.
  2. Dynamic analysis - the jar runs under a Java agent that intercepts dangerous actions (network, files, processes, dynamic class loading) and logs them.

Static analysis finds suspicious places, dynamic analysis confirms the real behaviour, and the final report links the findings by class and method.

Supported: Fabric, Forge and NeoForge mods, Bukkit/Spigot/Paper plugins and ordinary Java applications.

Home screen Report
Home screen Report

Download

Ready builds are on the Releases page. Java 21 is needed.

  • jarprobe-gui-windows-x64.jar - the window. Start it with a double click or java -jar jarprobe-gui-windows-x64.jar. It carries JavaFX for Windows; on Linux and macOS build the window from source (see Build).
  • jarprobe-<version>.zip - the command line for any OS: scanner.jar and the jarprobe / jarprobe.cmd launchers.

Warning: dynamic analysis really runs the checked jar on this computer with your rights - the agent only watches and blocks nothing. Check suspicious files in a virtual machine or with --static-only.

Modules

  • core - the common model of findings (Finding) and shared types.
  • agent - the Java agent for dynamic analysis. ASM inside agent.jar is relocated to the package jprobe.shaded.asm: Fabric Loader does not start when the classpath has two copies of org.objectweb.asm.
  • static - static bytecode analysis on ASM.
  • cli - running a scan and building the reports.
  • gui - a JavaFX window on top of the same code as the CLI (no scanning logic of its own).
  • test-samples - synthetic test jars (they only imitate suspicious behaviour: localhost, fake files in a temporary folder, harmless commands).

Requirements

  • Java 21, Gradle (Kotlin DSL).

Build

./gradlew build

Scanning

java -jar cli/build/libs/scanner.jar scan <file.jar> [--timeout <seconds>] [--json <file>] [--html <file>] [--static-only] [--hide-vm]
                                         [--server] [--server-templates <folder>] [--server-template <folder>]
                                         [--install-server --accept-minecraft-eula] [--lang en|ru]

Language

JarProbe speaks English by default: messages, finding descriptions, the text, JSON and HTML reports (the HTML page has <html lang="en">). --lang ru turns Russian on for this run; jarprobe --lang ru without a command prints the help in Russian. In the window the language is switched with the EN/RU buttons in the top bar of the home screen: the screen is rebuilt in the chosen language, and the choice is saved in ~/.jarprobe/settings.properties (language=en|ru) and applies at the next start. The check and report screens have no switch - one report does not mix two languages; to change the language, press "New check".

The jarprobe command

./gradlew build puts a ready set into build/jarprobe/: scanner.jar and two launchers, jarprobe.cmd (Windows) and jarprobe (Linux, macOS, Git Bash). Add this folder to PATH, and instead of java -jar cli/build/libs/scanner.jar scan mod.jar you can write:

jarprobe scan mod.jar --html report.html

Which Java runs the scanner: the JARPROBE_JAVA variable (path to java), otherwise JAVA_HOME, otherwise java from PATH. Java 21 is needed. The launchers only pass the arguments on; they can be copied together with scanner.jar anywhere.

scanner.jar is self-contained: the static analysis and the agent are built in. The scanner parses the bytecode, runs the jar in a separate JVM under the agent (with a timeout), links static and dynamic findings by class and method and prints a report with a verdict; --json also saves the report as JSON, --html as a self-contained HTML report (one file with built-in styles and no external resources: verdict, timeline of dynamic events, static findings, the links between them and collapsible call stacks).

If the jar is a Fabric/Forge/NeoForge mod or a plugin without Main-Class, java -jar runs none of its code. Then the report (text, JSON, HTML and the window) contains the block "The run verified nothing", and the verdict is never "No threats found": at least "Worth checking", since the result rests on the static analysis alone.

Warning: dynamic analysis runs the checked jar on this computer - the agent only watches and blocks nothing. Check suspicious files in a virtual machine or with --static-only.

Running from IntelliJ IDEA

The .run/ folder holds ready run configurations - IDEA picks them up by itself, and they appear in the list next to the Run button:

  • JarProbe: scan a jar - a full scan (static + dynamic);
  • JarProbe: static only - the same with --static-only, the jar is not run.

Before the run Gradle builds scanner.jar (:cli:jar), then IDEA asks in a dialog which jar to check. The text report is printed to the run console; JSON and HTML are saved to build/reports/jarprobe/.

The window (GUI)

./gradlew :gui:run
java -jar gui/build/libs/jarprobe-gui.jar

The second way works after ./gradlew :gui:jar. IDEA has the configuration JarProbe: window.

Drop a jar into the window (or press "Choose a file"), optionally turn on "Static analysis only" or "Hide the virtual machine" (see below) and choose the run timeout. The window shows the steps of the check with a "Cancel" button (a running program is stopped on cancel), then the report: the verdict, findings confirmed by the run, the timeline of dynamic events and the static findings. "Export HTML" and "Export JSON" save the same report as --html and --json. The dynamic mode runs the jar on this computer - the yellow warning on the home screen says so while the run is on.

JavaFX comes from Maven Central for the current OS (Windows, macOS, Linux), so jarprobe-gui.jar works on the OS it was built on. When started from the classpath, JavaFX may print the warning Unsupported JavaFX configuration - it is harmless.

The look is in the Minecraft style (red, beige, brown). The pixel font Monocraft lies in the resources of the gui module together with its SIL OFL 1.1 license (fonts/Monocraft-OFL.txt); the dirt texture is generated.

Running the agent by hand

java -javaagent:agent/build/libs/agent.jar=output=events.jsonl -jar test-samples/build/libs/file-sample.jar

Events are printed to the console; with the argument output=<path> they are also written to a file in JSON Lines format - one Finding per line. The bytecode of classes defined at runtime is saved to the jarprobe-dumps folder in the current directory.

Fabric/Forge/NeoForge mods

The ordinary scan does not check mods: they have no Main-Class, the loader's server loads them. For that there is the "Through the loader server" mode (see below), built on a class from cli: io.github.elarnn.jarprobe.cli.loader.LoaderEnvironment (FabricEnvironment, ForgeEnvironment) - it copies a prepared server to a temporary folder, puts the mod in, adds the agent to the JVM arguments, starts the server, waits for the mod to fire or for the timeout and stops the server. The loader type is detected automatically from fabric.mod.json / META-INF/mods.toml / META-INF/neoforge.mods.toml (ModLoaderDetector).

On its own JarProbe does not download or install Minecraft/Fabric/Forge. The server is prepared with the official installers, with an accepted eula.txt - LoaderEnvironment only copies the ready folder:

  • Fabric - the installer in server mode must create fabric-server-launch.jar.
  • Forge/NeoForge (1.17+) - the installer in server mode must create run.bat/run.sh and user_jvm_args.txt (that is where the agent goes).

Limitation: Forge 1.12.2 (Java 8, started without a run script and user_jvm_args.txt, the old FML) is not supported.

The "Through the loader server" mode

Minecraft mods only - Fabric, Forge and NeoForge. Plugins (Bukkit, Spigot, Paper) and ordinary Java programs are not checked by this mode: for them there is the usual "Static + run" mode. If a jar that is not a mod is chosen in this mode, the check falls back to the usual run and the report says why.

jarprobe scan mod.jar --server                                   # a template from the library ~/.jarprobe/servers
jarprobe scan mod.jar --server-templates D:/servers              # another library
jarprobe scan mod.jar --server-template ~/servers/fabric-1.20.1  # one template, no choice

The window has the same: the "Run mode" switch, the library folder (~/.jarprobe/servers by default) and an optional separate template; the explanation of the library is folded under "How it works". The mode is off by default, and the scan goes as usual ("Static + run").

The template library is a folder where every subfolder holds a prepared server. The subfolders are usually named <loader>-<Minecraft version>-<loader version>:

~/.jarprobe/servers/
  fabric-1.20.1-0.15.11/
  fabric-1.21.1-0.16.9/
  forge-1.20.1-47.2.0/
  neoforge-1.21.1-21.1.77/

The name is only a convention: the loader and the versions are read from the folder's contents (Class-Path of fabric-server-launch.jar, the name of the single-file Fabric launcher, the libraries/… paths in the Forge/NeoForge run script, libraries/net/minecraft/server/…, version.json in server.jar); the folder name is used only when the contents have no versions.

  • The mod's requirements come from its metadata: for Fabric - depends on minecraft, fabricloader and java in fabric.mod.json; for Forge/NeoForge - the required (mandatory=true / type="required") dependencies on minecraft and forge/neoforge in mods.toml/neoforge.mods.toml, for Forge also loaderVersion. Ranges are parsed by JarProbe's own parser (Maven [1.20,1.21) and Fabric semver >=1.20 <1.21, ~1.20.1, ^0.15, 1.20.x). The Minecraft version in the file name and the Java version of the classes are only hints in the report; they do not affect the choice.
  • The newest fitting template is taken; which one and why goes into the report. If none fits, the report says what is needed (for example, "Needed is Fabric for Minecraft ~1.20.1, the template library … has no such server") and gives a link to the loader's official site (Fabric, Forge, NeoForge) - it opens in the browser. JarProbe itself downloads a server only with explicit consent - see "Automatic template install" below.
  • The server runs on the Java its Minecraft needs: 1.20.5+ - Java 21, 1.18–1.20.4 - Java 17, 26.1+ - Java 25. Java is looked for in JAVA_HOME and the usual install folders (Program Files\Java, Eclipse Adoptium, /usr/lib/jvm, ~/.jdks and so on) by their release file. The agent is built for Java 17, so servers that need Java 8/11 (Minecraft before 1.17) are not checked in this mode. No fitting Java - a fallback with an explanation.
  • The mod's loader is detected from its metadata, the template's loader from fabric-server-launch.jar or from libraries/net/minecraftforge / libraries/net/neoforged (and the references to them in the run script). They must match strictly: a Forge mod with a Fabric template (or NeoForge with Forge) is an error. An explicitly given template is also checked against the versions the mod requires.
  • The template must have eula.txt with eula=true: the Minecraft license is accepted by the user, never by JarProbe.
  • The template is neither changed nor run: a copy is made in the run folder; after the run output.log (the server console), latest.log and the server's own crash reports and jarprobe-dumps are taken from it, and the copy is deleted.
  • The server works until the readiness line Done (…)! and 10 more seconds, then JarProbe stops it with the stop command (forcibly if needed, together with child processes). The default timeout in this mode is 5 minutes (--timeout changes it; in the window turning the mode on selects "5 min").
  • If the server did not get ready, the report marks the mod as unverified and quotes the end of the server output right in the text (window, console, HTML, JSON) - the last lines of the console or, if it is empty, logs/latest.log, without the agent's own lines. The cause is visible even when the run folder is gone; the full logs are in it.
  • If a run through the server is impossible (no fitting template, a wrong folder, mismatched loaders or versions, no EULA, no needed Java, the server did not start), the scan falls back to the usual java -jar run, and the report's first reason line says "The run through the server did not happen" with the cause - a mod that was not run does not look clean.

Warning: in this mode the mod's code really runs on this machine with the user's rights - the report and the window remind of it. Do such checks in a virtual machine.

Automatic template install

If the library has no fitting template, JarProbe can install one itself. This is the only exception to the rule "JarProbe downloads nothing", and only with the user's consent:

jarprobe scan mod.jar --install-server --accept-minecraft-eula   # also turns the server mode on
  • Without both flags nothing is downloaded: the report explains which flags were missing, and the scan falls back to the usual run. --install-server without --accept-minecraft-eula is an error.
  • In the window, in the "Through the loader server" mode, the dialog appears right when the check starts if the library has no server for the mod. If you decline, the check goes as before, and the fallback report keeps the "Install the server automatically" button. The dialog shows: the loader and version, the installer's address, host and size, the target folder, Java, a link to the text of the Minecraft license (EULA) and a consent switch. While it is off, the install button is unavailable; after consent the check goes with the install (from the report it starts again), the progress is visible in the "Server install" step, and cancelling stops both the download and the installer.
  • The version is chosen from the official lists - the newest stable one that fits the mod's requirements and the installed Java: the Mojang manifest (piston-meta.mojang.com, releases only), meta.fabricmc.net (stable Minecraft, Fabric Loader and fabric-installer), Forge's promotions_slim.json (recommended first) and NeoForge's maven-metadata.xml (no betas).
  • The loader's official installer does the install: for Fabric - fabric-installer (server -dir … -mcversion … -loader … -downloadMinecraft), for Forge/NeoForge - their installer with --installServer. The installer itself downloads the Minecraft server and libraries (usually 100–300 MB), as for any player. Fabric is installed by the installer and not by the single-file launcher, so that the template is complete and nothing is downloaded on each check.
  • Download safety: the addresses are hardcoded (piston-meta.mojang.com, meta.fabricmc.net, maven.fabricmc.net, maven.minecraftforge.net, maven.neoforged.net), HTTPS only; every redirect is checked again, and leaving for another host cancels the download. Addresses from user input, from the checked jar or from the report are never used. Where the host publishes a .sha1, the installer's hash is verified.
  • eula.txt with eula=true is created only after consent. The server is installed into a temporary folder .jarprobe-install-… next to the library and moved to <loader>-<minecraft>-<version> only as a whole; on an error or cancel the half-installed folder is deleted. The installer is deleted after its work; its console stays in the template's install.log. The template stays in the library and is chosen like any other later.
  • JarProbe does not store or redistribute anyone else's files: the Minecraft server jar belongs to Mojang and lies only in the user's library.
  • Tests do not go to the network: the version lists and the "installer" are served by a local fake server on 127.0.0.1.

Java download

If the machine has no Java for the server (Minecraft 1.20.5+ - Java 21, 1.18–1.20.4 - Java 17, 26.1+ - Java 25), the user does not have to install it: with the same flags (or in the same dialog) JarProbe downloads Eclipse Temurin (JRE). It is part of the same install and follows the same rules:

  • The dialog and the console show exactly what will be downloaded: the version number and build, the archive, its size and host, the unpack folder. Without consent nothing is downloaded. If a fitting Java is already there, nothing is downloaded.
  • The list of builds is read from the Adoptium API (api.adoptium.net, the latest build of the needed version for your OS and architecture); the archives themselves are on GitHub (github.com, release-assets.githubusercontent.com, objects.githubusercontent.com) - these hosts are hardcoded too, HTTPS only, every redirect is checked. The sha256 checksum published by the API is verified before unpacking.
  • Java is unpacked into ~/.jarprobe/java/<version> (the archive's top folder is cut off, paths outside the target folder are rejected, the size is limited). First into a temporary folder next to it, so an interrupted download does not become a Java the next check picks. The archive is deleted after unpacking.
  • After that JavaRuntimes finds the downloaded Java like any other; next time it is already there and is not downloaded. To remove it, delete the folder.
  • Only Java 17, 21 and 25 are downloaded: the JarProbe agent is built for Java 17, so Minecraft before 1.17 (Java 8/11) is still not checked in the server mode.
  • If the server template is there but Java is not, Java is downloaded with the same two flags before the server starts. The window has no separate button for that: install a server or set JAVA_HOME.

Child JVMs

A program may start itself in a second JVM to hide its behaviour from the analysis. So the agent follows into child Java processes:

  • DynamicRunner and ForcedExecutor set JAVA_TOOL_OPTIONS=-javaagent:..., and every JVM started by the checked code attaches the agent by itself. If the code cleared the environment, the agent is brought back by a hook on ProcessBuilder.start - it adds -javaagent: to a java/javaw command.
  • Every event carries pid, ppid and role (main or child); all processes write to one events file. In the report events are labelled "main process" / "child process N" and grouped by process; linking with the static findings works for child JVMs too.
  • Starting its own jar in a second JVM is a separate finding, "self-relaunch in a new JVM" (HIGH).
  • The timeout and forced calls act on the whole process tree; at the end all descendants are killed.

Limitation: non-Java descendants (powershell, curl and so on) have no agent - only their start and command-line arguments are visible, not what they do inside.

Targeted runs of suspicious code

Some code does not run on an ordinary start: it waits for a certain date or fires only in an event handler. cli has two tools to provoke it; their findings are marked as a forced run (Finding.evidence gets trigger=...).

  • Time shift - the agent redirects System.currentTimeMillis, Instant.now, LocalDate.now and similar calls in the mod's code to a shifted time (TimeProvider, TimeShiftTransformer). DynamicRunner.run(jar, timeout, timeShiftMillis) runs the jar as if a future date had come - code waiting for that date fires (trigger=timeShift).
  • Forced call - ForcedExecutor takes suspicious methods from the static analysis and, in a separate JVM under the agent, calls them through reflection with stub arguments: static ones directly, instance methods (for example, a player-join handler) after creating an instance of the class. This fires event-handler code the mod does not call by itself on start (trigger=forced).

The time shift affects only code that reads the time itself (the JDK classes System/Instant are not replaced - that is dangerous, and for the native currentTimeMillis technically impossible through instrumentation). Like the ordinary run, both tools really execute the code - use them on suspicious files in a virtual machine.

Virtual machine and analyzer checks

Malware may quit when it sees a virtual machine or analysis tools. Such a check is caught in three ways (the finding category "Analysis evasion", ANALYSIS_EVASION):

  • Static (AnalysisEvasionRule, MEDIUM): the strings vmware, vbox, virtualbox, qemu, xen, parallels, wireshark, tcpview, http debugger next to reading system properties, ProcessBuilder, Runtime.exec or the string tasklist. "Next to" means the same method; a blacklist in a field or array of the class counts too, but then at least two different markers are needed.
  • Agent: reads of os.name, java.vm.name and java.vm.vendor by the checked jar's code (LOW, event ENV_PROPERTY_READ) and starting tasklist (HIGH, PROCESS_LIST). Calls of System.getProperty and Properties.getProperty in the jar's classes are redirected to EnvironmentProbe (PropertyTransformer).
  • The "hide the virtual machine" option (off by default; the --hide-vm flag and the switch on the window's home screen): the agent gives the code neutral values - os.name of the same OS family, Java HotSpot(TM) 64-Bit Server VM, Oracle Corporation - so that the check does not stop the program. The option changes the observed environment: the window shows a warning, and the text, JSON (run.vmHidden) and HTML reports and the window mark the option with a separate line. It is passed to child JVMs too. Without a run (--static-only) the option does nothing.

Limitations: only direct getProperty calls in the jar's code are replaced; reads through reflection or MethodHandle, calls from the JDK and native code are neither seen nor replaced. Hiding does not touch the output of tasklist and other signs of a virtual machine (files, drivers, MAC address).

Broken bytecode

Breaking the bytecode is an easy way to blind an analyzer: ASM refuses to read the class, and everything inside stays invisible. JarProbe does not give up in that case:

  • A class that cannot be parsed the standard way becomes a finding itself, with risk HIGH ("The bytecode of the class is broken…"): a normal compiler does not produce such a thing.
  • The constant pool is read by hand (ConstantPool) - tolerant to a broken header and broken indexes. If the pool can be walked by its header, the evidence says pool=parsed; if not, the file is scanned for Utf8-entry structures and marked pool=partly recovered (or pool=unreadable).
  • The string rules still run over the recovered strings: URLs, Discord webhooks (SuspiciousStringRule) and paths to sensitive data (SensitivePathRule). The class and method of such findings are unknown, so they point to the file.
  • A separate case is a class newer than ASM supports: this is not a trick, so the risk is MEDIUM and the wording is an honest "the bytecode was not parsed", not "broken".
  • Classes are found by the CAFEBABE signature, not only by the .class extension: a class disguised as an image or a .bin is parsed too (and the disguise itself is a HIGH finding).
  • InvokeDynamicDensityRule: the density of dynamic linking in one class. invokedynamic through a non-standard bootstrap method (8 calls or more) is HIGH - that is how obfuscators hiding call targets work. Ordinary lambdas and string concatenation are counted separately and give MEDIUM only at 40+ calls making up more than half of all calls of the class.

Where the next stage comes from

A loader almost never carries the payload with it: it fetches it from an address that is easy to change. JarProbe looks exactly at that.

  • Dead-drop addresses (DeadDropHosts) - one list of host patterns for both halves of the report: paste services (dpaste, pastebin, paste.ee, hastebin, rentry…), raw.githubusercontent.com and gist.githubusercontent.com, anonymous file dumps (transfer.sh, anonfiles.com, file.io…), temporary tunnels (ngrok, trycloudflare.com, loca.lt, serveo.net) - HIGH; free hosting (onrender.com, glitch.me, repl.co) and cdn.discordapp.com - MEDIUM. In the static analysis (SuspiciousStringRule) a pattern applies only to the host of a whole URL: without a scheme the package name io.github.….paste cannot be told from a host, so a bare string is not taken for an address. In the dynamic analysis a pattern applies to the host of a connection the agent recorded (BehaviorRules, finding derived=DEAD_DROP_CONNECT). Other URLs stay a LOW note, as before.
  • The "decode → request" chain (StagedPayloadRule): an address assembled from base64/hex (Base64.Decoder.decode, DatatypeConverter.parseBase64Binary, HexFormat.parseHex) and passed to URL/URI, followed in the same method by a request (openStream, openConnection, getInputStream, HttpClient.send, URLClassLoader, Socket) - HIGH. If decoding and a request are just near each other but the value cannot be traced to the address - MEDIUM. An ordinary download from a visible URL and decoding without a request are not findings.
  • Swappable blockchain RPC nodes (BlockchainDropRule): three or more interchangeable RPC addresses next to a method like eth_call - HIGH. In such a scheme the dead-drop address lies in the data of a smart contract, and the nodes change, so what fires is not a single host but their set. The rule collects strings across the whole jar and gives one finding at the end of the scan (the StaticRule.finish() hook).
  • A connectivity check before a self-relaunch (BehaviorRules): a connection to a public DNS (1.1.1.1, 8.8.8.8, 9.9.9.9, …) plus starting a second JVM with the same jar - HIGH. The relaunch argument itself (-restarted and the like) is not a sign: honest launchers do that too.
  • A listening socket on localhost (LocalServerSocketRule): a ServerSocket bound to 127.0.0.1, localhost, ::1 or InetAddress.getLoopbackAddress() - a LOW note: usually it guards against a second start rather than being a control channel. A ServerSocket on all interfaces gets no such note - it is left to the other rules.

All addresses in the tests and samples are fake (the .invalid domain) or point to localhost; JarProbe never opens addresses found in a jar.

Noise in the report

A mod's jar usually has more foreign code than its own: Kotlin, Mixin, Javassist, loader libraries. Their findings are not lies, but a few real ones get lost behind a hundred identical lines. The report does not hide them - it folds them and shows what exactly it folded.

  • Groups of library packages (Libraries, ReportBuilder.collapseLibraryNoise): findings from kotlin., kotlinx., org.jetbrains., javassist., org.spongepowered. (Mixin), baritone., xaero., net.fabricmc., net.minecraftforge., net.neoforged., com.mojang. and other packages of the list are gathered into a group with a counter and examples. The package list is a parameter: the rule and the report builder take their own List<Library>, and the tests pass a made-up library. Only quiet findings (MEDIUM and below) are folded; defineClass, defineHiddenClass, ProcessBuilder.start and Runtime.exec always stay in the list - hiding them in a group would mean hiding the danger.
  • The server's own work (ServerNoise, the serverActivity field of the report): a real server defines thousands of Minecraft classes on start, writes remapped classes to its file system, opens logs and sockets, and none of it is about the mod (a 1.5 MB mod gave 22 thousand findings, 7.6 thousand of them HIGH). Under every event the agent writes the frames of application code; if none of them is a class of the checked jar (nested jars included), the event is taken for the server's own business and goes into one summary, "Folded: the server's own work", with a counter, the highest risk and examples of the event kinds. Static findings in classes the server defined itself (their dumps) go there too. An event with the mod's code in its stack - through a loader callback, a mixin or its thread - stays in the ordinary lists. Process starts, self-relaunch, CRITICAL and the conclusions of the behaviour rules are never folded. The full log stays in events.jsonl in the run folder. Only for runs through the server.
  • The verdict is counted before folding the libraries. Grouping changes the look of the report, not the result: the number of findings per risk level (totals) and the verdict come from the full list.
  • Order of findings: first the ones confirmed by the run, then by falling risk, and within one level the key capabilities go first (defineClass, defineHiddenClass, ProcessBuilder.start, Runtime.exec).
  • Risk depends on the place and the address (RiskTuning): Runtime.exec in the updater of a known library (for example, Xaero) is a step quieter than the same call in unknown code; a connection to localhost is LOW, to a known mod repository (maven.fabricmc.net, api.modrinth.com, Mojang hosts…) a step quieter, to a bare public IP a step louder. Every change is written into the evidence as risk=WAS → NOW (reason), so you can see why the level differs from the rule's. Findings that already weighed the whole picture (derived=) are not touched.
  • Identical events are one line with a counter (ReportSections.collapse): 1207 calls of Class.forName from one method are shown as one entry "×1207" in the text, HTML and the window.
  • The bloat warning (LibraryBloatRule): if the jar has 200 classes or more and 70% of them are foreign libraries, the report shows a note with the numbers and the list of libraries. It is not an accusation - a Kotlin mod really carries the standard library - but the share of suspicious classes in such an archive means nothing. The note is not a finding: it does not go into totals and does not affect the verdict.
  • The window: the report is built as it scrolls into view - only the cards on the screen exist, so thousands of findings scroll smoothly even in a virtual machine without a graphics card. Long lists come in portions with "Show more" buttons, stack frames are created only when opened, a repeat is marked with a "× N" badge, and folded groups are a separate section, "Folded: findings in library packages".

Noise details

  • The jar is the library itself. If one package of the list takes almost the whole archive (95% of the classes or more, at least 20), this is not a mod with a library inside but that package itself (for example, the Xaero minimap). LibraryBloatRule adds self= to the note, and for this package the report neither lowers the risk nor folds the findings: they are shown as they are, and the note names the reason. A package name can be faked, so the report says so; nothing more is hidden than before.
  • raw.githubusercontent.com and gist - MEDIUM if the path leads to data (.json, an image), and HIGH if it leads to something executable or a payload (.jar, .class, .dll, .exe, .bin, scripts, archives). Paste services, anonymous file dumps and tunnels are HIGH with any path. By a bare host (in a run) the address counts as MEDIUM, since a connection has no extension.
  • Kotlin names with a hyphen (setColor-3pm2K6s, getSize-impl) in a class with kotlin.Metadata are not taken for "names a Java compiler does not produce": that is Kotlin's own name mangling.
  • A foreign program from a user folder. Starting a process that is not java/javaw and lies in AppData, Temp, ProgramData, Downloads, ~/.cache and similar places gives a separate CRITICAL finding (derived=FOREIGN_PROGRAM_FROM_USER_PLACE): that is how a brought-along interpreter is started.

License

JarProbe is licensed under the Mozilla Public License 2.0. You may use it, change it and ship your own versions, including ones that add code under other terms, as long as the JarProbe files you take, changed or not, stay available in source form under the MPL and keep the author notices. The program comes without any warranty.

The jars include ASM (BSD-3-Clause), Jackson (Apache-2.0), OpenJFX (GPL-2.0 with the Classpath Exception) and the Monocraft font (SIL OFL 1.1) - see THIRD-PARTY-NOTICES and the licenses folder.

About

Scanner for malicious Minecraft mods and plugins: static bytecode analysis plus a monitored run (Fabric, Forge, NeoForge, Bukkit/Spigot/Paper)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages