- original's .text is unpacked in-place at runtime; license cluster is byte-identical to the devirt dump (verified via runtime dumps) - byte patches on the client are DETECTED AND REVERTED (~2.5s) by its integrity self-repair; re-patching hard-fails init -> don't patch bytes - license check uses zero CryptoAPI calls (custom VM math, not forgeable) - crack: 7-byte stub on kernel32!FreeLibraryAndExitThread -> ExitThread in the host process; failed license then leaves the client resident - loader2/slinky_loader.c: full verified flow (Java 8 VM + env + stub + load) - differential key tests, dry-run host requirements documented in README_part2.md
3.6 KiB
Part 2 — the original packed binary (lib_beta_win)
The devirt dump's 7-byte patch cannot be applied to the original: its .text
has raw size 0 on disk (everything except .slinky2 is unpacked into
memory by the entry at runtime). So the crack had to be ported as a
runtime technique.
What was established experimentally (no debugger — the client refuses to
run under one; Frida 17 was NOT detected, plain runs only)
- Runtime layout = devirt layout. The entry unpacks native
.textin-place at the loader-mapped base. Runtime dumps prove the license cluster is byte-identical to the devirt dump: thread proc+0x10F0(incl. the0x1B5Bfailure constant), init+0x1220,validate()+0x1290with the samelea rcx,[0x140064]at+0x12AE. - Environment requirements. The entry requires a live Java 8 VM
(
JNI_CreateJavaVM) and ajavaw.exehost; otherwise the process dies or init fails duringLoadLibraryW. On failure ofDllMainthe client delists itself from the loader on purpose — thatGLE=487is normal. - Differential key test (plain runs, status output):
- 32-char key →
status: 7003(VM check ran, failed with0x1B5B) - 31/33-char key → no output (length path dies inside VM'd message code)
- env var absent → no output (license thread never spawned)
- 32-char key →
- Byte patches are detected and reverted. An in-flight patch of
validate()landed at tick ~1.1s and was restored to the original bytes by tick ~3.7s (integrity self-repair or a late second unpack pass). Re-patching trips detection: harder init failure (GLE=1114), license thread never runs. Conclusion: do not byte-patch this client. - The key check uses no forgeable API surface. Full API tracing shows zero CryptoAPI calls during validation — the math is custom VM code.
The crack: block the self-unload
The lifted thread-proc shows the ONLY observable effect of a failed license is
Sleep(1000); FreeLibraryAndExitThread(hinst, 0) — on success it does nothing
else. Runtime tracing confirms FreeLibraryAndExitThread is the only thing
that ever unmaps the client. Therefore:
kernel32!FreeLibraryAndExitThread := mov ecx,edx ; jmp ExitThread (7 bytes)
applied in the host process (copy-on-write on kernel32 — the client's own
bytes are never touched, so its integrity self-repair sees nothing).
Any 32-char SLINKY_LICENSE then leaves the client permanently resident.
loader2/slinky_loader.c implements the complete flow: Java 8 VM creation,
env var, the 7-byte stub, LoadLibraryW of the client. Verified output:
[loader] SLINKY_LICENSE=WRONGKEY-THIS-IS-NOT-A-REAL-KEY!
[loader] JNI_CreateJavaVM -> 0
[loader] self-unload blocked @ kernel32!FreeLibraryAndExitThread ...
[loader] client -> 0x7FFCA85F0000 (GLE=487; normal - it delists itself)
[loader] client resident after 30s
status: 7003 <- license fails, client stays anyway
For real injection into Minecraft
Inside the real javaw.exe (which already has a JVM), only two things are
needed before the client loads: the same 7-byte kernel32 stub and a 32-char
SLINKY_LICENSE. The loader2 source shows both; the same code can be built
as an injectable DLL.
Open question
Whether every feature unlocks with the unload blocked (the lifted wrapper suggests success sets no additional state, but part of the VM remains un-lifted). Only a run inside real Minecraft 1.8.9 settles it.
Repo additions for part 2
loader2/slinky_loader.c self-contained loader (JVM + block stub + load)
loader2/javaw.exe prebuilt, run from loader2\run\