Crackme: git's simple crackme medium-hard

Download here: https://crackmes.one/crackme/68e2b4652d267f28f69b738e
MD5: 49c66031be227cc5982daadfd7368e9d
SHA1: 0f01dfd5c1775dd7b605c992903d67bbafa3051f
SHA256: 67b06c9c003f0c26c319d82b1fc6436207eaf0e3ed31f438312be8349225272f

This is listed as a C/C++ x64 executable with a difficulty rating of 2.5. The author is git and the executable is written for Windows.

The authors description:

medium-hard crackme with antidebug checks obfuscated strings and key

With this crack me, I'm going to take a bit of a different approach. I'm not going to use a decompiler. Taking a look at the strings, I can see some base64 encoded strings. Other than that, Detect it Easy believes this was compiled using Visual Studio 2022 as a console application. It does not appear to be packed.



IDA shows us a long series of various debugger checks. At this point, I will manually step through the code and navigate the executable to the good boy. The base64 decode function takes the encoded string and a buffer as its parameters. So after you step over the call, you can see what the string is supposed to say.


After the call to IsDebuggerPresent, I modified the value of EAX to 0 and continued stepping. After the call to CheckRemoteDebuggerPresent, I followed [RSP+78] in the dump and modified the value to 0. Next, I encountered a massive loop. I set a breakpoint to right after the jump and let it run. After that loop I single stepped until I reached a check of rax, 0x3b9acde8 followed by a jge. My RAX value was much higher and I suspect this is due to single stepping and the QueryPerformance calls(timing related anti-debugging technique). I set the overflow flag to skip the jump and continued single stepping. As I continued stepping, I eventually saw what appeared to be the key. I tested it using a separate command prompt and I was greeted with the good boy message.

I want to add a note that I did peek into the function calls and determined they were safe to skip over. 


The question is, can we get the good boy even if we enter the incorrect password? I continued stepping through the code until I was prompted for input and entered 123. Then I continued stepping. I encountered a jump that checked my input length versus the correct key input length and I modified the ZF to trick the executable into thinking they were the same length. I eventually saw that a call would be made and RDX was loaded with the incorrect message. I followed the address in the dump and noticed that the good boy message was only 0x20 bytes away so I modified RDX to that address and hit run.

Comments

Popular posts from this blog

Crackme: atherusti's First C program

Crackme: antilagvip's medium crackme

Crackme: Meist's Passfind Crackme