Transcript for:
Reverse Engineering in Game Hacking

reverse engineering is the most important part of game hacking before you can exploit something you must discover its vulnerabilities game hackers use a suite of tools in conjunction with a deep knowledge of computer science to systematically break down video games today I want to explore some of the fundamental concepts and programs behind reverse engineering and I hope you stick around because you might just learn something new before we get into it today's video is sponsored by brilliant.org the world of computer science is ever-changing and evolving you must be constantly improving yourself to keep up and that's precisely why I partnered with brilliant brilliant is an online problem-solving platform that offers thousands of lessons on subjects ranging from fundamental mathematics to Advanced Computer Science the reason I really like brilliant is because they don't just teach you Theory Britain takes a Hands-On and engaging approach to learning their courses are interactive and Visually stimulating with brilliant you won't just be memorizing formulas and regurgitating them rather you'll be solving problems and learning because this video is about reverse engineering I'd love to recommend you their course on computer memory I wish I had it when I was getting started because this course takes you from Basic things like the stack and the Heap through virtual memory and even things like optimization and shared libraries so whether you're a student looking to Acer exams or a professional looking to upskill you can try everything brilliant has to offer free for a full 30 Days by visiting brilliant.org forward slash cats or by clicking the link in the description down below the first 200 of you will get 20 of brilliant's annual premium subscription thanks for listening and let's get back to the video reverse engineering is the process of analyzing a product or system to understand how it was designed and how it works when you download a video game you don't actually have access to the source code it's very likely that your video game has been compiled into machine code which isn't exactly readable to humans when you run a video game all the important information such as your health your ammunition and so on are stored in random access memory we use reverse engineering primarily to find the addresses of these important variables along with understanding how the program behaves there are two major type types of reverse engineering static and dynamic static analysis takes place while your program is not running it's static because you're simply inspecting the structure and logic of the program Dynamic analysis takes place while the program is running we use it to examine the behavior of a program reverse engineering techniques are usually used by cyber Security Experts during the exploration of malicious software many programmers and game developers also make extensive use of debuggers to test the runtime behavior of their programs my point is that reverse engineering is used everywhere and even if you aren't interested in hacking video games it's still an extremely important skill to acquire for developing high quality software let me say that just like with programming there's no simple way to get good at reverse engineering all you can do is keep trying repeatedly your skill is essentially directly proportional to the amount of experience you have with that being said there are a few things that will speed up your progress having experience with lower level languages like C or C plus will be extremely beneficial to you if you're proficient with those languages it already means that you are familiar with memory in terms of pointers references and addresses next taking some time to study assembly code will be absolutely invaluable almost every dimension of reverse engineering will have you interacting with assembly code you don't have to become an assembly professional you just can't be scared of it when you see it most people including myself have their first taste of reverse engineering through cheat engine cheat engine is a free and open source program that is designed for modifying single player games it has a ton of features including a memory scanner multiple debuggers a disassembler and much more cheat engine is popular because users can create so-called cheat tables shareable scripts that run within the cheat engine environment users with little to no programming experience can reverse engineer and Implement cheats without having to write code and furthermore as I mentioned they are shareable you won't really find experienced cheat developers using cheat engine for tables though rather you'll find them using cheat engine exclusively for the memory scanner and debuggers in terms of static reverse engineering you're going to want a dedicated disassembler and the most popular one is Ida Pro Ida stands for the interactive disassembler and it's a wonderful program but a license is going to set you back a couple thousand dollars luckily if you can't get yourself a copy of Ida Pro the National Security Agency has released their free and open source alternative called ghidra these programs are obviously very different but their intentions are the same Ida Pro and gedra are both primarily disassemblers they also come with debuggers and best of all decompilers earlier I mentioned that when you download a video game you don't have access to the source code a decompiler is a program that generates C pseudocode from the disassembly it's about as close to source code as you can get decompilers are not perfect and sometimes the pseudocode generation is completely off hence you should not rely on them rather focus on learning assembly code because disassembly will almost never fail you if you can understand it when you open a program in Ida or guidra it will be analyzed and the disassembly will be stored in a database on your disk when you rename functions and variables these changes are saved to a database this way over a long period of time you slowly begin to rebuild the program from the inside out don't make the mistake of thinking that reverse engineering is a quick process it even takes long for the people who make it look easy I've mentioned debuggers a few times already but I have yet to explain what they are a debugger is a program that lets you set breakpoints at different steps during a program's execution you can think of a breakpoint as a pressure plate or a tripwire once the target program reaches a breakpoint the debugger raises an exception and pauses the program's execution once paused the debugger will show a wealth of information such as the addresses of local variables registers functions and so on debuggers will also show the values of local variables so that you can ensure your program is behaving correctly if you're looking for a debugger I would like to recommend x64 dbg it's free and open source plus it has a ton of features to me it's like the either Pro of dynamic analysis except it's free like all the previous programs mentioned in this video it has scripting functionality so that users can extend the program's feature set don't let the name fool you by the way it works for both 64-bit and 32-bit platforms alright it's time for some honorable mentions cutter is a free and open source reverse engineering platform that competes with either Pro or ghidro it has a great user interface it's extremely customizable and extensible but the project is relatively new there aren't very many contributors and in my opinion it has yet to mature I'm very sure that as time progresses cutter will only get better next reclass.net is another free and open source program but this program has a very specific purpose it displays a block of memory as multiple dots types so that you can determine which one is correct when you know the dots type of a certain offset into the memory block you set it as so and you can give it a name once you are satisfied with your reconstruction of the memory block reclass will generate a perfectly padded class for you to use in your C plus or c-sharp applications alright ladies and gentlemen that's just about wraps up the video thank you for watching look forward to more in-depth tutorials on these programs and Concepts in the future as per usual I'll leave the links to everything mentioned in this video down below along with a few extra learning resources if you have any feedback or suggestions feel free to leave me a comment I pretty much read all of them thank you dearly to the following patrons for the continued support I hope you enjoyed the video and I'll catch you guys in the next one cheers