How Hackers Crack Any Software With Reverse Engineering

Quick Overview

Hackers reverse engineer software by taking compiled binaries, like the 'keygenme' program, apart using tools like Binary Ninja to decompile the assembly code into high-level intermediate representation, allowing them to deduce the logic—such as the XOR and bit-shifting calculations derived from the sum of ASCII values—required to generate the correct key for validation.

Key Points: The process involves reverse engineering a stripped 64-bit ELF executable named 'keygenme' which expects two arguments: a name and a key. The key validation logic, analyzed using Binary Ninja, requires the number of arguments (argc) to be exactly 3. The core logic involves calculating the sum of the ASCII values of the name argument (argv[1]), XORing that sum with the ASCII value of the first character of the program name (argv[0], which is './keygenme'), and then left-shifting the result by 10 bits. The resulting number must equal the integer conversion of the key argument (argv[2]). The presenter calculates the required key value by summing the ASCII values of 'lowleveltv' (1108), XORing it with the ASCII value of 'l' (108, or 0x6C) which is the first character of './keygenme', and left-shifting by 10, yielding 1327104. Running './keygenme lowleveltv 1327104' yields the success message 'Good job!', confirming the derived key. Reverse engineering tools like Binary Ninja decompile the assembly into high-level C-like code to infer the original programmer's intent.

![Screenshot at 03:16: The Binary Ninja decompiler window showing the high-level intermediate representation of the main function, specifically highlighting the conditional logic that checks argument count and performs string comparisons to output 'Wrong key!' or 'Good job!' or 'Keygenme \[name\] \[key\]'.](https://ss.rapidrecap.app/screens/037Pw8btDiM/00-03-16.jpg)

Context: The video demonstrates the process of reverse engineering a simple executable program, referred to as a 'key generator' or 'keygenme', to discover the correct 'key' required to pass a validation check. The presenter uses command-line tools and the disassembler/decompiler Binary Ninja to analyze the stripped ELF binary and reverse the cryptographic or validation logic embedded within the compiled code.

Raw markdown version of this recap