# How Hackers Crack Any Software With Reverse Engineering

Source: https://www.youtube.com/watch?v=037Pw8btDiM
Recap page: https://rapidrecap.app/video/037Pw8btDiM
Generated: 2026-01-12T22:34:14.84+00:00

---
## 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.

## Detailed Analysis

The video explains how hackers reverse engineer software by analyzing the compiled binary to find the intended logic, using the example of a program called 'keygenme'. After running the 'file' command on the stripped 64-bit ELF executable, the presenter uses Binary Ninja to decompile it into high-level C-like code. The decompiled logic reveals that the program checks if the argument count (argc) is 3. If true, it calculates a value based on the first argument (argv[1], the name) and XORs it with the first character of the program name (argv[0], which is './keygenme' or 'l' in ASCII). This result is then left-shifted by 10 bits, and this final number must match the integer conversion of the second argument (argv[2], the key). The presenter calculates the required sum for the name 'lowleveltv' (1108), XORs it with the ASCII value of 'l' (108) which is 324 when calculated as (1108 ^ 108) << 10, resulting in 1327104. Executing './keygenme lowleveltv 1327104' successfully outputs 'Good job!', revealing the derived key.

### Keygenme Program Analysis

- The program is a 64-bit ELF executable requiring two inputs: name (argv[1]) and key (argv[2]), checked against argc == 3
- sum(name) ^ ord(argv[0][0]) << 10 == atoi(argv[2])

### Reverse Engineering Workflow

- Used Binary Ninja to decompile the stripped binary, observing high-level C-like code, string references like 'Wrong key!' and 'Good job!', and function calls like puts(str)

### Key Calculation Steps

- 1. Sum ASCII values of name ('lowleveltv' = 1108). 2. Find ASCII value of first char of program name ('l' = 108). 3. Calculate XOR: 1108 ^ 108 = 324. 4. Calculate final value: 324 << 10 = 1327104

### Verification

- Executing './keygenme lowleveltv 1327104' confirms the derived key, resulting in the 'Good job!' output.

### General Concept

- Reverse engineering reveals the human intent behind the machine code by analyzing the compiled structure and logic.

![Screenshot at 00:11: Output of the 'file keygenme' command showing the executable type, architecture \(x86-64\), and linkage information.](https://ss.rapidrecap.app/screens/037Pw8btDiM/00-00-11.jpg)
![Screenshot at 00:35: The command line interface showing example executions of keygenme with a correct and incorrect key, demonstrating the expected input/output format.](https://ss.rapidrecap.app/screens/037Pw8btDiM/00-00-35.jpg)
![Screenshot at 01:45: The result of running the 'strings keygenme' command, revealing embedded strings like 'Good job!', 'Wrong key!', and the input format 'keygenme \[name\] \[key\]'.](https://ss.rapidrecap.app/screens/037Pw8btDiM/00-01-45.jpg)
![Screenshot at 03:16: Binary Ninja showing the high-level decompiler view of the main logic, specifically the conditional check involving argv and string length.](https://ss.rapidrecap.app/screens/037Pw8btDiM/00-03-16.jpg)
![Screenshot at 05:55: Python interactive shell calculating the required key value based on the derived logic: sum\('lowleveltv'\) = 1108 and ord\('l'\) = 108.](https://ss.rapidrecap.app/screens/037Pw8btDiM/00-05-55.jpg)
