In this guid Simple_GUI_crackme by NullerF is used.
Firstly let's open program and see how it looks.
As you see, it asks for an activation code and if it's wrong, program shows it with 'incorrect :/' massage.
First what we can do is to open executable in dnSpy by pressing File>Open... and choosing file. If you look to the left, there is tree of file structure. We need only gui_crackme branch, as others are standard libraries.
Here you can look through names of classes and functions. By clicking on them you can review C# code. So, the first things that eye catches are:
- Main that means entry point of program
- button1_Click that could mean action on click of button
- label1_Click and label2_Click that could mean actions on some clicking
However, let's not focuse on that now, as everything this can be misleading or obfuscated in real projects.
The next idea we can start with: such windows, that are used for errors and in our situation for notifying about incorrectness of activation code, use message box that blocks thread. So running in debug mode go to Debug>Windows.
This time only Call Stack tab is required, but I also find Locals and Threads usefull. Now let's trigger incorrect code window and press pause button. It will break program and show where it stoped.
Looking at Call Stack tab, there is stack of functions from gui_crackme (that is our crackme program) and mostly from libraries. We are interested in last called function from crackme app, that is button_1Click from Form1 class. By double-clicking it, C# code of that function appears.
Here is required code sk-189 and we can grab it to get needed result, or we can tweak code to work it with any entered activation code by right clicking and choosing either one of Edit (C#)... or Edit IL instructions... . The second one is more tricky, so I Edit C# if I have such opportunity.
Anyway, at the end we got solwed crackme.