top | item 29615428

Nocom – 2b2t Minecraft server exploit using Monte-Carlo localization

208 points| cyber_kinetist | 4 years ago |github.com

80 comments

order
[+] cityofdelusion|4 years ago|reply
If anyone else was lost like myself, here is the rundown. The linked github readme assumes prior knowledge of 2b2t.

This is an exploit for a very old Minecraft server (called 2b2t) where griefing (destroying other creations) and hacking is basically allowed. This kind of environment means that groups of players are incentivized to hide their projects out in the middle of nowhere, hundreds of thousands of blocks away from the world origin coordinates. The exploit allows a client to ask the server if data chunks at arbitrary coordinates have player activity in them, opening the server up to a brute force search to locate well-hidden bases.

Basically, a group got spy satellites in an anarchy Minecraft server where remaining hidden is critical to not being destroyed.

[+] Bluecobra|4 years ago|reply
This is a pretty clever exploit. I played on this server off and on between 2013-2016. The server is/was an acquired taste. The biggest challenge was to escape the the hellscape around spawn, once you get past that it was pretty quiet, I don’t ever recall running into anyone else unless I went back to the nether hub near spawn. It was really fun exploring old builds, the griefed ones were like old ruins. I liked to read the signs that were left behind and leave my own. I used to have use sone map mod and would note all the neat things I came across.

I admit that I also used an x-ray mod to detect things like chests, because why not? I wonder if any of my bases were ever discovered. Most of my ill gotten gains were hidden away in a bottom of a mineshaft in the middle of nowhere to help avoid detection.

Once the queue started started to get long I stopped playing.

[+] rvnx|4 years ago|reply
In Minecraft you can dig blocks.

When you click to dig a block, it just calls the RPC method CPacketPlayerDigging with the coordinates of the block.

The server replies "Block of type ABC is too far".

So, of course, you now know that at (X,Y,Z) you have a block of type "ABC".

This RPC has no rate-limiting, so yes, you can know the whole map.

The fact that you can dig any block on the map, seems like a shortcut taken by developers of the server to save time or resources.

I'd even say it's almost intended behaviour.

Tech details: https://2b2t.miraheze.org/wiki/Nocom

[+] kingcharles|4 years ago|reply
Thank you. I had no idea what was going on. This is actually pretty neat once you explain it.
[+] cyber_kinetist|4 years ago|reply
Here's the FitMC Youtube video that first announced the exploit: https://www.youtube.com/watch?v=elqAh3GWRpA

A 2b2t wiki page about the exploit: https://2b2t.miraheze.org/wiki/Nocom

The teaser video: https://www.youtube.com/watch?v=3ayxeruAan8

[+] 323|4 years ago|reply
I second the first video, it's extremely well done, and as someone who never played minecraft I almost understood what happened.
[+] bastardoperator|4 years ago|reply
"2b2t ,the oldest anarchy server in Minecraft" - FitMC (every video)
[+] H8crilA|4 years ago|reply
This is from the same guy who coded Baritone:

https://youtu.be/CZkLXWo4Fg4?t=78

Extremely useful on anarchy servers, in fact the entire current "era" of anarchy is called "The Automation Period" mostly due to Baritone.

[+] leijurv|4 years ago|reply
I actually helped convince Sato in Feb 2020 to call it "automation period"; some other ideas were "age of fragmentation" (referring to how group alleigances were becoming split, with players in more than one group at a time) or "age of the algorithm" (referring to the YouTube algorithm promoting the server).
[+] leijurv|4 years ago|reply
Surprised to see this posted again, I wrote this, feel free to ask me anything!
[+] ucarion|4 years ago|reply
I'm curious what kind of tooling you developed as part of this process. It seems, from the linked YouTube video, like individuals were actively monitoring the data produced from the exfiltration attack. How did you go from the raw data to producing something that people could usefully monitor?
[+] barneygale|4 years ago|reply
Hello! I'm the original owner of the 'BibleBot' account/bot. Glad to see you put it to good use :-)
[+] gwern|4 years ago|reply
Why did it take them so long to discover the issue when you and another group were practically DoSing them every second for years on end (and they kept lowering the packet limit)? Didn't they ever wonder what it was all for or what the outgoing packets contained?
[+] snowycat|4 years ago|reply
Really impressive project! How did you learn all the things that you needed to make this? Are there any particular books or resources you would recommend? Also, how much did this entire project cost? I'd imagine processing that much data and storing it wasn't cheap.
[+] phgn|4 years ago|reply
This whole project is incredibly impressive, good job!

How much time would you say went into this both from yourself and the others? Probably quite a lot over the years? (because again, it's very impressive)

[+] tommsy64|4 years ago|reply
I'm curious how you developed the "very cute headless" Minecraft client. Did you use the Forge build tools? How did you go about ripping out the rendering/keyboard stuff?
[+] fffobar|4 years ago|reply
Tracking was completely broken by any teleporation, right? Such as enderpearl loading or a respawn at the bed.

Also, how many login sessions would it take to associate a track with an account?

[+] ajkjk|4 years ago|reply
Why did you do all this? I mean.. it's a ton of engineering, for what? For fun?
[+] potatoman22|4 years ago|reply
Did you use some form of Bayesian statistics to choose which chunk to query?
[+] heartbeats|4 years ago|reply
How accurate a map did you end up with?
[+] ThouYS|4 years ago|reply
what's your take on university as opposed to learning by doing? how do they complement each other?
[+] meibo|4 years ago|reply
What confuses me about this is that no one else found it?

Being somewhat experienced at game networking and writing server code with this type of exploit(e.g. sending a packet to do something at the other end of the map and processing the result) in mind, this would be something I either would have checked for in the first place if performance would have allowed for it, or would have kept in the back of my mind in case I hear about a possible exploit that takes advantage of it.

[+] leijurv|4 years ago|reply
One reason might be that this only existed in Paper, which is a downstream fork of Spigot, which is (sort of) a downstream fork of CraftBukkit, which is a set of patches to the official minecraft server.

Another reason might be that this only does anything if there are many players on the server, and you hit a region loaded by someone else. Might be difficult to think of that. You'd never come across it if testing in singleplayer.

But in essence I agree, it's surprising that no one else found and reported this years ago!

[+] itronitron|4 years ago|reply
For most multiplayer MC servers, this sort of exploit isn't worth the time because there are commands available to players to find nearby players and their bases (so they can check out each other's builds or participate in the local economy.)
[+] Sesse__|4 years ago|reply
What confuses _me_ about this is that nothing seems to say what it _is_. It's like there's some giant practical joke I'm not a part of, and the README.md just throws off heatmaps and wants me to watch a 24-minute YouTube video. Is everybody supposed to be a Minecraft expert? Is a simple paragraph of what this is all about (at the very beginning of the file) too much? :-)
[+] w-ll|4 years ago|reply
Why would the `mineblock` packet not be clamped to at least the render distance or more realistic the chunk the sender is in and the 8 adjacent chunks. I know i'm learning about this in hindsight and it's obvious.
[+] leijurv|4 years ago|reply
Yes, so Minecraft is exactly that. Any "I have mined this block" further than 6 blocks away from the player is ignored. The problem is that on a laggy server, an honest client can end up sending this, if the server lags out for more than 6 blocks of walking your player forward. So, Paper added a patch to undo these disallowed mines, setting them back to what they were. But this happened at any radius, and could be used to lag the server by making it generate any region. Then they patched it again and made it only reply if it were in a loaded chunk. The mistake was that it replies if the coordinate is in a chunk loaded by any player, not just by your player. :) See https://news.ycombinator.com/item?id=29620852
[+] TheJoeMan|4 years ago|reply
I learned some of the Monte Carlo techniques in my medical imaging classes, it’s very interesting the data one can fish out with a good-enough graph.

I also find the adaptive location “pinging” quite interesting, reminds me of the tech behind the F-22 active radar.

[+] bobsmooth|4 years ago|reply
My favourite part of this has to be the social engineering used to get the exploit patched in.
[+] kregasaurusrex|4 years ago|reply
The code used in the exploit itself itself looks rather harmless, as it was created to be a mitigation against finding players based on previously loaded chunks. https://github.com/PaperMC/Paper/blob/ver/1.12.2/Spigot-Serv...
[+] leijurv|4 years ago|reply
That is not correct, this patch is meant to prevent block break desync, which is when your client and the server disagree about what blocks are placed in the world. If the server discards/ignores anything your client sends, the server MUST reply telling the client to undo that action, otherwise desync occurs. (e.g. "i have broken this block" -> the client is too far to reach that block -> the server has to reply with "set that block back to air").

The original version of this patch https://github.com/PaperMC/Paper/blob/d934dcc1e3e8b1ac34acef... fixed that desync, but it allowed you to force the server to generate an unlimited amount of chunks, which is an expensive operation.

You could only find players using this patch after it was modified to only reply if the chunk was already loaded. But at no point in time was this patch able to reveal if a chunk had been previously generated or not, that is a separate unrelated issue in which Spigot will reliably send a partial chunk on initial generation, but never for a previously generated chunk.

Take a look at https://2b2t.miraheze.org/wiki/Nocom

[+] the_gipsy|4 years ago|reply
This is brilliant!

Ah, gives me nostalgia of civcraft conspiracies...

[+] thegjp210|4 years ago|reply
good to see some other civcraft alumni on HN. What an experience...