Reverse-Engineering: 101
18.May.2023, Yuriy Georgiev
What will you learn
- Reverse-Engineering of Windows executables
- What tools do you need and how to use them to break and enter the executable code
- Minimal basics of the Windows API and the Portable Executable (PE) file format
- Minimal basics of CPU instruction set architecture (ISA) and assembly language
In this tutorial I will introduce you to the process of software reverse-engineering. More particularly software that is running on Windows (but the process is pretty much the same on all platforms).
Disclaimer
Remember: reverse-engineering a commercial software is prohibited by the law.
Disclaimer: I do not take responsibility for what you are going to use the knowledge provided in this tutorial.
I’ve prepared a small keygenme for you that will be our sample victim.
Keygenmes and crackmes, are small apps that are specifically created to be cracked (and later keygenned), so you don’t break the law while learning. It’s a good way to learn, practice and have fun.
You will find the keygenme in the folder “keygenme” that comes with this tutorial.
Preparation
First and foremost, we will need some tools to help us with the reverse-engineering. These tools are used to explore, study and analyze the executable code of the binary files.
Tools we need:
- x64dbg: https://x64dbg.com/ – a Win32/64 debugger with good analysis engine
- Windows API documentation: https://learn.microsoft.com/en-us/windows/win32/api/
- x86/64 assembly instructions documentation: https://www.felixcloutier.com/x86/
- C/C++ compiler in order to code the keygen. You can use whatever language you like, it’s up to you, I prefer C/C++.