INTRODUCTION : WHY IT IS IMPORTANT TO PROTECT YOUR .NET CODE
To cheat in a video game it is possible to alter the data directly from the memory. This is how "injection" cheats work. Below is a very simple diagram showing you the - simplified - procedure of how it works.
We were approached by an independent developer who managed a software coded in C#. This software made it possible to avoid certain users from abusing the Minecraft video games. The most important functionality of this software was very simple: it involved scanning the memory, creating a report with the content of the memory, then passing this data on a remote server. The server analyzed the report and returned a "Good" message if the report contained nothing suspicious, and returned a "Bad" message otherwise. The game is launched correctly if and only if the anticheat software receives a "Good" message from the server. You can see in a simplified way how its software comes into play between the user and the video game with that diagram bellow.
The problem is that it is actually very easy to modify the software so that it thinks it receives the "Good" message every time it communicates with the server. In fact as on the diagram below you can note that there are three simple things to do: prevent outgoing communication with the server, prevent creation of reports by memory scan, and prevent the server from influencing the program. In this way, anyone can continue to cheat as they see fit, which completely affects the operation of the anticheat and reduces the quality of play on Minecraft servers. Any software written with the .NET framework can be opened in a decompiler, like dnSpy (https://github.com/0xd4d/dnSpy/), and its source code can be modified very easily.