HACKING UNITY GAMES (FOR NOOBS)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Unity is an extremely popular if not the most popular cross-platform 2D and 3D game engine it's the PowerHouse behind massive titles like rust escape from talk of Call of Duty mobile and even Among Us which is pretty sus the engine has been around for nearly two decades and when it first came out it practically revolutionized the gaming industry Unity equips both artists and developers with a robust set of tools allowing them to focus on making an enjoyable game that runs on many platforms gone of the days of requiring a computer science degree just to make a video game from scratch with all of these good things being said I want to mention my favorite part about the unity game engine the fact that these games are terribly easy to hack the things that make Unity great are also the engine's downfall in terms of cheaters join me today as we take a quick tour of the unity game engine before we dive into the many ways to cheat in these games whether you're a developer or just someone who enjoys breaking games this should be interesting so be sure to stick around when it comes to making video games or even hacking them there is a certain amount of programming knowledge required I know when I was getting started I really struggled to wrap my head around many of the Core Concepts but that's exactly why this video is sponsored by brilliant.org brilliant is an online platform where you learn by doing with thousands of interactive lessons in math data analysis programming and even AI personally I love brilliant because they take a unique approach to learning instead of reading walls of text or having to listen to boring lectures their lessons are filled with Hands-On problem solving allowing you to develop an understanding of complex topics from the ground up if you don't believe me I highly recommend that you take a look at their programming with python course here you'll get familiar with python and begin building programs from day one with an interactive buil-in drag and drop editor you'll even begin learning about Core Concepts like loops and functions in their signature interactive fashion so what are you waiting for to try everything brilliant has to offer for free for a full 30 days visit brilliant.org slcas or click on the link in the description you'll also get 20% of their annual premium subscription thanks for listening and let's get back to the video here we are looking at a brand new 3D scene in the unity editor a scene is simply a collection of game objects which begs the question what's a game object well if we take a look at the hierarchy window to the right we find three items inside of our so-called sample scene a main camera a directional light and a global volume these three things are in fact game objects realistically anything you can put into a scene is a game object so let's make this a bit more interesting by adding a simple Cube we do this by right clicking in the hierarchy view selecting 3D object and then Cube immediately we notice that a cube has been added to our scene you can click and drag on this Cube to move it around but more importantly the window to our left known as the inspector has suddenly been populated with values the inspector window shows the so-called components of the game object that you have selected components are like building blocks they are properties and behaviors that belong to the game object there are hundreds of components to choose from and by applying different components to different objects we can create complex behaviors and ultimately fully functional games the transform component is a very special one because every single game object in unity has to have one transform describes an object's position rotation and scale within a scene with my Cube selected if I start messing around with the position Fields you'll notice the cube move around in the scene this is cool and all but right now our Cube does nothing let's say we wanted to make our cube move when the player presses WD well we can do that by attaching a scripts to The Cube scripts allow us to modify the properties of the components programmatically with code specifically C code which is a joy to work with to add a script to our Cube make sure it's selected and then hit the add component button at the bottom of the inspector the component will be of type new script go ahead and click that we'll be naming our script cube move and then you can simply click the create and add button you'll now notice that our Cube has a new component that being the cube move script that we just created but right now it does absolutely nothing at the bottom of our screen within the project tab you'll notice that a new file has been added specifically this file has a little script icon along with the name cube move I'm going to double click this file to open it up in my favorite editor Visual Studio code once open we notice a simple class called cube move which inherits from mono Behavior the class also has two empty methods namely start and update reading the comments above each of these methods gives us a hint as to what they do the start method is called once before the first frame update whereas the update method is called constantly every single frame of the game these are fixed Unity events basically we never have to call these methods instead Unity will call them for us to move our Cube we're going to be working within the update method so we can go ahead and remove the start method entirely within update the first thing we want to do is access unity's input system to determine what the player is trying to do we'll create a local variable called move input which will be a 3D Vector storing the direction in which the player wants to move by using input. getet access with the parameters horizontal and vertical we have a universal way of getting the player's movement Direction this will work with wda and arrow keys alike next all we need to do is update the position field of the transform component of the cube we do that by multiplying the move input by a constant speed in our case 30 and then multiplying that by Delta time which is a topic for a later video make sure to use the plus equal sign to add the movement onto the current position and voila we should now be able to move our queue back in the editor if we click the play button at the top the game should run and when you click W or S the cube should move up and down when you click a or D the cube should also move left and right of course the cube can't move forward or backwards right now because we set Zed to zero I hope this gives you a basic understanding of how Unity games work we create scenes which contain game objects we then add components to the game objects to make them do things within the scenes large games use these exact same Concepts just at a much larger scale to do much more complex things we cannot talk about hacking Unity games without mentioning the various run times that Unity games can be exported with obviously Unity is a cross-platform game engine and therefore to run your game on different platforms we need programs and libraries installed on said platforms that understand how to run the game because Windows holds the largest desktop gaming market share we'll mainly be focusing on Windows but these Concepts will still apply to the other platforms as well Unity games for Windows can be exported in one of two ways either through the monor runtime or through a special procedure known as is 2 CPP mono is a popular open source runtime that essentially starts a virtual machine and runs the game in there this is similar to how Java applications run in the Java virtual machine specifically it uses something called just in time or jit compilation allowing it to execute faster than programs that are not compiled at all like a python script for example essentially when you run your game with mono the game has been compiled into something called common Intermediate Language or Cil for short mono can understand Cil so when you run your game mono starts its virtual machine and runs the semic compiled code in there allowing you to play said game mono is generally used for small to medium games as it is simple easier to run on other platforms but not the most efficient in terms of hacking mono games are the easiest to hack because the process of compiling to Cil is very easily reversed basically allowing us to get the game's entire source code with just the click of a button this is very different to games that are coded in C or C++ because the compilation process involved with those languages is not reversible instead we are left with a binary file that can only be represented as assembly code yes there are so-called decompilers but these only produce pseudo code which is effectively a guess as to what the assembly does not to mention that all the information like class names function names and variable names are completely lost when compiling a c or C++ program this takes us to the special procedure that I mentioned earlier the other way to export Unity games for Windows is through 2 CPP I2 CPP is an acronym for Intermediate Language to C++ basically the game's C code is compiled into Cil just like before but instead of running this code in a virtual machine like mono there's an extra step of converting the Intermediate Language directly into C++ and then compiling it this outputs a native system binary which will be platform specific but there are two benefits for game developers when doing this the first benefit is that the code runs considerably faster because it is n to the system and the second benefit is that by virtue of the I2 CPP process it makes the game slightly more difficult to hack unity game developers with more than three brain cells are obviously aware that their games are easy to take apart so there are a few counter measures that developers employ to make hackers lives a bit more difficult I've already partially mentioned one of these techniques earlier when I was talking about I 2 CPP I said that one of the benefits of using it is the fact that it makes the life of a hacker slightly more difficult this is because the procedure partially obfuscates the game's code unfortunately for game developers though al2 CPP also exports a ton of metad dat with the game which can be used to un obfuscate the code this brings us to the first form of protection that game developers use code obfuscation specifically name mangling when C is compiled into Cil an uncomfortable amount of data about the source code is preserved including class method and variable names this is obviously a dream for hackers because we are usually working with complete gibberish the names of classes methods and variables easily tell us exactly what the code is trying to do and therefore it makes it a walk in the park to hack such things what some smart developers do is they use a Unity plugin to mangle the names of all these entities turning them into gibberish of course we still see that they are there we can also still see what they are doing we just no longer have the added information of the name the other form of protection that Unity developers use is a lot more obvious we call them anti-cheats large multiplayer games like rust or escape from talkov employ kernel level anti-cheats this is obviously expensive for the game company and let's not pretend that such anti-cheats are perfect because they aren't these games still have massive cheating problems but at the very least it stops Pacers and skids from easily hacking their games the final way that Unity developers might protect their games is by encrypting certain metadata files earlier I mentioned that I2 CPP makes it harder to hack but the procedure also exports a ton of metadata that we can used to unop escate most of the code one way to stop Hackers from doing this is to encrypt said metadata files effectively stopping Hackers from revealing the important information this is not that effective though as at some point the game has to unencrypt the encrypted and therefore if a hacker can find where or how that is happening they can simply emulate the behavior to unencrypt the metadata not to mention simply dumping the metadata at runtime once it's been unencrypted is another simpler option generally speaking most Unity games use no counter measures at all I'm not really sure why but I'm not complaining either of the games that are protected the most common form is partial or full obfuscation there are very few popular Unity games that are exported as I2 CPP with full obfuscation encrypted metadata and a kernel anti-che and even those games still have hacking [Music] problems when it comes to Mono games they are definitely the easiest and most fun to hack while this video is not meant to be a tutorial I'd still like to demonstrate just how simple it can be to hack these games this is a game called terch where you drive around as a tank and you can make your tank better by destroying others and stealing their blocks taking a look at this game on my disk we find a mono bleeding edge folder which indicates to us that this is in fact a mono game I'm now going to direct you to this GitHub repository it's an open source program called DN spy you can download it by either compiling the source code yourself or by heading to the releases Tab and downloading the latest version for your platform in my case that's 64-bit windows once you've downloaded the zip I suggest you create a dnspy folder and extract the contents into there you can now run DN spy. exe in the top left hover over file and select open navigate to your game's directory and then navigate into the folder postfixed with data in my case this is terch 64 data then navigate to the manage folder and open up assembly C dlll just like that it's almost like magic you now have access to basically every single class method and variable found in the game you can then press control shift k or hover over the edit tab in the top left and select search assemblies in order to search through all these class method and variable names in my case if I wanted to find the local player I can simply search for player and we find a variable called underscore player tank double clicking on the result takes me to a class called Singleton which probably means that this is my local player being stored in a Singleton instance if I right click on a random method in this class and select edit method I can now edit this function in any way I like before recompiling and having the change just take effect next time I run the game I hope you can appreciate just how broken and easy this is I 2 CPP makes this process a little bit more difficult if we take Bloons td6 for example opening the game up on our disc we find a Bloons td6 data folder similar to a mono game but this time No Mono beding Edge folder within the data folder we find an I2 cpor data folder which indicates to us that this game is of course using il2 CPP notice that we don't have any assembly C sh dll file to open in DN spy though but if you take a look at the metad DAT folder within the il2cpp data folder you'll find a global metadata file which we can use to dump the C assembly from The Game's binary files I'm going to point you to this GitHub repository called I 2 CPP dumper you can head to the releases Tab and I suggest downloading the normal Windows version without net next create an I2 CPP dumper folder somewhere and extract the contents run I2 CPP dumper and then navigate to your game G directory the file it's looking for is the game assembly. DL that should be found in the game's root directory after you've selected that give the dumper your Global metadata file and let the magic happen within your I2 CPP dumper folder you should Now find a newly generated folder called dummy dlll within there you should be able to find a dumped version of The Game's assembly you can now once again open assembly C dlll in DN spy and begin looking through the game one important thing to understand now though is that you can still see the class and Method names but you can no longer see see what these methods are doing in order to do that you need to open up game assembly dlll in a program like Ida Pro remember to rebase the program to zero then if you take a look at the method in dnspy you'll find something called RVA with an offset next to it this is known as the relative virtual address and if you navigate to this offset in Ida Pro you'll find the accompanying assembly code for this function because remember it was converted to C++ and then compiled you can then rename it and decompile it to get an idea of what the function is doing furthermore i2cp dumper will also generate Python scripts for Ida and gidra to basically rename your entire database with the correct method structure and field names and sizes and even on top of this it will also generate an is2 C.H file that you can use in your hacks to mimic the game in conclusion Unity games are extremely easy to hack and I hope I've proven that to you in this video I also hope you have a better understanding of the unity engine as a whole it's a decent game engine even if the company is incompetent but before I go I'd like to mention a special program called melon loader the link will of course be in the description but it's basically a universal mod loader for Unity games it works with both mono and I 2 CPP as well it has built in imgui support and many more features that make developing mods and by extension cheats extremely easy it was simple in the first place but now it's brain dead thanks for watching the video and I hope you enjoyed it feel free to like And subscribe along with checking out my patreon and other socials in the description down below leave a comment about what you thought and and definitely look forward to more content in the future shout out to my sexy patrons and until next time cheers and peace out
Info
Channel: cazz
Views: 68,204
Rating: undefined out of 5
Keywords: csgo, bunnyhop, bhop, bhopping, external, csgo hack, tutorial, csgo hack tutorial, free csgo hack, csgo cheat, csgo tutorial, hacks csgo, wall hacks, hack, aimbot, csgo aimbot, skin changer, 2022, imgui, esp, legitbot, overlay, external overlay, hacking, cheat, learn, hacker, game, cheats, cazz, cpp, hacks, pro, reclass, ghidra, engine, games, c++, C++, menu, dear, 2023, kernel, windows, driver, bypass, anti, anticheat, pattern, sig, scan, aiming, cs, hook, hooking, x86, first, be, km, kdmapper, unity, mod, modding
Id: UJEb3LcftzA
Channel Id: undefined
Length: 16min 11sec (971 seconds)
Published: Wed Jun 05 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.