Randar: A Minecraft exploit that uses LLL lattice reduction to crack server RNG
Minecraft reused a single global java.util.Random for both deterministic world generation and supposedly unpredictable in-game actions, so the exact drop position of a mined block leaks the generator's internal state. An attacker could reverse that state to work out which chunk was most recently loaded, revealing other players' coordinates.
github.com
Published on github.com
History
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the code reseeded the shared global random generator while checking structure placement on every chunk load, instead of using a separate local generator, so deterministic world generation and gameplay randomness shared one predictable state.
Impact
An attacker could locate other players anywhere in the world, and because recorded packet logs can be exploited retroactively, every location active on affected versions should be considered compromised even after a server updates.
What the attacker needed
Server on Beta 1.8 to 1.12.2; ability to mine blocks and observe drops; knowledge of the world seed
The fix
The code should have created a separate local random generator for the structure check rather than reseeding the shared global one.
How it was found
- A victim player walks around, causing a chunk to be loaded on the server.
- The server checks for a Woodland Mansion in that chunk, which resets the global random generator's seed based on the chunk coordinates.
- An attacker's bot mines a block shortly afterwards and records the timestamp and the precise drop coordinates.
- The attacker uses lattice reduction on the three consecutive float outputs to recover the generator's exact internal state.
- The attacker steps the state backwards until it matches a Woodland Mansion check, identifying the most recently loaded chunk.
- Hits are collected into a heatmap and hotspots are visited in game.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Computers generate 'random' numbers with a formula, so if you know the formula and the current internal number (the seed), you can predict every number that follows. Minecraft used one shared generator for both map generation and small in-game events, so watching where a mined block's item lands told the attacker the generator's current number. From that they could step the numbers backwards to learn which part of the map had just been loaded, and therefore where another player was.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.