|
Basic
lessons
|
||||||||||||||||||||
|
|
||||||||||||||||||||
|
This essay is for knowledge purposes only!! Software developers spend much time in making their programs. They live from the money we give them! Please buy good software!! |
||||||||||||||||||||
| I. Cracking approaches | ||||||||||||||||||||
| In this first lesson I'll show you the different approaches
you can use for cracking programs. Before you decide what approach you'll
use, you first have to take a look at the program you want to crack, and
ask yourself questions: "Does it has a registration possibility?", "Does
it has a nag screen", "What are the limits of the shareware", etc... . In general there are two big approaches:
If there is a registering option included, you could try and find the
serial code with SoftICE, but as this is quite difficult for newbies,
it's almost always possible to use the dead listing approach. Imagine
you have a program with a nag screen and a 30 day trial and the possibility
to register. Then you have 2 possibilities: 1. crack the program by finding
a serial or 2. remove the nag screen and 30 day trial. N° 1 is done
with SoftICE and N° 2 with W32DSM and a hex-editor. If you choose
n° 2, you have again other possibilities: crack the program by letting
it believe it's registered or remove the "draw nagscreen" procedure and
time limit.....I would prefer to let the program believe it's registered......more
on that can be read in my essay about Planet
Zip.
Note that this is a really simplified approach scheme. In practice there are much more approaches and different approaches often have to be used together to effectively crack a program. Before you move to the next chapter make sure you can work with the tools! |
||||||||||||||||||||
| II. Cracking Winzip 7.0 (or 8.0, but the offsets will be different) | ||||||||||||||||||||
|
Note: I know that Winzip 8.x is the latest version. Don't panic, you can use that version too to follow this lesson. The only difference will be the locations or offsets. The offsets are the ciphers in the left and often start with 40xxxx or 41xxxx. In this second lesson I'll show you how to do a basic serial fishing.
To make it easy, we'll crack Winzip 7.0. Its protection is easy, lame,
bad,.....but good to learn from! :) It was my first program I cracked
on my own, and it costed me less than 5 minutes to do so!
:00408049 803D28D9470000 cmp byte ptr [0047D928], 00 :00408050 59 pop ecx :00408051 745F je 004080B2 :00408053 803D58D9470000 cmp byte ptr [0047D958], 00 :0040805A 7456 je 004080B2 :0040805C E8EAFAFFFF call 00407B4B [-> This makes the real serial] :00408061 85C0 test eax, eax [-> Test if good serial] :00408063 744D je 004080B2 [-> Jump if valid] Note that in many programs the "make real serial" procedure precedes a TEST or CMP instruction followed by a conditional jump! Okay, when you're on the "call 00407B4B" press F8 to trace into the call. Trace a bit trough the code until you see this:
:00407C0E 8D85C0FEFFFF lea eax, dword ptr [ebp+FFFFFEC0] :00407C14 50 push eax :00407C15 57 push edi :00407C16 E8AB000000 call 00407CC6 [<-Makes real serial in EAX] :00407C1B 59 pop ecx :00407C1C BE58D94700 mov esi, 0047D958 :00407C21 59 pop ecx :00407C22 8D85C0FEFFFF lea eax, dword ptr [ebp+FFFFFEC0] Trace to the "lea eax, dword ptr [ebp+FFFFFEC0]" instrution, execute it (=press again F10) and type "d eax" (display eax register). You'll see the valid registration number in your data window! Congrats! You cracked your first program. :) |
||||||||||||||||||||
| III. Dead listing approach on RegView v1.21a | ||||||||||||||||||||
|
In this third lesson I'll teach you the basics of a dead listing cracking approach....which I use quite often, mostly in combination with Softice, but in this lesson we 'll crack the program purely with W32DSM and a hex editor. The target program is Regview v1.21a . I wrote a tutorial on this program quite some time ago and I used it in this lesson, BUT....specially adapted for you 100 % newbie! Let's go... Well, obviously RegView is a prog for viewing the Windows registery file.
I always use it when cracking, and therefore it is an indispensable tool.
It's "protected" with a 30-uses limit. When the 30 uses are exceeded,
RegView displays the following message: "Maximum number of trials has
been reached! To continue use...." etc. Before loading regview.exe into
W32DSM, we'll first make a copy of it and disassemble the
copy of it and NOT the .exe itself. Why? Because if the original .EXE
is disassembled and you should try to hex-edit the file (to patch the
program) it 'd give a "Readonly error". So make a copy of regview.exe.
I always use the extension .DSM, so our copy would be regview.dsm Okay...you remember the string "Maximum number of trials has been reached! To continue use...." ? You can search for it in the dead listing. Do that NOW......you should see the following asm code:
---------------------------Start-of-partial-code----------------------------
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0048D830(C) <- That's the location where u can find a jump to this "beggar off"
|
:0048D856 6A00 push 00000000
:0048D858 668B0DBCDB4800 mov cx, word ptr [0048DBBC]
:0048D85F B202 mov dl, 02
* Possible StringData Ref from Code Obj ->"Maximum number of trials has been "
->"reached! To continue use of this "
->"program, you need to register "
->"now!"
----------------------------End-of-partial-code-----------------------------
Okay, maybe this looks somewhat confusing to you. Don't worry you'll understand
very soon as long as you know some basic assembler! Now try to follow my
reasoning: If the program is registered, it never executes the code I just showed you. So! It's quite logic we have to change the program in THAT way it DOES NOT EXECUTE THIS CODE! How can we do that? Well, we can see that there's a conditional jump at adress 0048D830. The trick now is to go to that adress and change the jump in that way it does not jump to the code above anymore :) Sounds confusing? Don't worry. Let's take a look at code location 0048D830 where the program jumps to the "You have to register" message.
---------------------------Start-of-partial-code----------------------------
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0048D806(C) <- There's a jump at 48D806 that jumps to this "beggar off"
|
:0048D816 8D55F0 lea edx, dword ptr [ebp-10]
:0048D819 B801000000 mov eax, 00000001
:0048D81E E8BD51F7FF call 004029E0
:0048D823 8B45F0 mov eax, dword ptr [ebp-10]
* Possible StringData Ref from Code Obj ->"try"
|
:0048D826 BAB8DB4800 mov edx, 0048DBB8
:0048D82B E83066F7FF call 00403E60
:0048D830 7524 jne 0048D856 <- Here is the jump
:0048D832 B90CFFFFFF mov ecx, FFFFFF0C
----------------------------End-of-partial-code-----------------------------
Okay, so now you say: "Let's change the jne 0048D856 in that way it doesn't
jump....well that's a good beginning of your cracking feeling, but....if
you'd try it wouldn't work. So, if you want the program to be cracked, the
code above also cannot be executed! So we do the same thing as before: go
the the conditional jump that jumps to this code e.a. goto code location
0048D806 (btw, shortcut in W32DSM for "Goto code location" is shift+F12.
---------------------------Start-of-partial-code----------------------------
* Possible StringData Ref from Code Obj ->"CLSID"
|
:0048D7C4 BAA8DB4800 mov edx, 0048DBA8
:0048D7C9 8B45F8 mov eax, dword ptr [ebp-08]
:0048D7CC E85B9CFCFF call 0045742C
:0048D7D1 8B1550D34900 mov edx, dword ptr [0049D350]
:0048D7D7 8902 mov dword ptr [edx], eax
:0048D7D9 A150D34900 mov eax, dword ptr [0049D350]
:0048D7DE 81280BFFFFFF sub dword ptr [eax], FFFFFF0B
:0048D7E4 A150D34900 mov eax, dword ptr [0049D350]
:0048D7E9 81387CF8FFFF cmp dword ptr [eax], FFFFF87C
:0048D7EF 750D jne 0048D7FE <- if registration code in
registery is false then check trial uses
:0048D7F1 A104D34900 mov eax, dword ptr [0049D304]
:0048D7F6 C60001 mov byte ptr [eax], 01 <- set registered
flag!!
:0048D7F9 E987020000 jmp 0048DA85
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0048D7EF(C)
|
:0048D7FE A150D34900 mov eax, dword ptr [0049D350]
:0048D803 83381E cmp dword ptr [eax], 0000001E <- compares
the amount of uses to the maximum amount of
uses. (1E is the hex value for 30!!)
:0048D806 7F0E jg 0048D816 <- if exceeded the 30 trial
uses then "beggar off"
----------------------------End-of-partial-code-----------------------------
So, the only thing there's left is to change the "jne 0048D7FE" at 0048D7EF
in two NOP (=do nothing) instructions, so it 'll never jump to the beggar
off routine!
Before cracking: --------------- :0048D7EF 750D jne 0048D7FE After cracking: --------------- :0048D7EF 90 NOP :0048D7F0 90 NOPI'll give for this ONE time a detailed explanation on how to patch the program with a hexeditor! I 'll use HIEW to do that. Follow me:
|
||||||||||||||||||||
| IV. Using breakpoints | ||||||||||||||||||||
|
I told you earlier that I would come back on all sort of breakpoints that are usefull when cracking. I'll keep it as easy as possible, however it's possible you won't understand everything. But don't worry, just try and practice, you'll get it in no time!
|
||||||||||||||||||||
| V. In the end | ||||||||||||||||||||
|
Voila. These were your first basic lessons. You're still a newbie and you have still tons to learn. So...next thing to do for you is reading tutorials (and after that try to crack the program yourself) and by trying to crack a program all by yourself without the help of a tutorial. However, I strongly suggest to start following some tutorials. They 'll arm you with some experience you'll need when cracking a program on your own. The other content of my site will surely come in handy ;-) |
||||||||||||||||||||
|
Written by The Blackbird © 1999-2001 This text can be freely distributed/ published/ printed etc... as long as the original .html file and original content is used |
||||||||||||||||||||