![]() Now you can compile your DLL and Inject it into the game and test it! So to fix this we edit the line at the bottom to this: This is because Unity can Cache your DLL once injected and even when re-injecting it will still load the old code. You may need to open up properties in the solution explorer above references and edit AssemblyInfo.cs if when you unload the DLL and and re-inject it does not run updated code If(Input.GetKeyDown(Ke圜ode.Delete)) // Will just unload our DLL So next is the best part! actually learning how the game works and creating our hack!Ĭreate a new file named Main.cs (can be what ever you want) I would suggest if you are interested to go read up on some Unity tutorials and it will teach you how it works as they will do a much better job that I will Once our injector has injected our DLL it uses the namespace class and method you define to run our DLL codeĪnd the injector calls our Init function which if you know about Unity this is just creating a new GameObject adding our "main" cs file as a component which will contain our hacks. Here is my first tutorial I hope it is useful! Any reasonable questions are welcome!įirst create a new project and in the Visual C# menu click on Class Library (.NET Framework) call it what you want. Here is an excellent mono injection tutorial by all It has the same effect as hooking a function basically, you run your code and the games original code. ![]() Mono injection is a technique of writing your own C# assembly and injecting it into the game engine, you essentially override game functions with your own functions. Mono Injection - the best way to hack unity games If the game has integrity checks, which most good multiplayer games will, this will not work. If the game doesn't have integrity checks, and especially for single player games you can simple modify the Assembly-cSharp.dll using a decompiler and save it. We don't have tutorials for it but a bunch: But here is a IL2CPPDumper as well:Ĭheat Engine has basic features to view Unity game data as well. If your game is using IL2CPP skip this tutorial and just use native game hacking methods is probably best. This is more efficient and makes hacking the games more difficult so we are seeing more and more games use it. Some games are using IL2CPP which compiles the game code to C++ then to assembly, which makes decompiling with dnSpy and mono injection impossible. Even with the names stripped, it is easy to reverse engineer functions like this. Other times the developer will strip these out or obfuscate it. Sometimes it will include all the names of the structures, variables and functions. Not all the functions and structs the game uses will be in the Assembly-CSharp.dll. Keep in mind all the game engine code won't be in there, it's just the game logic. You will see the structures and the functions. You can statically analyze the game code using a. Thanks providing a ton of information on reversing this game If you're thinking of using the native route of hacking and not using mono injection please view this thread to understand how much work it is. What's good about this is you can easily de-compile and modify this file using dnSpy which is a. ![]() Second thing you will see is that Unity games code is located in an Assembly-CSharp.dll module and not in the main EXE. I don't recommend trying to go after multilevel pointers in most Unity games. For that reason pattern scanning and hooking is typically easier. Game engines add another layer of abstraction and often utilize alot of inheritance, overloading and polymorphism which makes reversing them more difficult.įirst thing you will notice is that it is hard to find pointers that work after you restart the game in Unity games. They have their own methods of loading dynamic code and data. But game engines are large infrastructures that load and run the game logic that the developers of the actual game create. The way memory is mapped and the executable is loaded into memory is predictable and follows the same pattern every time, it's just how the PE file format and the Windows loader works. In a regular native game you can typically find pointers and offsets and use them easily. Any game that uses a modern game engine requires a special approach and Unity games are no exception. Hacking Unity Games is different than native games.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |