Table Of Contents
Intro
THM recently released a 5 minutes hack rooms, which are pretty easy even for beginners. This is one of those rooms.
So instead of doom scrolling, you can test your skills out and spend your time more wisely.
Let’s download the task file.
The file is an executable format. Make sure to run chmod +x Compiled-1688545393558.Compiled
if it’s not permitted.
When we run the file, it asks for the password.
The password is not that simple, obviously. We need to retrieve this.
Ghidra
Let’s use Ghidra. You can use any reversing tool you prefer.
Select Files > Import (OR) Press “I” to import our executable file.
Double Click our file to open in Code Editor.
Select “Yes” to analyze our file.
Select “Analyze”.
From the left, navigate to symbol tree, select Functions > main.
To the right is the decompilation of the main function. We’ll be focusing on this one.
If you’re familiar with C, I’m sure you’ve already guessed the password.
There’s a “scanf” which accepts our input. However, there are some texts in both sides of a format specifier “%s”.
Don’t let this confuse you. Let’s trace the code in our head step by step.
Cool! It’s DoYouEven_init
. Is that correct?
It works…Awesome!
Outro
Now we gonna put this in the field and fetch our score (and streak).
And That’s it. Hope you enjoyed this room. Happy Reversing!