Reversing
Last updated
Last updated
Reverse engineering is used to uncover hidden or undocumented features and vulnerabilities in software, hardware, and systems. By understanding how a system works, security professionals can identify weaknesses that would allow attackers to gain access or cause damage.
Let's start by reversing this code binary using strings.
Strings is a binary that get all the ascii characters of a binary and list it in order so we can see what some of the characters are that contain the binary.
Here you can see that there's a mess of characters around, let's use strings to see it more clearly.
Getting a look, we can see the first line that once the program starts says "What is the mater phrase?" following by a string that we can suppose that its the master phrase.
As simple as that we found the key of the first crackme.
Know we're not looking for a string pass phrase we are looking of a number's combination, it changes a little bit.
Let's use GDB Linux debugger to see what the program is doing at low level programming in other words assembly.
What it's GDB Linux Debugger?
This is a powerful source-level debugging package that lets you see what is going on inside your program. You can step through the code, set breakpoints, examine and change variables, and so on.
First, we need to say that we want to disassembly the main function so we can see what is happening like (cmp,jmp,mov, etc).
Once we start looking, we see that there is a comparation between EAX and 0x7b.
When you convert 0x7b to hexadecimal it's equivalent to 123, the secret pass phrase.
Now what happen when there is no direct comparation in the program?
Same as the second crackme, we disassembly the main function and look for a call to an interesting function to continue seeing what it does.
In this case you'll see that there is the fcompare function so, continue to disassembly the function.
Once you start looking the fcompare function you'll see that there is a comparison and the hexadecimal that is comparing to, just copy and paste to the converter to see the equivalation.