About the challenge
This is a challenge on crackmes.one. Thanks to lovemf for creating this.
The difficulty is rated 2.5 and the quality is rated 5.4, both out of 6, so it should be a fairly fun and easy solve, but I am new to reverse engineering.
I really enjoy the look of this UI as it gives a welcome break from the usual CLI-based challenges.
Enough of all of that, how did I go about solving it?
Solving the challenge
I opened up the binary in IDA because I get a license through university.
It turns out most of the UI stuff is happening in JS-land, which the author said was intentional to separate UI and logic.
Scrolling through the list of functions, I see strcmp, which is always a good place to start. Opening up the x-refs graph to strcmp, we get this:
strcmp in IDA
So we see the caller is called sub_2430, so we ought to take a closer look at this function.
sub_2430We see some calls to JavaScriptCore, which handles the UI, so we keep following the paths where we don’t get false returned.
Notice how I don’t bother finding the actual callsite of strcmp right away. This is a skill issue because I am new to using IDA, but its convenient for my next point.