This is a very simple crackmi. Those who do not understand how to solve it, I will help. We all understand that if we run the program and enter the wrong password, an error will come out, as a beginner, I immediately started looking for this error in the IDA PRO disassembler, After searching, I found this error and immediately saw in the graphical window this construction jnz short loc_401771 - This design had 2 direction vectors. 1 - Correct, 2 - Incorrect. But behind it was the construction test eax,eax, which means "test eax, eax" is used to check the eax register. If the value of eax is zero, then the Zero Flag (ZF) is set to 1, otherwise it is set to 0. This allows the program to make a decision or make a transition based on the value of the Zero Flag (ZF). If we see such a construction where there is a short, then it consists of two bytes 0 is not true, 1 is true. Initially, I knew that jnz was a conditional transition, so I immediately put breakpoint on this instruction and started the debugger, entered the password for the rand |
==> |
ldstr aTariq // "tariq"
call bool [mscorlib]System.String::op_Equality(string, string)
brfalse.s loc_14F
ldarg.0
ldfld class [System.Windows.Forms]System.Windows.Forms.TextBox WindowsFormsApp9.login::textBox2
callvirt instance string [System.Windows.Forms]System.Windows.Forms.Control::get_Text()
ldstr a123 // "123"
call bool [mscorlib]System.String::op_Equality(string, string)
br.s loc_150 |
==> |
can you say a password? winrar |
==> |