Part 3: verdict plumbing (stderr is ground truth), elimination matrix, inert-by-construction proof for Route-1, honest ceiling

This commit is contained in:
2rax committed 2026-11-08 17:05:27 -05:00
1 parent f5225a7fec
commit cca4ff16cf
8 files changed
+550

No files matched your search

+124
View File
@@ -75,3 +75,127 @@ un-lifted). Only a run inside real Minecraft 1.8.9 settles it.
loader2/slinky_loader.c self-contained loader (JVM + block stub + load)
loader2/javaw.exe prebuilt, run from loader2\run\
```
---
# Part 3 — verdict plumbing, the elimination matrix, and the honest ceiling
## The status reads everyone gets wrong (we did, for a whole session)
The client has **two** callers of the one-shot validator and a guard race:
- `DllMain` reads `SLINKY_LICENSE` and **spawns a validator thread** (`+0x10F0`).
- `slinky_init` (export `+0x1000`) also validates, but first takes a
`lock cmpxchg` guard (`0x1802F9118`).
Whoever wins the race runs the real check and prints `status: %lu` to
**stderr** (`GetStdHandle(2)` + `"+status: %lu\n"` at `0x180140038`). The
loser takes the "already-initialized" path: it consumes a flag byte at
`0x1802FF010` that is **never set to a nonzero value** — so the loser
*always* returns `0` and may print a bogus `status: 0`.
In practice the spawned thread wins, so:
> **`slinky_init`'s return value is not the verdict. `stderr` is.**
All "VALID" readings from bare-host test harnesses (`keytest*.exe`,
`slinky_init -> 0`) were this artifact — the harness's own call lost the
race, while the spawned thread rejected the key and printed the real
`status:` line to a stderr file nobody was reading. Ground truth from the
stderr captures:
| build | key | host | stderr |
|---|---|---|---|
| devirt | `E984C654…8535` (blob hex) | bare JVM harness | `status: 7003` |
| devirt | `E984C654…8535` | real `javaw.exe` + MC 1.8.9 | `status: 7003` |
| devirt | `"A"*32` (right length, wrong content) | real MC | `status: 7003` |
| devirt | short key | real MC | no line (silent length path) |
| real client | real key `43A913B2…0F18` | bare JVM harness **today** | `status: 7004` |
| real client | real key | real MC **today** | `status: 7004` |
Two conclusions fall out:
1. **There is no Minecraft-vs-bare-host discriminator.** The devirt client
rejects its test key *everywhere*; the earlier "works in a bare JVM but
not in MC" split was the stderr artifact. (The real client's behavior
did change since January — it now fails in *every* host, including the
launcher-shaped ones; more below.)
2. **The real client + its real key no longer validate offline at all**
(`7004` everywhere today, `0` in January via the official launcher).
The server still reports the license active
(`GET /licenses/info → {"remaining":1285977}`), the client makes **zero**
network/API calls during validation (confirmed by TCP-table polling,
DNS-cache inspection and full API tracing), so whatever changed lives
inside the VM — plausibly a device/time-bound transform against the
`.rdata` blob.
## The elimination matrix (devirt client, real MC `javaw.exe`, verdict via stderr)
Every controlled variation below produced `status: 7003` — i.e. none of
these is the discriminator, because there is nothing to discriminate:
- injection method: clean `QueueUserAPC(LoadLibraryW)` on the game's own
threads (no loader DLL, no remote thread) vs. `CreateRemoteThread`
- calling path: env var + DllMain spawn vs. explicit `slinky_init` vs.
direct APC to the internal validator `base+0x10F0` with our own key buffer
- host process name (`javaw.exe`-named test host passes shape checks), host
binary path (launcher-runtime-shaped `jre-legacy` path), parent process
renamed `MinecraftLauncher.exe`
- JVM options: MC's exact `-Xmx/-Djava.library.path/-Djava.class.path/`
`-Dsun.java.command` replayed into a harness JVM; Mojang launcher flags
(`-XX:HeapDumpPath=MojangTricksIntelDrivers…`, `-Dos.name/-Dos.version`)
- classpath: the exact official 1.8.9 library list (log4j `2.0-beta9`,
`com.mojang:netty:1.8.8`, all 31 entries) fetched and replayed
- cmdline: realistic `--uuid/--clientId/--userType msa/--accessToken JWT/`
`--userProperties/--versionType release`, `--username 2rax`
- game state: injection at t+3 s (pre-window) vs. t+16-60 s (game booted);
a `SleepMain` JVM — MC's exact JVM/classpath but no MC classes running
- thread count: 60 dummy threads in a harness (vs MC's ~54)
- network: zero TCP connects / DNS lookups from the process during validate
(offline rejection)
- Frida API tracing during validate in MC: **zero** hookable API calls —
no JNI, wininet/winhttp/ws2_32, registry, files, windows, toolhelp,
debugger queries, volume/computer name. The VM reads what it needs
directly from memory (PEB/Ldr-class access, invisible to API hooks).
## What `status: 0` success actually does at the `.text` level
`slinky_start` (`0x180001290`) is one `lea rcx,[0x180140064]` followed by a
`call` into the VM region (`.vdvrt`, RVA `0x35556EC`) — the blob check **and
all real initialization** (JNI attach, `RegisterNatives`, game hooks) live
inside the VM. The `.text` success path after `slinky_start` returns 0 is
just: print `status: 0`, return 0. Nothing else.
Consequently the Route-1 patch (`31 C0 E9 22 00 00 00` at VA `0x1800012AE`)
= `xor eax,eax; jmp` onto `slinky_start`'s epilogue makes the client
**report success and stay resident, but it is inert by construction** — the
VM's initialization never executes. This is now a *proven* structural fact,
not an open question (it answers Part 2's "Open question": no, blocking the
unload does not unlock features).
## The honest ceiling
- **Residency in real Minecraft 1.8.9: solved** (Route-1 patch on the devirt
build, or the Route-2 kernel32 stub with any 32-char key).
- **Full client functionality: requires the VM's key transform.** The
transform maps key → blob comparison inside ~5 MB of obfuscated `.vdvrt`
code with no forgeable API surface, no network, and no static handle. The
key↔blob pairs are build-specific (`43A9… ↔ C2FE…` for the real client;
no standard hash relates them) and the devirt build's true key is unknown
(its blob hex is *not* its key — the real pair disproves that rule).
Recovering a working key means either devirtualizing `.vdvrt` or lifting
the VM's check loop at runtime — a separate project.
## Session tooling (all in the repo `tools/` folder)
- `apc_injector.c` — QueueUserAPC(LoadLibraryW) onto all target threads
(no remote thread, no loader DLL)
- `apc_injector2.c` — dll/init modes: after mapping, queues APCs directly
to `slinky_init(key)` (loader-style start with our own key buffer)
- `apc_call.c` — APC to an arbitrary address with a string parameter
- `keytest2..6.c` — harness JVMs: file-driven JVM options, tracer window,
thread bloat, real-client build, "run a Java main first" variant
- **stderr verdict technique**: launch the host with stderr redirected to a
file; the validator prints `status: %lu` there on the normal-length path.
This is the only reliable verdict channel — do not trust `slinky_init`'s
return value.