0% found this document useful (0 votes)
30 views

Introduction to Game Hacking and Reverse Engineering Games

The document discusses game hacking and reverse engineering, defining game hacking as the modification of a game's data or code for an unfair advantage. It explains reverse engineering as the analysis of software to understand its functionality, often requiring programming knowledge in C++. Additionally, it highlights tools and frameworks used in the industry for these purposes, emphasizing the importance of experience and knowledge in C++ and assembly for effective reverse engineering.

Uploaded by

franio.dat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Introduction to Game Hacking and Reverse Engineering Games

The document discusses game hacking and reverse engineering, defining game hacking as the modification of a game's data or code for an unfair advantage. It explains reverse engineering as the analysis of software to understand its functionality, often requiring programming knowledge in C++. Additionally, it highlights tools and frameworks used in the industry for these purposes, emphasizing the importance of experience and knowledge in C++ and assembly for effective reverse engineering.

Uploaded by

franio.dat
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Hacking and

Reverse
Engineering
Games
in C++

Franciszek Thomas 3pr


What is Game Hacking?
Game hacking, also known as
cheating or modding, refers to the
act of modifying a video game’s
data and/or code which can be
done by altering the game’s
memory at runtime or the game
data on disk to gain an unfair
advantage over other players or
alter the game experience in some
way.
What is Reverse Engineering?
Reverse engineering is the process
of analyzing a program, game or
any software to understand its
inner workings, functionality, and
design. It involves examining the
compiled code, often x86-64
assembly and/or dynamically
analyzing the behavior of an
application to extract information
about its data structures,
algorithms, behavior, data flow,
control flow or to find bugs, and
much more.
Understanding the basics
Memory address basically
represents a place in memory; for
security reasons software uses so
called virtual addresses which
means an address doesn’t
necessarily “point” to physical
memory value in RAM, rather it has
special meaning in a process called
paging, which is too complex for me
to explain in this presentation. This
also means every process, e.g. a
game or an application, has its own
address space which means one
process can’t access another
process memory directly.
Understanding Game Memory
As previously said, every process has its own
virtual memory address space. Basically one
process cannot directly access another
process memory. For debugging purposes,
Windows API allows us to read and/or write
to another process memory via 2 functions:
ReadProcessMemory and
WriteProcessMemory. To use these
functions you need to obtain a handle to the
process beforehand with sufficient access
privileges typically using the function
OpenProcess. It is also possible to make a
cheat which has direct access to the game’s
memory because it is executing as a
dynamic loaded module, a DLL (Dynamic
Linked Library).
Understanding Game Memory
On Windows any executable file (.exe, .dll, .sys, etc)
has a common format known as PE, Portable
Executable. This format describes the executable,
which contains among other things sections for
data, code and more. In memory these sections also
have special protection modes like read only,
read-execute, read-write and more. This ensures
that we can’t modify for example assembly code
which is usually in a read-execute section, “.text”.
Again though, windows gives us the power to use a
function from WinAPI, VirtualProtect which allows
us to temporarily change memory region protection
mode. This can be used to modify, “patch” the code
at runtime to change the execution flow, disable
some operation and more. If we try to write to a
memory region which isn’t marked as writable we
will end up with an access violation exception.
Introduction to Reverse Engineering
Reverse engineering is a complex
process that includes dynamic
analysis, static analysis, techniques
like emulation and more. The only way
to get better at reverse engineering
binaries is to just do it; again and
again and again... You need
programming experience, preferably
in C++ because most games are
written in C++ directly or rely on it, and
some basic assembly, memory and
CPU internals knowledge to start. How
are you going to reverse engineer
software if you don’t have experience
writing it yourself right?
Introduction to Reverse Engineering Games
Reverse engineering games doesn’t have to
be that hard since most games use known
game engines like Unity, Unreal Engine or
Godot. Some of these engines are open
source and very well documented and often
games use some form of scripting
languages which are much easier to
analyze. If a game is using Unity Engine
with Mono scripting backend you can even
view the entire source code of the game.
The real trouble (or fun, I would say) starts
when the game is protected by a reputable
anti-cheat or the code/control flow is
obfuscated in some way.
Hacking Tools and Frameworks
These are a few of industry standard tools for game
hacking, software reverse engineering (including malware)
and more:

● IDA Pro
● Ghidra
● x64dbg
● ReClass
● Cheat Engine
● And a whole lot more :D

Great C/C++ libraries widely used in the industry as well:

● Zydis
● asmjit
● Triton
● Unicorn engine
● MinHook
● And much much more…
The End :D

You might also like