home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Reverse Code Engineering RCE CD +sandman 2000
/
ReverseCodeEngineeringRceCdsandman2000.iso
/
RCE
/
E_bliss
/
eb_tut7.txt
< prev
next >
Wrap
Text File
|
2000-05-25
|
6KB
|
187 lines
Tutorial Number 7
Written by Etenal Bliss
Email: Eternal_Bliss@hotmail.com
Website:http://crackmes.cjb.net
http://surf.to/crackmes
Date written:7th Feb 1999
Program Details:
Name: CrackMe v8.01
Author: BuLLeT/CiA
Tools Used:
Softice
Cracking Method:
Observation, Hex-Dec interconversion, simple maths
Viewing Method:
Use Notepad with Word Wrap switched on
Screen Area set to 800 X 600 pixels (Optional)
__________________________________________________________________________
About this protection system
No disabled function. Protection is based on a serial number which is
converted to Hex after a simple multiplication. You get 8 tries everytime
you run the program. If you fail to register, it will exit after the 8th
try.
__________________________________________________________________________
The Essay
As this is a tutorial for newbies, I'll go into details about how I go
about cracking the program. I suggest that you read this tutorial first.
When you have completed the tutorial, leave this tutorial open and follow
the instructions. Re-do it once more after you have completed the step
by step guide...
In this essay, when I write type "d edx" or similar commands in Softice,
I mean it without the quotes.
__________________________________________________________________________
Observation
I entered "1" without quote in the serial box and click on "Spider". The
"Reg Nr" generated is 000003. Entering 2 will give you 000006. Entering
11 will give you 21.
Explanation:
The serial you entered is multiplied by 3 and then the answer is converted
to Hex. Eg. 11 * 3 = 33 (33 is 21 in Hex)
Ok, I've found out how the Reg Nr is generated. Next, we need to find out
what is the correct Reg Nr.
I entered 1 for the serial.
Ctrl D to activate Softice. We will need to set a breakpoint to break into
the program. I chose to use hmemcpy (so type "bpx hmemcpy")
Then you will need to click on "Spider". You will break into the function.
To get to the main program code, You have to F12 7 times.
**There is no explanation for the number of F12. I just counted that I needed
7 F12s to see CRACKME!CODE... which means that you are in the main program
code.
Once you are in the code, you will have to disable the breakpoint first
by typing "bd *"
Then, just keep using F10 for a while because what you will come across
is a lot of "ret"(total of 6) and nothing interesting until
:0044A2F4 E813A1FDFF CALL 0042440C
:0044A2F9 8B45FC MOV EAX,[EBP-04] <-- You land here
:0044A2FC E807D7FBFF CALL 00407A08
:0044A301 8BF0 MOV ESI,EAX
:0044A303 8B45FC MOV EAX,[EBP-04]
__________Snip___________
:0044A35B 8B83E8020000 MOV EAX,[EBX+000002E8]
:0044A361 E8A6A0FDFF CALL 0042440C <-- F10 pass this call
:0044A366 8B55F0 MOV EDX,[EBP-10] and type "d edx"
:0044A369 58 POP EAX
:0044A36A E87998FBFF CALL 00403BE8 <-- Call to compare
:0044A36F 750F JNZ 0044A380
At 0044A361, if you F10 pass it, you will notice the edx register changing
colour which means that it has a new value. Type "d edx" to see what is in
the edx register. I got 11DA9558E. The next line moves the value 11DA9558E
in edx again.
At line 0044A36A, there is another call. Notice the conditional jump after
it. That's highly suspicious. So, I traced into the call using F8 when the
line lights up in the code window.
:00403BE8 53 PUSH EBX
:00403BE9 56 PUSH ESI
:00403BEA 57 PUSH EDI
:00403BEB 89C6 MOV ESI,EAX <-- eax = your code
:00403BED 89D7 MOV EDI,EDX <-- edx = correct code
:00403BEF 39D0 CMP EAX,EDX <-- COMPARE eax with edx
:00403BF1 0F848F000000 JZ 00403C86 (NO JUMP)
Look at this part of the code, you will notice the compare at 00403BEF.
Again followed by the classical conditional jump. You must remember that
we entered the wrong code so eax is different from edx.
If we entered the correct code, we would be jumping to 00403C86. To confirm
this, at 00403BF1, type "r fl z" to reverse the zero flag. You will see
that you will now jump. Press F5 to return to the program...
And you will see the Prize Trophy!!!
Ok. So, we know that edx contains the real code, eax contains the converted
code we entered. I entered 1 at the start and eax = 000003 (see above if
you have been skipping through this tutorial)
Now, we need to convert 11DA9558E into the correct serial that we need to
enter.
Formula:
(what you type) * 3 and converted to Hex.
**note: If you don't understand this, most probably you have been skipping
through the tutorial. Go back and READ!
Now we need to reverse the calculation to get the serial
**I recommend Volatility's CrackersConvert v1.0 which can be found in
http://www.ImmortalDescendants.com
11DA9558E (Hex) when converted to Dec = 4792604046
4792604046 divide by 3 = 1597534682
Now, type 1597534682 into the serial box. Did you see the Prize Trophy????
Program Cracked...
__________________________________________________________________________
Afterthought
You might be thinking how I manage to find the exact location of the
compare. The answer is that I did it the hard way. Upon breaking in
Softice using bpx hmemcpy, I traced into almost all calls till I got to
the correct one.
That is the wrong way of cracking. You must not "dive" straight into the
program once Softice breaks.
If I had more patience and just F10 my way around, I would have come to
the compare code much faster.
Remember that.
__________________________________________________________________________
Final Notes
This tutorial is dedicated to all the newbies like me. I've tried to
explain everything in details.
And because I'm a newbie myself, I may have explained certain things wrongly
So, if that is the case, please forgive me. Email me if there is anything
you are not clear about.
My thanks and gratitude goes to:-
The Sandman
All the writers of Cracks tutorials and CrackMes