NickAc's Blog

How is this working at all?!

Part 1

Reversing the Biggest Brazilian Minecraft server's anti-cheating modpack


In this series we will be reverse-engineering a Minecraft 1.5.2 mod-pack built to try to stop cheaters on a Brazilian Minecraft server called CraftLandia.

Introduction

Before we start reverse-engineering the mod-pack, let us have a brief introduction of what CraftLandia is and what Minecraft servers they operate.

CraftLandia is a network of smaller "Survival" Minecraft servers where players can play together, build their own houses, fight monsters and compete against other players. They tout themselves as the biggest and oldest Minecraft server in Brazil and even have an official website that is in Portuguese.

Below is a screenshot of the website:

A screenshot of the CraftLandia website
A screenshot of the CraftLandia website

Although the server is free to play, players who throw money at them get some exclusive perks. This is a common practice around the Brazilian Minecraft community, thus it's usual to see servers milking their players' wallets. This has to do with Brazil's economy, but we won't delve into that on here.

The CraftLandia network also used to have a mini-game server called CraftLandia Minigames, but closed operations in March 2019. Nowadays, they operate the following Survival servers:

NameSupported Minecraft Version
LegacyMinecraft 1.5.2
ReplayMinecraft 1.5.2
FarewellMinecraft 1.5.2
ChronosMinecraft 1.8.x up to 1.12.x

The mod-pack and its features

The mod-pack we will be reverse-engineering is CraftLandia AntiHack. Like mentioned before, CraftLandia has built this mod-pack to try to stop cheaters on their servers.

The logo of their mod-pack, posted on the announcement thread
The logo of their mod-pack, posted on the announcement thread

The current iteration of the mod-pack was first announced here in the CraftLandia forums in March 2019. The announcement thread is in Portuguese, but I will summarize below.

Starting on March 5th 2019, CraftLandia has finished implementing the mod-pack on their Minecraft 1.5.2 servers. Players who aren't using the mod-pack will be able to play on the server, but CraftLandia will limit them access to certain server worlds:

Message players receive when attempting to join certain worlds
without the mod-pack
Message players receive when attempting to join certain worlds without the mod-pack

When players send messages in the server chat, it will display the status of the mod-pack next to their name. Players using the mod-pack will have a green checkmark next to their name, and those who don't, have a red cross instead.

In-game chat message showing the status of the mod-pack usage
In-game chat message showing the status of the mod-pack usage

The mod-pack features the Optifine mod, which is a mod aiming to improve the performance of Minecraft. It also features some HUD-based mods that display certain information on the player's screen.

This is a small mod-pack containing just 6 mods. Among them, 3 are HUD-based mods, and the other 3 are miscellaneous mods.

Here is a table with the mods and their descriptions:

NameDescription
Armor StatusThis mod displays the player's armor and their remaining durability
Auto ReconnectThis mod adds a reconnect button to the multiplayer kick screen
Direction HUDThis mod displays a compass showing the player's orientation
Macro / Keybind ModThis mod lets users create macros to automate tasks in-game
OptifineMinecraft optimization mod
Status EffectThis mod displays player potion effects

Earlier iterations

Ever since its beginnings, CraftLandia has been trying to stop cheaters on their servers. For a long time, they've used a server-sided anti-cheating plugin for detecting and banning cheaters. Since that approach wasn't enough to deter cheaters, back in October 2012, they tested by making their own mod-pack to try to stop cheaters. I couldn't find any remnants of this mod-pack on the internet, so we won't go into detail on how it works.

Then later in 2015, they announced and released a new iteration of their anti-cheating mod-pack. Their first server to use this mod-pack was their Minigames server. Later on, they also rolled it out to one of their Survival servers, which was in Beta at the time.

The mod-pack's launcher from 2015
The mod-pack's launcher from 2015

Using the mod-pack

Now that we know what the mod-pack is and what it does, let us see how to use it.

The first step is to download the mod-pack from their website. Heading to their forums, we can see a link to the mod-pack's download page:

CraftLandia forums prompting user to download mod-pack
CraftLandia forums prompting user to download mod-pack

After going through the process of downloading said mod-pack, we end up with a .zip file named CraftLandia.zip. This solely has the mod-pack's launcher jar file inside a folder. Before we're able to run it, we will need to extract the zip file and place said jar file somewhere in our file system to run it.

Below are the contents of the zip file just mentioned:

  • CraftLandia Minecraft
    • CraftLandia.jar|547798|2020-11-25 06:08

Running the mod-pack

Once we've extracted the launcher jar file from the zip file and placed it somewhere in our file system, we can run it. On every run of the launcher, it will check for updates and download them if there are any. While doing so, it downloads an updates.json file off of CraftLandia's updater CDN, as seen below:

  • CraftLandia
    • updates.json|472773|2023/02/22 22:27
  • CraftLandia.jar|548796|2023/02/22 22:27

After the launcher has finished updating, it will prompt the player to pick the server they intend to play on. As far as I know, the versions downloaded for each server are the same, but CraftLandia might intend them to be different in the future.

After picking a server, the launcher will download the game files for the version of the mod-pack that the server is using. The launcher downloads the game files from the same updater CDN.

Once the launcher has finished downloading the game files, it will (funnily enough) launch another launcher. This is a bog-standard Minecraft launcher, which will prompt the player to log in to their Minecraft account. Since CraftLandia is an offline-mode server, the player will be able to log in with any username they want in this launcher.

Upon the player clicking the big Play button, a familiar Minecraft window will appear. Once the game has finished loading, the OOBE screen of the Macro / Keybind Mod greets the player. This probably means CraftLandia was lazy and decided instead to just run the official mod distribution.

After closing off that screen, the player can see the main menu of the game. CraftLandia has modified the main menu so that it displays the server's domain on the splash text. They've also removed the Singleplayer button, leaving us with just the Jogar CraftLandia button.

Translation

Jogar CraftLandia means Play CraftLandia in Portuguese.

After clicking the Jogar CraftLandia button, we're now facing the vanilla Minecraft multiplayer menu screen. On this screen, we can select the server we want to play on and add new servers to the list by clicking the Add Server button.

As a fun experiment, I decided to try to connect to a server that wasn't CraftLandia. By pressing the Direct Connect button, we can try just that. Unsurprisingly, the game will not let us connect to a server that isn't theirs, instead giving us an error message:

Ops! [sic] You typed an invalid IP.

Seeing that we're limited to what servers we can connect to, let us just connect to CraftLandia's Farewell server. Performing a double click on the server will connect us to it.

Once we're connected and have logged in with the /login command, we can see the server's spawn, as is usual. We can also see players having custom skins, some even have custom capes, and some even are upside down!

Possibly in the next part, I will be going over the mod-pack's files and see what they do to achieve this. In this version of the game, player skins and capes used an old server that Mojang has since shut and replaced.

Closing thoughts

In this part, we've briefly gone over the mod-pack's history, its launcher, and the game files it downloads. In the next part, we will be going over the mod-pack's files and start our reverse-engineering journey. Thank you for reading!

References