首页
社区
课程
招聘
[破解资料大全]:来至网上,不断更新
发表于: 2004-8-3 15:37 81236

[破解资料大全]:来至网上,不断更新

2004-8-3 15:37
81236
Crack Tutorial2001
bc5K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6i4m8W2k6r3W2&6i4K6u0W2j5$3!0E0i4K6u0r3k6i4y4K6j5i4W2Q4x3V1k6o6M7X3q4U0K9K6t1H3x3o6q4Q4x3X3g2*7K9i4l9`.

看雪论坛精华3
ef1K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6i4m8W2k6r3W2&6i4K6u0W2j5$3!0E0i4K6u0r3k6i4y4K6j5i4W2Q4x3V1k6o6M7X3q4U0K9K6y4Q4x3X3g2J5j5i4t1`.

看雪论坛精华4
754K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6i4m8W2k6r3W2&6i4K6u0W2j5$3!0E0i4K6u0r3k6i4y4K6j5i4W2Q4x3V1k6o6M7X3q4U0K9K6c8Q4x3X3g2J5j5i4t1`.

看雪论坛精华5
09dK9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6i4m8W2k6r3W2&6i4K6u0W2j5$3!0E0i4K6u0r3k6i4y4K6j5i4W2Q4x3V1k6H3k6h3c8A6P5e0g2Q4x3X3g2Z5N6r3@1`.

论坛精华5CrackMe篇
c11K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8X3y4J5j5h3y4C8k6X3!0J5N6h3#2Q4x3X3f1H3x3o6q4Q4x3X3g2U0L8$3#2Q4x3X3g2U0L8W2)9J5c8X3u0G2L8$3E0Q4x3V1k6o6M7X3q4U0K9@1#2W2i4K6u0V1f1p5g2p5d9g2V1#2i4K6u0W2P5X3W2H3

CCHG破解教程
33fK9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6h3y4Z5K9h3&6S2k6r3k6G2M7X3y4W2i4K6u0W2j5$3!0E0i4K6u0r3j5i4c8@1j5h3y4Z5L8h3g2F1N6q4)9J5k6i4m8Z5M7q4)9K6c8X3q4A6k6q4)9K6c8o6f1%4y4e0x3K6

<<密界脱壳文集>>第一版
522K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4y4G2k6Y4c8Q4x3X3f1H3P5X3!0F1k6i4y4Q4x3X3g2U0L8$3#2Q4x3V1k6e0L8$3k6@1g2X3W2W2N6#2)9J5c8W2y4G2k6Y4c8h3K9h3g2%4i4K6g2X3x3e0R3K6y4K6q4Q4x3X3g2Z5N6r3#2D9

破解实例信息资源豪华版-通往脱壳高手必经之路
09dK9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4y4G2k6Y4c8Q4x3X3f1H3P5X3!0F1k6i4y4Q4x3X3g2U0L8$3#2Q4x3V1k6e0L8$3k6@1g2X3W2W2N6#2)9J5c8W2y4G2k6Y4c8h3K9h3g2%4i4K6g2X3x3e0l9$3y4o6u0Q4x3X3g2Z5N6r3#2D9

看雪学院官方破解教程
950K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4y4G2k6Y4c8Q4x3X3f1H3P5X3!0F1k6i4y4Q4x3X3g2U0L8$3#2Q4x3V1k6e0L8$3k6@1g2X3W2W2N6#2)9J5c8W2y4G2k6Y4c8h3K9h3g2%4i4K6g2X3x3e0M7I4x3o6g2Q4x3X3g2Z5N6r3#2D9

OllyDbg应用方法大全
183K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5k6h3y4G2L8g2)9J5c8Y4k6A6k6i4N6@1K9s2u0W2j5h3c8Q4x3X3g2H3K9s2m8Q4x3@1k6@1K9h3c8Q4x3@1b7@1z5o6l9%4

trw2000使用方法大全
361K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5b7g2)9J5k6h3y4G2L8g2)9J5c8Y4k6A6k6i4N6@1K9s2u0W2j5h3c8Q4x3X3g2H3K9s2m8Q4x3@1k6@1K9h3c8Q4x3@1b7@1z5o6l9$3

黑娃写的非常著名的网站破解教程
b81K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4y4G2k6Y4c8Q4x3X3f1H3P5X3!0F1k6i4y4Q4x3X3g2U0L8$3#2Q4x3V1k6e0L8$3k6@1g2X3W2W2N6#2)9J5c8W2y4G2k6Y4c8h3K9h3g2%4i4K6g2X3x3e0l9$3x3U0W2Q4x3X3g2Z5N6r3#2D9

风飘雪的破解教程
d86K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6h3S2^5x3o6l9%4i4K6u0W2j5$3!0E0i4K6u0r3k6Y4m8^5P5s2m8Q4x3V1k6@1N6i4c8G2M7W2)9J5k6h3S2@1L8b7`.`.

动风飘雪画破解教程
d42K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6h3S2^5x3o6l9%4i4K6u0W2j5$3!0E0i4K6u0r3k6Y4m8^5P5s2m8Q4x3V1k6V1L8$3&6Y4K9s2g2S2i4K6u0W2K9s2c8E0

zmworm翻译的OllyDbg v1.09c全文(***)
532K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8X3y4J5j5h3y4C8i4K6u0W2P5Y4g2S2M7$3!0X3N6q4)9J5k6h3y4G2L8g2)9J5c8X3y4Y4K9g2)9J5k6r3u0A6L8W2)9J5c8Y4g2@1i4K6u0r3j5X3!0S2M7X3c8Q4y4h3k6K6K9r3!0%4i4K6u0W2j5$3N6A6i4K6y4r3K9h3c8Q4x3@1b7K6y4#2)9J5y4Y4m8Y4i4K6y4p5x3W2)9J5y4X3q4Y4k6g2)9K6c8o6l9`.

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 1
支持
分享
最新回复 (117)
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
2
Tutorial 1 : How to crack 1st Contact 2.00.0.1
作者:dREAMtHEATER
写作日期: 14/15th July, 1999
版本:1.0 Beta 1
软件背景资料
运行平台: Win9X
文件名称: con92001.zip
程序类型: Contact Manager
下载地点: 102K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6h3A6K6L8$3k6@1j5$3!0F1M7%4g2D9N6r3W2F1k6#2)9J5k6h3y4G2L8b7`.`.

文件大小: 1,281KB
使用的工具
SoftIce V3.25--Win9X Debugger
W32Dasm V8.93--Win9X Dissembler
Hex WorkShop v2.54--Hex Editor
难易程度
Easy(X)-Part1  Medium(X)-Part2  Hard( )  Pro( )
前言
     网上的朋友,大家好!
     这是我写的第一篇破解教程,如若有纰漏,请各位多指教!
     这里我先声明,我写这篇教程的目的并不是教你如何去偷人家软件作者的劳动成果
,如果你想从我这里找注册码什么的,那我还是劝你到别的站点去找吧,我只是想教你
破解的思路,纯教学目的,若你真的很喜欢这个软件,那么请花钱注册!
Introduction
     软件的作者这样说:
     1st Contact comes with many features to make managing contacts an easy
and enjoyable task.
关于此软件的保护机制
     运行程序Contacts.exe,首先跳出一个窗口(nag screen),显示你还可以试用多少
天。只要你不注册,那么它总是先跳出来,这是我们要crack的地方。
     进入程序,看看帮助里面有没有可以注册的地方,果真有 “Enter Registration
Code...”,这也是我们的切入点之一。
     我追踪了一下它在windoz的注册表(registry)中存放的键值(key value),发现第
一次安装时,会把安装日期保存在“HKEY_USERS\.DEFAULT\Software\JSoft Consultin
g\1st Contact\Main Form\InstallDate_Date”中,若没有注册,每次程序运行就会读
取此键值,从而计算出你还可以试用多少天。告诉你,当你试用期过后,你把此键值删
掉,即可重新获得三十天试用期。这算不算是cracking ? :-)
     注册后,你会发现他把注册信息放在"HKEY_LOCAL_MACHINE\Software\JSoft Cons
ulting\1st Contact\2.00.0.1\"里面。
     这篇文章里我用两种方法去破解这个软件,一个软件的破解,往往可以从多个角度
来入手,如若你只想单纯地破解,那么某些情况下,也许很简单,但你可能并不能完全
了解软件作者的程序保护系统,下次遇到同样的保护机制,你会挠头的!
     不多说了,转回正题,让我们开始吧!
正文
PART 1   用SoftIce从内存中嗅出注册码
      我写的不是基础教程,如果你不知道SoftIce怎么用,那么还是先去补补课吧!
      好,在注册窗口中,任意填入你的名字、注册码(他的注册码形式为xxxxxxxx-x
xxxxxxx,后半部分数目不确定),我填入的是name:DREAMTHEATER(我本想填dREAMtHEATE
R,程序自动转为大写),registration code为12121212-12121212(这叫"12"大法 :-)

      当你填好后,你会发现窗口上"finish"按扭还呈不可按(disable)状态,看来软
件作者真的在这方面下了一番工夫,这意味着它是进行实时注册码计算的,只有你输入正
确的注册码,才能按"finish"按扭。
      怎么办呢?这也许对cracker新生(newbies)来说会放弃掉,如果真是这样,foll
ow me!
      删掉你填入的注册码的最后一位,CTRL-D,进入SoftIce,设断点bpx hmemcpy,F5,
返回程序,重新填入注册码的最后一位,你发现你会立刻进入SoftIce,再CTRL-D两次,为
什么呢?这是因为注册窗口里有三个地方需要我们填写。第三次回到SoftIce后,首先取
消你所有下的断点,接下来,你需要按无数次的F12,回到计算注册码的部分,又有人问
了,怎么才能知道你回到了正确的地方,以及我到底需要按多少次F12?这是一个经验问
题,我看到很多教程里,精确地告诉你按了多少次F12,我觉得这没有任何意义,因为给
你换一个程序,你还是不会cracking。这方面我也是摸了无数次才算找到切入点,很简
单,如果你看到在SoftIce的code窗口中,offset变成004xxxxx,极少的情况下,还会是
005xxxxx,这代表你已进入程序代码本身,多数情况下,你还需要进一步按F12,到底还需
按多少次,我再教你一些经验,如果你发现每按一次F12,在每个call后面数行就紧跟一
个ret指令,那么你就还需按F12。慢慢按照我的指导再拿几个软件练一练,我想你会成
功的!
      开始我们的trace吧!
      如果你能找到下面这段代码,那么你已成功了一半:
:004ADB9D E8B242F8FF              call 00431E54
:004ADBA2 8B45FC                  mov eax, dword ptr [ebp-04] <--最后一次按F
12,回到这里
敲入d eax ,在数据窗口,你会看到你输入的name
:004ADBA5 8D55F8                  lea edx, dword ptr [ebp-08]
:004ADBA8 E8E38C0100              call 004C6890   <--计算注册码的部分
:004ADBAD 8B45F8                  mov eax, dword ptr [ebp-08]
:004ADBB0 50                      push eax <-- 敲入d eax, see what? yes,the
real code
:004ADBB1 8D55F4                  lea edx, dword ptr [ebp-0C]
:004ADBB4 8B83D4020000            mov eax, dword ptr [ebx+000002D4]
    CTRL-D退出SoftIce,在注册窗口填入正确的注册码,我的是114A19D5-456DA1A1,不
要用我的注册码去注册!自己去练习吧!
    再补充一下,注册码的前部分是固定的,你可以试试。
PART2   通过PATCH,迫使程序注册。
      我先讲一下破解思路,很多共享软件现在都使用全局变量,作为软件注册与否的
标志,在汇编中体现为在某个内存地址中,存入1或0,往往1代表已注册,0为共享状态
,计算机专业用语中,这个内存地址称之为FLAG,当程序运行时,初始化值为0,读取win
doz注册表或*.ini文件中的注册信息后,若已注册,那么flag值变为1,否则,继续保持
为0,程序的其他部分可以访问这个flag,维持软件的共享状态。
      说起来很简单,实际破解过程中需要花大量的时间,我用第一种方法破解,两分
钟就搞定了,但是此法花费了我数个小时的时间,但这很值,他使你的cracking技术又
提高了几个百分点!
      我们开始吧!
      如果你用第一种方法已注册,那么,按照我前面说的,删掉他的注册信息,重新
进入共享状态。
      运行你的程序,出现了nag screen,告诉你还剩多少天可试用,对cracker来说这
是一个很好的画面,点击窗口的任意部位,进入主窗口,看看还有什么可值得借鉴的(
这期间我试了很多方法,略掉)。点击菜单help\Administration\Status...,叫出一个
message box,他告诉你:“You are on day X of your 30 day evaluation period”,
又是一条好的线索。
      在softice中下断点bpx messageboxa,看看有什么反应,很可惜,不工作,但我保
证这绝对是message box,后来我用其他方法确定程序是用Delphi编写的,向这种API函数
Delphi总是用自己封装的函数。
      剩最后一招了,请出我们的老朋友---W32Dasm,我认为他是最cool的软件,它可以
将程序的源代码反汇编出来,如果你还没有,赶紧下载一个,kool!
      我发现这个工具在国内提到的很少,但在国外的tutor里总是提到他,如果说sof
tice是你的左膀,那么它应是你的右臂。
      运行W32Dasm,等待他为你反汇编1st Contact,利用这个时候你可以去喝杯茶 :-)
反正我的机器得等会儿。
      OK,在W32Dasm中寻找字符串“You are on day”,又经过漫长等待,你会发现下
面的代码:
:004CDDB9 A0D65F4D00              mov al, byte ptr [004D5FD6]  〈--看出来了吗
,地址004D5FD6是一个注册flag
:004CDDBE 3401                    xor al, 01  <--异或al 与 01,如果004D5FD6的
内容为1,那么异或结果为0,否则为1
:004CDDC0 2C01                    sub al, 01  al=al-01
:004CDDC2 7207                    jb 004CDDCB  <--如果已注册,al=0,jump to 0
04CDDCB,显示"This copy of 1st Contact is registered to "
:004CDDC4 7456                    je 004CDE1C  <--否则,al=1,jump to 下一个f
lag,看你还剩多少天试用期,或已过期。
:004CDDC6 E984010000              jmp 004CDF4F
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004CDDC2(C)
|
:004CDDCB 6A00                    push 00000000
:004CDDCD FF3518624D00            push dword ptr [004D6218]
* Possible StringData Ref from Code Obj ->"This copy of "
                                  |
:004CDDD3 6880DF4C00              push 004CDF80
:004CDDD8 FF3528624D00            push dword ptr [004D6228]
* Possible StringData Ref from Code Obj ->" is registered to "
                                  |
:004CDDDE 6898DF4C00              push 004CDF98
:004CDDE3 FF3544624D00            push dword ptr [004D6244]
* Possible StringData Ref from Code Obj ->" - Serial Number: "
                                  |
:004CDDE9 68B4DF4C00              push 004CDFB4
:004CDDEE FF353C624D00            push dword ptr [004D623C]
:004CDDF4 68D0DF4C00              push 004CDFD0
:004CDDF9 8D45F4                  lea eax, dword ptr [ebp-0C]
:004CDDFC BA08000000              mov edx, 00000008
:004CDE01 E8BA61F3FF              call 00403FC0
:004CDE06 8B45F4                  mov eax, dword ptr [ebp-0C]
:004CDE09 668B0DD4DF4C00          mov cx, word ptr [004CDFD4]
:004CDE10 B202                    mov dl, 02
:004CDE12 E8F9A3F8FF              call 00458210
:004CDE17 E933010000              jmp 004CDF4F
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004CDDC4(C)
|
:004CDE1C 833D68624D00FF          cmp dword ptr [004D6268], FFFFFFFF <--地址
004D6268又是个全局变量,检查试用期是否已过的flag
:004CDE23 0F94C0                  sete al  〈--如果此时004D6268的内容是FFFFF
FFF,那么al=1
:004CDE26 2C01                    sub al, 01
:004CDE28 7207                    jb 004CDE31   <--al=0,jump to 004cde31,即显
示“You are on day X of your 30 day evaluation period”
:004CDE2A 7450                    je 004CDE7C  〈--al=1,jump to 004CDE7C,即显
示"Your evaluation period has expired. Please register NOW if you wish to co
ntinue using "
:004CDE2C E91E010000              jmp 004CDF4F
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004CDE28(C)
|
:004CDE31 6A00                    push 00000000
:004CDE33 FF3518624D00            push dword ptr [004D6218]
* Possible StringData Ref from Code Obj ->"You are on day "
                                  |
:004CDE39 68E0DF4C00              push 004CDFE0
:004CDE3E 8D55F0                  lea edx, dword ptr [ebp-10]
:004CDE41 B81F000000              mov eax, 0000001F
:004CDE46 2B0568624D00            sub eax, dword ptr [004D6268]
:004CDE4C E8A7AFF3FF              call 00408DF8
:004CDE51 FF75F0                  push [ebp-10]
* Possible StringData Ref from Code Obj ->" of your 30 day evaluation period
."
                                  |
:004CDE54 68F8DF4C00              push 004CDFF8
:004CDE59 8D45F4                  lea eax, dword ptr [ebp-0C]
:004CDE5C BA04000000              mov edx, 00000004
:004CDE61 E85A61F3FF              call 00403FC0
:004CDE66 8B45F4                  mov eax, dword ptr [ebp-0C]
:004CDE69 668B0DD4DF4C00          mov cx, word ptr [004CDFD4]
:004CDE70 B202                    mov dl, 02
:004CDE72 E899A3F8FF              call 00458210
:004CDE77 E9D3000000              jmp 004CDF4F
从004CDE28跳转的代码:
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004CDE2A(C)
|
:004CDE7C 6A00                    push 00000000
:004CDE7E FF3518624D00            push dword ptr [004D6218]
* Possible StringData Ref from Code Obj ->"Your evaluation period has expire
d. "
                                        ->"Please register NOW if you wish "

                                        ->"to continue using "
                                  |
:004CDE84 6824E04C00              push 004CE024
:004CDE89 FF3528624D00            push dword ptr [004D6228]
:004CDE8F 68D0DF4C00              push 004CDFD0
:004CDE94 8D45F4                  lea eax, dword ptr [ebp-0C]
:004CDE97 BA04000000              mov edx, 00000004
:004CDE9C E81F61F3FF              call 00403FC0
:004CDEA1 8B45F4                  mov eax, dword ptr [ebp-0C]
         上面的代码你看明白了吗?如果没有问题,那么继续,否则你需先去学习汇编
的基础知识。既然知道了地址004D5FD6是registration flag,那么我们需要找到什么地
方给他赋值,前面已说,赋1即mov byte ptr [004D5FD6], 01,代表已注册。还是在W3
2Dasm中search,你会发现下面的两段代码:
第一段:
* Referenced by a CALL at Address:
|:004C7332
|
:004C7C84 B83C624D00              mov eax, 004D623C
:004C7C89 8B1538624D00            mov edx, dword ptr [004D6238]
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004C7C14(C)
|
:004C7C8F E844C0F3FF              call 00403CD8
:004C7C94 C605D65F4D0001          mov byte ptr [004D5FD6], 01
第二段:
* Referenced by a CALL at Address:
|:004C733F
|
:004C7F90 55                      push ebp
:004C7F91 8BEC                    mov ebp, esp
:004C7F93 83C4F8                  add esp, FFFFFFF8
:004C7F96 53                      push ebx
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004C7F67(C)
|
:004C7F97 33C9                    xor ecx, ecx
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004C7F77(C)
|
:004C7F99 894DF8                  mov dword ptr [ebp-08], ecx
:004C7F9C 8BD8                    mov ebx, eax
:004C7F9E 33C0                    xor eax, eax
:004C7FA0 55                      push ebp
:004C7FA1 6832814C00              push 004C8132
:004C7FA6 64FF30                  push dword ptr fs:[eax]
:004C7FA9 648920                  mov dword ptr fs:[eax], esp
:004C7FAC C605D65F4D0001          mov byte ptr [004D5FD6], 01
:004C7FB3 8B83A4030000            mov eax, dword ptr [ebx+000003A4]
          你发现了什么,这两段代码分别从004C7332,004C733F两个offset处call的
,而且这两个地址离得非常近,让我们再走进一些看看:
* Possible StringData Ref from Code Obj ->"Name"
                                  |
:004C7232 BA94734C00              mov edx, 004C7394
:004C7237 8B45F4                  mov eax, dword ptr [ebp-0C]
:004C723A E8F1D3F9FF              call 00464630
:004C723F 8B55F0                  mov edx, dword ptr [ebp-10]
:004C7242 B844624D00              mov eax, 004D6244
:004C7247 E88CCAF3FF              call 00403CD8
:004C724C 8D4DF0                  lea ecx, dword ptr [ebp-10]
* Possible StringData Ref from Code Obj ->"Company"
                                  |
:004C724F BAA4734C00              mov edx, 004C73A4
:004C7254 8B45F4                  mov eax, dword ptr [ebp-0C]
:004C7257 E8D4D3F9FF              call 00464630
:004C725C 8B55F0                  mov edx, dword ptr [ebp-10]
:004C725F B830624D00              mov eax, 004D6230
:004C7264 E86FCAF3FF              call 00403CD8
:004C7269 8D4DF0                  lea ecx, dword ptr [ebp-10]
* Possible StringData Ref from Code Obj ->"Registration"
                                  |
:004C726C BAB4734C00              mov edx, 004C73B4
:004C7271 8B45F4                  mov eax, dword ptr [ebp-0C]
:004C7274 E8B7D3F9FF              call 00464630
:004C7279 8B55F0                  mov edx, dword ptr [ebp-10]
:004C727C B83C624D00              mov eax, 004D623C
:004C7281 E852CAF3FF              call 00403CD8
* Possible StringData Ref from Code Obj ->"Registration Date"
                                  |
:004C7286 BACC734C00              mov edx, 004C73CC
:004C728B 8B45F4                  mov eax, dword ptr [ebp-0C]
:004C728E E881D6F9FF              call 00464914
:004C7293 2C01                    sub al, 01
:004C7295 7204                    jb 004C729B   <--在W32Dasm debugger状态下,
此处设断点,看看程序在非注册情况下的流程
:004C7297 7433                    je 004C72CC
:004C7299 EB5F                    jmp 004C72FA
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004C7295(C)
|
:004C729B 8B45FC                  mov eax, dword ptr [ebp-04] <--程序跳转到这

:004C729E 8B80BC050000            mov eax, dword ptr [eax+000005BC]
:004C72A4 E86FAEF9FF              call 00462118
:004C72A9 83C4F8                  add esp, FFFFFFF8
:004C72AC DD1C24                  fstp qword ptr [esp]
:004C72AF 9B                      wait
:004C72B0 8D55F0                  lea edx, dword ptr [ebp-10]
* Possible StringData Ref from Code Obj ->"ddddd"
                                  |
:004C72B3 B8E8734C00              mov eax, 004C73E8
:004C72B8 E8973EF4FF              call 0040B154
:004C72BD 8B55F0                  mov edx, dword ptr [ebp-10]
:004C72C0 B834624D00              mov eax, 004D6234
:004C72C5 E80ECAF3FF              call 00403CD8
:004C72CA EB2E                    jmp 004C72FA   〈--继续跳转到004C72FA
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004C7297(C)
|
* Possible StringData Ref from Code Obj ->"Registration Date"
                                  |
:004C72CC BACC734C00              mov edx, 004C73CC
:004C72D1 8B45F4                  mov eax, dword ptr [ebp-0C]
:004C72D4 E82BD4F9FF              call 00464704
:004C72D9 83C4F8                  add esp, FFFFFFF8
:004C72DC DD1C24                  fstp qword ptr [esp]
:004C72DF 9B                      wait
:004C72E0 8D55F0                  lea edx, dword ptr [ebp-10]
* Possible StringData Ref from Code Obj ->"ddddd"
                                  |
:004C72E3 B8E8734C00              mov eax, 004C73E8
:004C72E8 E8673EF4FF              call 0040B154
:004C72ED 8B55F0                  mov edx, dword ptr [ebp-10]
:004C72F0 B834624D00              mov eax, 004D6234
:004C72F5 E8DEC9F3FF              call 00403CD8
* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:004C7299(U), :004C72CA(U)
|
:004C72FA 33C0                    xor eax, eax  〈--又跳转到这里
:004C72FC 5A                      pop edx
:004C72FD 59                      pop ecx
:004C72FE 59                      pop ecx
:004C72FF 648910                  mov dword ptr fs:[eax], edx
:004C7302 6817734C00              push 004C7317
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004C7315(U)
|
:004C7307 8B45F4                  mov eax, dword ptr [ebp-0C]
:004C730A E83DBDF3FF              call 0040304C
:004C730F C3                      ret    〈--执行到这里,jump to 004C7317
:004C7310 E9ABC3F3FF              jmp 004036C0
:004C7315 EBF0                    jmp 004C7307
:004C7317 A0D85F4D00              mov al, byte ptr [004D5FD8]<--又是一个flag

:004C731C 2C01                    sub al, 01
:004C731E 720C                    jb 004C732C   <--可跳转到第一个call,可将jb
-->jmp
:004C7320 7417                    je 004C7339   <--可跳转到第二个call,可将je
-->jmp,但你需要将上一指令改为两个nop
:004C7322 FEC8                    dec al
:004C7324 7420                    je 004C7346   <--正常情况(未注册),从这里
跳转,正好跳过两个包含“mov byte ptr [004D5FD6], 01”的call
:004C7326 FEC8                    dec al
:004C7328 7429                    je 004C7353
:004C732A EB32                    jmp 004C735E
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004C731E(C)
|
:004C732C 8B55F8                  mov edx, dword ptr [ebp-08]
:004C732F 8B45FC                  mov eax, dword ptr [ebp-04]
:004C7332 E84D090000              call 004C7C84  <--第一个call
:004C7337 EB25                    jmp 004C735E
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004C7320(C)
|
:004C7339 8B55F8                  mov edx, dword ptr [ebp-08]
:004C733C 8B45FC                  mov eax, dword ptr [ebp-04]
:004C733F E84C0C0000              call 004C7F90   <--第二个call
:004C7344 EB18                    jmp 004C735E
        你又看到了什么,对了,有几个字符串参考"Name"、"Registration"、"Compa
ny"、"Registration Date",这是程序从windoz注册表里获取我们的注册信息,这本应
调用标准的API函数"RegQueryValuea 或“RegQueryValueExa”而获取的键值,但我前面
已说它是用Delphi编写的,请注意区分。
        获得这些键值后,程序判断注册码是否存在,若存在,正确与否?正确,那么
reg flag值为1,表示已注册,程序的其他部分以此为参考。
        让我们分别Patch 004C731E 和 004C7320两处的指令,在004C731E处,强迫程
序跳到004c732c,结果程序成功注册,再也没有什么nag screen,不过在“关于”中他告
诉你" status:packaged by VBox"。VBox是一个公司,我知道他是专门为共享软件做保
护程序的,如果你是共享软件作者,你可以直接购买他的保护程序,加入你的程序代码
中,无须再编写保护系统。我曾经试图破解用他包装的软件,但我能力有限,至今仍没
有结果,他的代码中有防Debugger的部分,并且某个关键的动态链接库已被加密,不过
我在网上已看到老外的破解程序。
        让我们再看看第二种Patch,程序出现message box,tell you :"This program
is not properly installed. Please re-install 1st Conctact from the JSoft CD-
Rom Collection. The serial number from the CD MUST be entered in the Setup W
izard along with your Name and Company."没关系,让我们在W32Dasm中search一下上
面的字符串,啊,找到了,请看下面的代码:
:004C80CE E83DBFF3FF              call 00404010
:004C80D3 0F95C0                  setne al
:004C80D6 FEC8                    dec al
:004C80D8 7542                    jne 004C811C    <--change jne to jmp
:004C80DA 6A00                    push 00000000
:004C80DC FF3518624D00            push dword ptr [004D6218]
* Possible StringData Ref from Code Obj ->"This program is not properly inst
alled. "
                                        ->"Please re-install "
                                  |
:004C80E2 6804824C00              push 004C8204
:004C80E7 FF3528624D00            push dword ptr [004D6228]
* Possible StringData Ref from Code Obj ->" from the JSoft CD-Rom Collection
. "
                                        ->"The serial number from the CD "
                                        ->"MUST be entered in the Setup Wiza
rd "
                                        ->"along with your Name and Company.
"
                                  |
:004C80ED 6848824C00              push 004C8248
:004C80F2 8D45F8                  lea eax, dword ptr [ebp-08]
:004C80F5 BA04000000              mov edx, 00000004
         将jne改为jmp,程序成功注册,“关于”中他告诉你" status:registered"。
THE PATCH
       在Hex WorkShop中装入CONTACTS.EXE,press F5,填入要修改的十六进制程序代码
的offset,获取方法是在W32Dasm中,用鼠标双击你要修改的指令一行,屏幕将高亮显示
这一行,并在状态栏中标出offset.
       第一种:offset c671eh : 改720C为EB0C
       第二种:offset c671eh : 改720C7417为9090EB17  offset c74d8h : 改7542为
EB42
      If you any comments,suggestion,critic,please email me at dreamtheater@
263.net
2004-8-3 15:54
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
3
Tutor2  How to crack FTP Navigator 4.01
作者:dREAMtHEATER
写作日期: 27th July, 1999
软件背景资料
运行平台: Win9X
文件名称: 1ftpnav.zip
程序类型: FTP类管理工具
下载地点: d85K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6i4k6A6M7%4c8S2i4K6u0W2M7Y4f1`.

文件大小: 256KB
使用的工具
SoftIce V3.25--Win9X Debugger
W32Dasm V8.93--Win9X Dissembler
Hex WorkShop v2.54--Hex Editor
RegSnap V2.51--Registry Tracer
难易程度
Easy( )  Medium(X)  Hard( )  Pro( )
                   ----------=======声明========----------
      本教程只供教学用,其他一切用途皆被禁止。
                ----------=======软件介绍========----------
    FTP Navigator is a program that makes using FTP much simpler. The graphi
cal interface is intuitive to Windows users, and makes transferring files vi
a FTP a easy.
               ----------=======软件的保护机制========----------
     使用时间保存在:
HKEY_LOCAL_MACHINE\Software\CLASSES\MrCom\,可以看出这个键值藏得很隐秘,现在越
来越多的共享软件把安装时间伪装起来,以避免用修改注册表这种低级方式重新获得试
用期,不过这对高手来说,只能算是小伎俩,有了RegSnap这个工具,一切记录在注册表
中东东都会暴露在“光天化日”之下。
     运行程序,首先出现的是nag screen,显示的时间以秒计算,每使用一天其显示时
间就增加一秒,如若你使用了半年还没有注册,那么你就要等待120s,这也是他的等待时
间的极限,为了使用这个软件,要真是等待这么长时间,我们还不要等死!让我们行动
,crack掉它!
                    ----------=======正文========----------
线索
    进入主窗口,发现在标题栏显示“(Unregistered)"
    在W32Dasm中寻找,没找到,我们只剩下最后的线索了。不过我从string data ref
erence中看出此软件是用Delphi编写的,用Delphi写的软件有时真的很难crack,这是因
为在程序中出现的字符串反汇编后有时根本找不到。也不知道Delphi的编译器是怎么编
译的,真的很cool,我绝对是Delphi的崇拜者。
    既然nag screen也是窗口,让我们在SoftIce中设断点:bpx showwindow do "p re
t;"
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0042DBE9(C)
|
:0042DCA4 8B45FC                  mov eax, dword ptr [ebp-04]
:0042DCA7 0FB68036010000          movzx eax, byte ptr [eax+00000136]
:0042DCAE 8B048590274600          mov eax, dword ptr [4*eax+00462790]
:0042DCB5 50                      push eax
:0042DCB6 8B45FC                  mov eax, dword ptr [ebp-04]
:0042DCB9 E82E63FFFF              call 00423FEC
:0042DCBE 50                      push eax
* Reference To: user32.ShowWindow, Ord:0000h
                                  |
:0042DCBF E81C84FDFF              Call 004060E0
:0042DCC4 E905010000              jmp 0042DDCE    <==程序中断在这里
你发现这段代码是从0042DBE9跳转过来的,
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0042DB35(C)
|
:0042DBD5 8B45FC                  mov eax, dword ptr [ebp-04]
:0042DBD8 C6803B01000000          mov byte ptr [eax+0000013B], 00
:0042DBDF 8B45FC                  mov eax, dword ptr [ebp-04]
:0042DBE2 80B83A01000001          cmp byte ptr [eax+0000013A], 01
:0042DBE9 0F85B5000000            jne 0042DCA4     <==是从这里跳转的
:0042DBEF 8B45FC                  mov eax, dword ptr [ebp-04]
:0042DBF2 80B83601000002          cmp byte ptr [eax+00000136], 02
:0042DBF9 7536                    jne 0042DC31
     我试图修改此处的代码,将jne指令变为nop,但不成,看来关键的跳转不在这里
     我们要采取另一方案了--扩大包围圈法。
     所谓扩大包围圈法,即一段代码的出现往往包括在某个子程序中,同时这个子程序
也有可能被包含在其他子程序中,这样层层包含,形成了复杂的程序结构。
     我们现在要做的就是找到呼叫nag screen的最外层的call。
     在SoftIce中重新下bpx showwindow do "p ret;",然后一直按F12,直到出现nag
screen,每按一次F12,你都要记录每个call的Offset,这也许是一种很笨的办法,但这是
最有效的,有时遇到这种情况需要按上F12几十次,看到我的显示器一直在眨眼,我真的
好心疼,为了cracking,我付出的太多了。
     闲话少说,倒数第二次按F12回到了0042E26E
* Referenced by a CALL at Addresses:
|:0043CD41   , :0043D015   , :00458341   , :004589BB   , :00459815
|:0045AE7C   , :0045B2C4   , :0045B9FE   , :0045BC4B   , :0045C4DC
|:00461631
|
:0042E15C 55                      push ebp
    .
    .(Omit)
    .
:0042E263 648922                  mov dword ptr fs:[edx], esp
:0042E266 8B45FC                  mov eax, dword ptr [ebp-04]
:0042E269 E84AFEFFFF              call 0042E0B8
:0042E26E 33D2                    xor edx, edx   <==回到这里
:0042E270 55                      push ebp
     你发现这段代码被11个CALL参考,怎么办呢?到这里你也许会放弃,但作为crack
er,你要有一追到底的精神,要找到nag screen是从这十一个CALL中哪一个呼叫来的,我
的办法是在十一个call处设断点,真的很烦琐,一想到马上看到黎明的曙光你就不烦了

     这部分工作我是在W32Dasm的DEBUG状态下实现的,经实践,呼叫nag screen的CAL
L是00461631
:00461589 648920                  mov dword ptr fs:[eax], esp
:0046158C 85DB                    test ebx, ebx
:0046158E 0F8CBF000000            jl 00461653      <==此处跳转,直接进入主窗

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0046151E(C)
|
:00461594 8B0DC42D4600            mov ecx, dword ptr [00462DC4]
:0046159A 8B09                    mov ecx, dword ptr [ecx]
:0046159C B201                    mov dl, 01
:0046159E A144134600              mov eax, dword ptr [00461344]
:004615A3 E80C9BFCFF              call 0042B0B4
:004615A8 8945FC                  mov dword ptr [ebp-04], eax
:004615AB 33C0                    xor eax, eax
:004615AD 55                      push ebp
:004615AE 684C164600              push 0046164C
:004615B3 64FF30                  push dword ptr fs:[eax]
:004615B6 648920                  mov dword ptr fs:[eax], esp
:004615B9 85DB                    test ebx, ebx
:004615BB 7E44                    jle 00461601    <==此处跳转,出现不进行以秒
计算的nag screen
:004615BD 8D55F8                  lea edx, dword ptr [ebp-08]
:004615C0 8BC3                    mov eax, ebx
:004615C2 E8D15BFAFF              call 00407198
:004615C7 8B55F8                  mov edx, dword ptr [ebp-08]
:004615CA 8B45FC                  mov eax, dword ptr [ebp-04]
:004615CD 8B8000020000            mov eax, dword ptr [eax+00000200]
:004615D3 E8CCEDFBFF              call 004203A4
:004615D8 8B45FC                  mov eax, dword ptr [ebp-04]
:004615DB 8B8008020000            mov eax, dword ptr [eax+00000208]
:004615E1 33D2                    xor edx, edx
:004615E3 89500C                  mov dword ptr [eax+0C], edx
:004615E6 8B45FC                  mov eax, dword ptr [ebp-04]
:004615E9 899814020000            mov dword ptr [eax+00000214], ebx
:004615EF 8B45FC                  mov eax, dword ptr [ebp-04]
:004615F2 8B8008020000            mov eax, dword ptr [eax+00000208]
:004615F8 B201                    mov dl, 01
:004615FA E8BD96FDFF              call 0043ACBC
:004615FF EB1D                    jmp 0046161E     <==此处跳转,出现进行以秒
计算的nag screen
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004615BB(C)
|
:00461601 8B45FC                  mov eax, dword ptr [ebp-04]
:00461604 C7801402000003000000    mov dword ptr [ebx+00000214], 00000003
:0046160E 8B45FC                  mov eax, dword ptr [ebp-04]
:00461611 8B8000020000            mov eax, dword ptr [eax+00000200]
:00461617 B201                    mov dl, 01
:00461619 E8EEECFBFF              call 0042030C
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004615FF(U)
|
:0046161E 8B45FC                  mov eax, dword ptr [ebp-04]
:00461621 8B8008020000            mov eax, dword ptr [eax+00000208]
:00461627 B201                    mov dl, 01
:00461629 E88E96FDFF              call 0043ACBC
:0046162E 8B45FC                  mov eax, dword ptr [ebp-04]
:00461631 E826CBFCFF              call 0042E15C    <==呼叫nag screen的call
:00461636 33C0                    xor eax, eax
       跟踪到这里,我们要进行最后的战役了。
       分析代码,可以看出从0046161E开始处,是从004615FF处无条件跳转过来的,再
往上看,又从004615BB处间接条件跳转过来,中间有很小的一段代码。
       实验前,请先把时间往后调几个月,让nag screen出现进行以秒计算的状态,将
004615BB处的jle改为jmp,看看效果。奇迹出现了,nag screen还是出现,但没有出现以
秒计算的状态,很快进入主窗口,我们已成功了一半。
       有一点我没有说,当你第一次运行此程序时,没有nag screen,看来我们还是有
希望让程序永远地直接进入主窗口。
       我们首先让程序认为他是第一次运行,经过摸索,我发现从注册表删去键值"HK
EY_LOCAL_MACHINE\Software\CLASSES\MrCom\"即可。
       W32DasmDebug状态下,在00461594处设断点,我们到底看看程序是否再执行这段
代码,果然不出我所料,程序是饶过此部分执行的。从哪里饶过的呢?我又在0046158E
处设断点(执行程序之前,请再次删掉上面提到的注册表键值),程序执行到此处中断,
再按F8(step over),跳转到00461653,答案终于找到了。我们只要改jl为jmp
                    ----------=======The Patch========----------
       在文件FTP.EXE的offset:6098E处,修改0F8CBF000000为E9C000000090
2004-8-3 15:55
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
4
Tutor3  How to crack JOC Web Spider 2.50

作者:dREAMtHEATER
E-mail:dreamtheater@263.net
写作日期: 28th, July 1999

软件背景资料

运行平台: Win9X/NT  
文件名称: JOCWS250.EXE
程序类型: Internet工具
下载地点: 01aK9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6h3A6G2j5%4y4G2k6Y4c8Q4x3X3g2U0L8$3@1`.

文件大小: 622KB

使用的工具

SoftIce V3.25--Win9X Debugger
W32Dasm V8.93--Win9X Dissembler
Hex WorkShop v2.54--Hex Editor
RegSnap V2.51--Registry Tracer

难易程度

Easy(x)-Part1  Medium(X)-Part2  Hard( )  Pro( )

                   ----------=======声明========----------

      未经作者同意,不得修改、引用原文,一切权利保留。
      本教程只供教学用,其他一切用途皆被禁止。
               
                ----------=======软件介绍========----------

      JOC Web Spider 2.50 - Download websites FAST!  and navigate offline. Speed your
navigation.  Save time and money.  Uses project files to store list of websites.
Allows diferents modes to store the websites in your HD.  Filters by levels, external
links, directories, include/exclude links, wildcards, etc.  Includes an Update feature
allows to download a project in diferents sessions and remove the unused files, saving
disk space.  Can extrack email addresses from the visited pages.  Uses a new technology
that allows to handle up to 100 conections at the same time.  Includes a new Quick View
option for fast access to web pages. Proxy support, etc.  Easy to use, Compact.

              ----------=======软件的保护机制========-------

      输入Name/Code,未注册时总是先出现注册窗口
      安装时间及使用次数记录在
HKEY_LOCAL_MACHINE\Software\CLASSES\UlDrm9uSoftware53k7\L81a4Fg6i7p\79K8f4R7h8\87f4k2m0
697\@
      删去该键值,即可重新获得试用期

                    ----------=======正文========----------

Part 1

     填名字/注册码:DREAMTHEATER/12121212
     Ctrl-D,进入SoftIce,设断点bpx hmemcpy, 按无数次F12(不要问我多少次 :-),再按F10,来到
这里:

:0040E8DB 52                      push edx
:0040E8DC 8D5588                  lea edx, dword ptr [ebp-78]
:0040E8DF 8B4D08                  mov ecx, dword ptr [ebp+08]
:0040E8E2 8B411C                  mov eax, dword ptr [ecx+1C]
:0040E8E5 8D4DDC                  lea ecx, dword ptr [ebp-24]
:0040E8E8 50                      push eax
:0040E8E9 52                      push edx
:0040E8EA 51                      push ecx
:0040E8EB E810F5FFFF              call 0040DE00    <==验证注册码
:0040E8F0 83C410                  add esp, 00000010
:0040E8F3 85C0                    test eax, eax
:0040E8F5 750D                    jne 0040E904   <==不正确跳转
:0040E8F7 C687D000000002          mov byte ptr [edi+000000D0], 02
:0040E8FE C645F501                mov [ebp-0B], 01
:0040E902 EB5F                    jmp 0040E963

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0040E8F5(C)
|
:0040E904 80BFD000000000          cmp byte ptr [edi+000000D0], 00
:0040E90B 752C                    jne 0040E939
:0040E90D 8D45F6                  lea eax, dword ptr [ebp-0A]

      我曾试图进入那个CALL,寻找Code,但很不幸,徒劳无返。
      我抱着侥幸的态度将0040E8F5 jne改为 nop nop,你猜怎么着,真的工作了,关闭,重新运
行,百分之百的注册了。kewl!
      没想到软件作者如此弱智,他的防御系统如此不堪一击。

Part 2  扩大包围圈法
  
      此软件又是用Delphi编的,现在越来越多的程序员用Delphi编程了,我认为它是最好的面向
对象的编程工具,曾被叫过“VB Killer”,如果你没有学过,赶快突击一下吧。不过我在我的第二
篇Tutor里已说过,经过Delphi的编译器编译以后,有些可参考的字符串不见了,这使cracking的难
度大大加大。

线索
     注册窗口是唯一的线索
     
     在SoftIce中,设断点bpx showwindow do "p ret;",你会反复进入softice3次

     当注册窗口出现时:

:0043B249 50                      push eax
:0043B24A 8B45FC                  mov eax, dword ptr [ebp-04]
:0043B24D E86850FFFF              call 004302BA
:0043B252 50                      push eax

* Reference To: USER32.ShowWindow, Ord:0000h
                                  |
:0043B253 E859530200              Call 004605B1
:0043B258 E904010000              jmp 0043B361  <==程序回到这里

     Press F12,倒数第二次回到

:0043B6D8 648922                  mov dword ptr fs:[edx], esp
:0043B6DB 8B45FC                  mov eax, dword ptr [ebp-04]
:0043B6DE E8CEFEFFFF              call 0043B5B1
:0043B6E3 33D2                    xor edx, edx  <==程序回到这里
:0043B6E5 55                      push ebp
:0043B6E6 689AB74300              push 0043B79A

     再按F12一次,回到注册窗口,press “OK”,又回到SoftIce,继续Press F12,直到

* Referenced by a CALL at Address:
|:00415D54   
|
:00415E24 55                      push ebp
      .
      .(Omit)
      .
:00416069 8BC3                    mov eax, ebx
:0041606B E887550200              call 0043B5F7
:00416070 48                      dec eax   <==程序回到这里

    在0041606B处往上看看有没有明显的跳转语句(其中省略的部分代码很长),没有发现任何可疑部
分,继续press F12,按照此步骤,trace到

* Referenced by a CALL at Address:
|:00415C4F   
|
:0040E86C 55                      push ebp
:0040E86D 8BEC                    mov ebp, esp
:0040E86F 83C488                  add esp, FFFFFF88
:0040E872 53                      push ebx
:0040E873 56                      push esi
:0040E874 57                      push edi
:0040E875 8B7510                  mov esi, dword ptr [ebp+10]
:0040E878 8B7D0C                  mov edi, dword ptr [ebp+0C]
:0040E87B C745F801000000          mov [ebp-08], 00000001
:0040E882 803F00                  cmp byte ptr [edi], 00
:0040E885 0F85E5010000            jne 0040EA70
:0040E88B B301                    mov bl, 01
:0040E88D 33C0                    xor eax, eax
:0040E88F 8945FC                  mov dword ptr [ebp-04], eax
:0040E892 E9BB010000              jmp 0040EA52

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0040EA5A(C)
|
:0040E897 C645DC00                mov [ebp-24], 00
:0040E89B C6458800                mov [ebp-78], 00
:0040E89F 8D5588                  lea edx, dword ptr [ebp-78]
:0040E8A2 8D4DDC                  lea ecx, dword ptr [ebp-24]
:0040E8A5 52                      push edx
:0040E8A6 51                      push ecx
:0040E8A7 8B4624                  mov eax, dword ptr [esi+24]
:0040E8AA 50                      push eax
:0040E8AB FF5620                  call [esi+20]    <==程序回到这里
:0040E8AE 83C40C                  add esp, 0000000C
:0040E8B1 85C0                    test eax, eax
:0040E8B3 0F848F010000            je 0040EA48
:0040E8B9 C745F801000000          mov [ebp-08], 00000001
:0040E8C0 807DDC00                cmp byte ptr [ebp-24], 00

      我们发现这段代码是从0040EA5A处跳转过来

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0040E892(U)
|
:0040EA52 84DB                    test bl, bl
:0040EA54 740A                    je 0040EA60
:0040EA56 837DFC03                cmp dword ptr [ebp-04], 00000003
:0040EA5A 0F8C37FEFFFF            jl 0040E897    <==从此处跳转过来的

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0040EA54(C)
|
:0040EA60 837DFC03                cmp dword ptr [ebp-04], 00000003
:0040EA64 7C0A                    jl 0040EA70
:0040EA66 803F00                  cmp byte ptr [edi], 00
:0040EA69 7505                    jne 0040EA70
:0040EA6B 33D2                    xor edx, edx
:0040EA6D 8955F8                  mov dword ptr [ebp-08], edx

* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:0040E885(C), :0040EA64(C), :0040EA69(C)
|
:0040EA70 8B45F8                  mov eax, dword ptr [ebp-08]
:0040EA73 5F                      pop edi
:0040EA74 5E                      pop esi
:0040EA75 5B                      pop ebx
:0040EA76 8BE5                    mov esp, ebp
:0040EA78 5D                      pop ebp
:0040EA79 C3                      ret

      把0040EA5A处语句NOP掉,测试,Bingo!程序直接进入了主窗口。
      让我们继续测试,将系统时间往后调,使软件过期。新的问题出现了,程序提示你:“Your
evaluation period has been expired”。看来我们还需要继续跟踪,你需要回到这段代码的上一个
CALL,即00415C4F

:00415C4D 53                      push ebx
:00415C4E 56                      push esi
:00415C4F E8188CFFFF              call 0040E86C    <==此CALL
:00415C54 83C40C                  add esp, 0000000C
:00415C57 8BF8                    mov edi, eax
:00415C59 C645FF00                mov [ebp-01], 00
:00415C5D 85FF                    test edi, edi
:00415C5F 0F8496000000            je 00415CFB      <==出现是否过期messagebox的跳转

      我是凭直觉改变00415C5F处je-->jne,改后真的工作了。后来我继续测试,证实稳妥的方式还
是改je为jmp

                  ----------=======The Patch========----------

     Part1    在文件JWS.EXE的offset:0000DEF5处,修改750D为9090
     Part2    在文件JWS.EXE的offset:0000EA5A处,修改0F8C37FEFFFF为909090909090;在
              offset:0001525F处,修改0F8496000000为E99700000090
2004-8-3 15:56
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
5
Tutor4  How to crack CD Player for Win95 Version 1.32

作者:dREAMtHEATER
E-mail:dreamtheater@263.net
写作日期: 30th, July 1999

软件背景资料

运行平台: Win9X  
文件名称: cdply132.zip
程序类型: CD播放器
下载地点: b62K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6K6b7K6i4K6u0W2M7r3q4A6M7W2)9J5k6h3y4G2L8g2)9J5c8Y4m8C8j5i4W2K6k6i4u0Q4x3V1j5`.

文件大小: 378KB

使用的工具

SoftIce V3.25--Win9X Debugger
W32Dasm V8.93--Win9X Dissembler
Hex WorkShop v2.54--Hex Editor
RegSnap V2.51--Registry Tracer

难易程度

Easy(x)  Medium( )  Hard( )  Pro( )

                   ----------=======声明========----------

      未经作者同意,不得修改、引用原文,一切权利保留。
      本教程只供教学用,其他一切用途皆被禁止。
               
                  ----------=======软件介绍========----------

      CD Player is a full featured CD Player that has a touch sensitive LED display.
Shows elapsed time or remaining time. Will also display the title of the song. CD
Player has controls for Stop, Play, Pause, Eject, Skip forward, Skip backward, Seek
forward and Seek backward.  CD Player has touch sensitive controls for continuous play,
random play,  introduction play, and volume. Play lists may also be created. The play
lists may be configured to skip or repeat selected tracks.

                ----------=======软件的保护机制========-------

      单纯的Password保护,未注册时,每次启动均会出现提示请注册的窗口(nag screen),注册后
将code存在HKEY_USERS\.DEFAULT\Software\Kayser\CD Player\Password
      
                     ----------=======正文========----------
      
Part1 寻找HardCode
      
      前面我已说到,此软件只需输入password即可注册,这说明这个code是程序本身内建的
(built-in),专业术语称之为hardcode。
      今天我不讲如何从内存中如何嗅出他的注册码,由于软件作者的弱智,使我数分钟之内找出
他的注册码。
      首先在W32Dasm中反汇编文件pkcdplay.exe,点击工具栏图标“String Data References”,
出现的窗口将列出所有本程序参考的字符串,截取如下:

"U5A"
"Unable to open volume control"
"Unhandled Exception"
"Unknown error"
"Unknown Exception"
"unknown"
"Unknown"
"UsePlayList"
"USER32"
"VW926AR2"     <==Reg Code
"W}A"
"What's this?"
"Written"
"X"
"x"
"X)D"
"x<@"
      
       "VW926AR2"就是code,是不是有点儿简单得让人不敢相信。但这是事实,由于软件作者程序
设计的缺陷,使我们轻而易举地破解掉。
       从以上例子可以看出,W32Dasm的“String Data References”非常的关键,有时可以说是
你破解时唯一可依赖的东西。
       现在所出的共享软件仅用hardcode做保护的比较少了,如果你遇到类似这样的软件,你不要
着急用SoftIce去嗅他的注册码,可以试试此方法,在W32Dasm的“String Data References”中,
把可能象code的字符串(例如字符串是一系列数字组成)用笔记下来,然后在注册窗口中分别去试,
如果你运气好的话,一边偷着乐去吧!

Part2
     
线索

        主窗口标题未注册时显示“CD Player    Unregistered”
        在W32Dasm的“String Data References”中寻找,你发现有两处参考

1)
:004055E4 E8A6710000              call 0040C78F   <==trace into it
:004055E9 59                      pop ecx
:004055EA 84C0                    test al, al
:004055EC 750D                    jne 004055FB    <==注册时跳转

* Possible StringData Ref from Data Obj ->"CD Player    Unregistered"
                                  |
:004055EE 68BAA04400              push 0044A0BA
:004055F3 53                      push ebx

* Reference To: KERNEL32.lstrcpyA, Ord:0000h
                                  |
:004055F4 E8FA250400              Call 00447BF3

2)
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00402DAA(C)
|

* Possible StringData Ref from Data Obj ->"CD Player    Unregistered"
                                  |
:00402DB7 682C954400              push 0044952C

         经验证,第一部分是我们需要的,具体分析过程我就不再赘述了。
         在004055E4至004055EC处又是经典的call/test/conditional jump语句,让我们trace
into那个call

* Referenced by a CALL at Addresses:
|:00404240   , :004055E4   
|
:0040C78F 55                      push ebp
:0040C790 8BEC                    mov ebp, esp
:0040C792 83C4F4                  add esp, FFFFFFF4
:0040C795 53                      push ebx
:0040C796 56                      push esi
:0040C797 33DB                    xor ebx, ebx
:0040C799 8D45F8                  lea eax, dword ptr [ebp-08]
:0040C79C 50                      push eax
:0040C79D 8D55FC                  lea edx, dword ptr [ebp-04]
:0040C7A0 52                      push edx
:0040C7A1 6A00                    push 00000000
:0040C7A3 683F000F00              push 000F003F
:0040C7A8 6A00                    push 00000000

* Possible StringData Ref from Data Obj ->"CD Player"
                                  |
:0040C7AA 688FA54400              push 0044A58F
:0040C7AF 6A00                    push 00000000

* Possible StringData Ref from Data Obj ->"Software\Kayser\CD Player\Password"
                                  |
:0040C7B1 686CA54400              push 0044A56C
:0040C7B6 6801000080              push 80000001

* Reference To: ADVAPI32.RegCreateKeyExA, Ord:0000h
                                  |
:0040C7BB E8EDB70300              Call 00447FAD
:0040C7C0 8D4DF4                  lea ecx, dword ptr [ebp-0C]
:0040C7C3 51                      push ecx
:0040C7C4 6A00                    push 00000000
:0040C7C6 6A00                    push 00000000
:0040C7C8 6A00                    push 00000000
:0040C7CA 6A00                    push 00000000
:0040C7CC FF75FC                  push [ebp-04]

* Reference To: ADVAPI32.RegQueryValueExA, Ord:0000h
                                  |
:0040C7CF E8D3B70300              Call 00447FA7
:0040C7D4 FF75F4                  push [ebp-0C]
:0040C7D7 E8448A0300              call 00445220
:0040C7DC 8BF0                    mov esi, eax
:0040C7DE 8D45F4                  lea eax, dword ptr [ebp-0C]
:0040C7E1 59                      pop ecx
:0040C7E2 50                      push eax
:0040C7E3 56                      push esi
:0040C7E4 6A00                    push 00000000
:0040C7E6 6A00                    push 00000000
:0040C7E8 6A00                    push 00000000
:0040C7EA FF75FC                  push [ebp-04]

* Reference To: ADVAPI32.RegQueryValueExA, Ord:0000h
                                  |
:0040C7ED E8B5B70300              Call 00447FA7

* Possible StringData Ref from Data Obj ->"VW926AR2"    <==看到了什么
                                  |
:0040C7F2 6899A54400              push 0044A599
:0040C7F7 56                      push esi

* Reference To: KERNEL32.lstrcmpiA, Ord:0000h
                                  |
:0040C7F8 E8BAB30300              Call 00447BB7
:0040C7FD 85C0                    test eax, eax
:0040C7FF 7509                    jne 0040C80A
:0040C801 C6053F44450001          mov byte ptr [0045443F], 01
:0040C808 B301                    mov bl, 01

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0040C7FF(C)
|
:0040C80A FF75FC                  push [ebp-04]

* Reference To: ADVAPI32.RegCloseKey, Ord:0000h
                                  |
:0040C80D E8A1B70300              Call 00447FB3
:0040C812 56                      push esi
:0040C813 E8B0890300              call 004451C8
:0040C818 59                      pop ecx
:0040C819 8BC3                    mov eax, ebx
:0040C81B 5E                      pop esi
:0040C81C 5B                      pop ebx
:0040C81D 8BE5                    mov esp, ebp
:0040C81F 5D                      pop ebp
:0040C820 C3                      ret

       Cool!这段代码寻找注册表中的注册码,并验证是否正确,以寄存器al为返回值。若al=1,即
表示已注册。你还发现此段代码还被另一个地方呼叫,经验证,是检查程序启始是否出现nag
screen。
       好!我们怎么修改此段代码呢?我没有再仔细分析这段代码,既然他需要用al作为返回值,
并且等于1为注册,我用了最简单的方法:
       在0040C78F处,修改代码为mov eax, 00000001; ret
       不要告诉我你不太明白。最后,还需提醒你,这也是最关键的,那就是请注意堆栈(Stack)
平衡,否则会使你的系统#$%@^!* 其方法就是看看CALL语句的前面是否有参数被Push, 以及CALl后
是否被Pop掉。
       到此为止,该收兵了!      

                  ----------=======The Patch========----------

       在文件pkcdplay.exe的offset:0000BD8F处,修改558BEC83C4F4 为 B801000000C3
2004-8-3 15:56
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
6
Tutor 5 How to crack ZanNet 1.0  Build 8121

作者:dREAMtHEATER
E-mail:dreamtheater@263.net
写作日期:30th, July 1999

软件背景资料

运行平台: Win9X  
文件名称: zannetr1.zip
程序类型: ServerClient管理
下载地点: 36dN6%4N6%4i4K6u0W2P5X3q4F1L8X3g2@1i4K6u0W2j5$3!0E0
文件大小: 383KB

使用的工具

SoftIce V3.25--Win9X Debugger
W32Dasm V8.93--Win9X Dissembler
Hex WorkShop v2.54--Hex Editor
RegSnap V2.51--Registry Tracer

难易程度

Easy(x)  Medium( )  Hard( )  Pro( )

                   ----------=======声明========----------

      未经作者同意,不得修改、引用原文,一切权利保留。
      本教程只供教学用,其他一切用途皆被禁止。
               
                  ----------=======软件介绍========----------

     ZanNet is a Windows 95 or 98 network client and Unix server that provide you with
a Windows 95/98 network drive to access your server files. The product includes network
provider and redirector for Windows 95/98 in addition to a Unix server. The server
portion ships with both POSIX compliant source code and binary support for select Unix
platforms. ZanNet is intended to replace both File Transfer Protocol (FTP) and Telnet
programs currently used to access web page and other files through an Internet Service
Provider (ISP).

                ----------=======软件的保护机制========-------

       有三十天试用期,未注册时启动时出现nagscreen,提示你已使用多少天,安装时间保存在
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Nls\Oem5A\US
       注册时,只需输入Reg Code,但不是hard code,后面会详细解释。注册后,注册信息保存在
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\ZanNet\NetworkProvider\GlobalSetti
ngs\RegistrationKey

                    ----------=======正文========----------

Part1   最简单的注册码计算法

       在SoftIce中设断点bpx getdlgitemtexta do "p ret;",Ctrl-D回到注册窗口,press
"Apply" button,重新回到SoftIce中,输入"bc *"

* Reference To: USER32.GetDlgItemTextA, Ord:00EDh
                                  |
:10007568 FF1560E60110            Call dword ptr [1001E660]
:1000756E 688CC40110              push 1001C48C   <==回到这里
:10007573 E8D85D0000              call 1000D350   〈==计算注册码
:10007578 83C404                  add esp, 00000004
:1000757B 85C0                    test eax, eax
:1000757D 7513                    jne 10007592    <== if EAX=1,then jump 10007592
:1000757F 6A10                    push 00000010

* Possible StringData Ref from Data Obj ->"ZanNet Error"
                                  |
:10007581 6890920110              push 10019290

* Possible StringData Ref from Data Obj ->"Your registration is not valid"
                                  |
:10007586 68749E0110              push 10019E74

       让我们trace into 1000D350

* Referenced by a CALL at Addresses:
|:10007573   , :10007B1F   
|
:1000D350 8B542404                mov edx, dword ptr [esp+04]   <==edx指向输入的 code
:1000D354 57                      push edi
:1000D355 8BFA                    mov edi, edx    <==令edi同样指向输入的 code
:1000D357 B9FFFFFFFF              mov ecx, FFFFFFFF   <==ecx为循环记数器
:1000D35C 2BC0                    sub eax, eax   〈== eax=0
:1000D35E F2                      repnz
:1000D35F AE                      scasb
:1000D360 F7D1                    not ecx
:1000D362 49                      dec ecx   <== 以上几步算出输入的 code的长度
:1000D363 83F910                  cmp ecx, 00000010   〈==ecx与0x10即十进制16相比,这意
味着你必须输入16个字符
:1000D366 7404                    je 1000D36C    〈==若等于16,jump to 1000D36C
:1000D368 33C0                    xor eax, eax
:1000D36A 5F                      pop edi
:1000D36B C3                      ret

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:1000D366(C)
|
:1000D36C 803A5A                  cmp byte ptr [edx], 5A  〈==取输入code的第一个字符,
并与0x5A比较,0x5A为ASCII码"Z"
:1000D36F 7404                    je 1000D375   <==若相等,jump to 1000D375
:1000D371 33C0                    xor eax, eax
:1000D373 5F                      pop edi
:1000D374 C3                      ret

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:1000D36F(C)
|
:1000D375 807A014E                cmp byte ptr [edx+01], 4E   〈==取输入code的第二个字
符,并与0x4E比较,0x4E为ASCII码"N"
:1000D379 7404                    je 1000D37F   <==若相等,jump to 1000D37F
:1000D37B 33C0                    xor eax, eax
:1000D37D 5F                      pop edi
:1000D37E C3                      ret

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:1000D379(C)
|
:1000D37F 807A0231                cmp byte ptr [edx+02], 31   〈==取输入code的第三个字
符,并与0x31比较,0x31为ASCII码"1"
:1000D383 7404                    je 1000D389  〈==若相等,jump to 1000D389
:1000D385 33C0                    xor eax, eax
:1000D387 5F                      pop edi
:1000D388 C3                      ret

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:1000D383(C)
|
:1000D389 807A0330                cmp byte ptr [edx+03], 30  〈==取输入code的第四个字符
,并与0x比较,0x30为ASCII码"0"
:1000D38D 7404                    je 1000D393   〈==若相等,jump to 1000D393
:1000D38F 33C0                    xor eax, eax
:1000D391 5F                      pop edi
:1000D392 C3                      ret

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:1000D38D(C)
|
:1000D393 807A0441                cmp byte ptr [edx+04], 41  〈==取输入code的第五个字符
,并与0x41比较,0x41为ASCII码"A"
:1000D397 7404                    je 1000D39D   〈==若相等,jump to 1000D39D
:1000D399 33C0                    xor eax, eax
:1000D39B 5F                      pop edi
:1000D39C C3                      ret

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:1000D397(C)
|
:1000D39D 807A052D                cmp byte ptr [edx+05], 2D   〈==取输入code的第六个字
符,并与0x2D比较,0x2D为ASCII码"-"
:1000D3A1 7404                    je 1000D3A7   〈==若相等,jump to 1000D3A7
:1000D3A3 33C0                    xor eax, eax
:1000D3A5 5F                      pop edi
:1000D3A6 C3                      ret

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:1000D3A1(C)
|
:1000D3A7 807A0639                cmp byte ptr [edx+06], 39   〈==取输入code的第七个字
符,并与0x39比较,0x39为ASCII码"9"
:1000D3AB 7404                    je 1000D3B1   〈==若相等,jump to 1000D3B1
:1000D3AD 33C0                    xor eax, eax
:1000D3AF 5F                      pop edi
:1000D3B0 C3                      ret

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:1000D3AB(C)
|
:1000D3B1 807A0730                cmp byte ptr [edx+07], 30  〈==取输入code的第八个字符
,并与0x30比较,0x30为ASCII码"0"
:1000D3B5 7404                    je 1000D3BB    〈==若相等,jump to 1000D3BB
:1000D3B7 33C0                    xor eax, eax
:1000D3B9 5F                      pop edi
:1000D3BA C3                      ret

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:1000D3B5(C)
|
:1000D3BB 807A0837                cmp byte ptr [edx+08], 37  〈==取输入code的第九个字符
,并与0x37比较,0x37为ASCII码"7"
:1000D3BF 7404                    je 1000D3C5     〈==若相等,jump to 1000D3C5
:1000D3C1 33C0                    xor eax, eax
:1000D3C3 5F                      pop edi
:1000D3C4 C3                      ret

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:1000D3BF(C)
|
:1000D3C5 8A4209                  mov al, byte ptr [edx+09]  <==取输入code的第九个字符
,并将其赋值给寄存器AL
:1000D3C8 5F                      pop edi
:1000D3C9 2C39                    sub al, 39   <== AL-0x39 --> AL
:1000D3CB 3C01                    cmp al, 01   <==AL与0x01比较  
:1000D3CD 1BC0                    sbb eax, eax 〈==eax自身做有符号减法
:1000D3CF F7D8                    neg eax      <==求eax的补数
:1000D3D1 C3                      ret

        看懂上面的分析了吗?最简单的注册码计算,注册码的前九位是“ZN10A-907”,第十位是
“9”才能保证Call的返回值eax=1,注册码的后六位可以是任意字符,因此注册码的形式为
"ZN10A-9079xxxxxx"。

Part2  
      
      程序保护代码做在文件zannp32.dll,在W32Dasm中将其反汇编。

线索  

      在W32Dasm的Dialog Information中你会发现窗口nag screen 是Dialog。
      每个dialog都有他唯一的ID编号,每个dialog上有很多控件(Control),他们分别属于不同的
类(Class),例如"BUTTON"、"STATIC"等等。
      本例中,nagscreen的ID号:0x008F,上面有14个Control,dialog的标题为"ZanNet"

Name: DialogID_008F, # of Controls=014, Caption:"ZanNet", ClassName:""
     001 - ControlID:0001, Control Class:"BUTTON" Control Text:"I Agree..."
     002 - ControlID:0002, Control Class:"BUTTON" Control Text:"Quit"
     003 - ControlID:FFFF, Control Class:"STATIC" Control Text:"ZanNet Version 1.0"
     004 - ControlID:FFFF, Control Class:"STATIC" Control Text:"Copyright ?1996-1998
by Zan Software"
     005 - ControlID:FFFF, Control Class:"STATIC" Control Text:"11224 83rd Place NE,
Kirkland, WA 98034"
     006 - ControlID:FFFF, Control Class:"STATIC" Control Text:"This is a fully
functional unregistered version for evaluation only. You can r"
     007 - ControlID:FFFF, Control Class:"BUTTON" Control Text:"Agreement"
     008 - ControlID:FFFF, Control Class:"STATIC" Control Text:"I understand that I may
use the unregistered version of ZanNet for evaluation "
     009 - ControlID:FFFF, Control Class:"STATIC" Control Text:"Days Using ZanNet:"
     010 - ControlID:043F, Control Class:"STATIC" Control Text:""
     011 - ControlID:0440, Control Class:"STATIC" Control Text:""
     012 - ControlID:0414, Control Class:"BUTTON" Control Text:"Remove ZanNet"
     013 - ControlID:0441, Control Class:"BUTTON" Control Text:"Order Now..."
     014 - ControlID:FFFF, Control Class:"BUTTON" Control Text:"Zan Software:
719K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6i4A6S2L8X3&6W2N6q4)9J5k6h3y4G2L8b7`.`.

      在W32Dasm中,search "ID_008F",你会找到很多,到底哪个是我们需要的呢?有类似这样的

      * Possible Reference to Dialog: DialogID_008F, CONTROL_ID:0441, "Order Now..."
这表明是他下面的代码是针对这个dialog上的某个control,而
      * Possible Reference to Dialog: DialogID_008F
表明是他下面的代码是针对这个dialog窗口的,一般情况下,在整个程序代码中只出现一次,但并
不是绝对的。
      本例中,我只找到了一处相对应的代码

:10007B18 7416                    je 10007B30     <==注册表没有注册信息直接jump to
10007B30
:10007B1A 688CC40110              push 1001C48C
:10007B1F E82C580000              call 1000D350   <==验证Reg Code
:10007B24 83C404                  add esp, 00000004
:10007B27 85C0                    test eax, eax
:10007B29 7405                    je 10007B30     <==Reg Code不对,jump to 10007B30
:10007B2B BB01000000              mov ebx, 00000001  <==否则,ebx=1

* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:10007B18(C), :10007B29(C)
|
:10007B30 85DB                    test ebx, ebx
:10007B32 7528                    jne 10007B5C     <==if already registered,then jump
to 10007B5C
:10007B34 6A00                    push 00000000
:10007B36 6880780010              push 10007880
:10007B3B 6A00                    push 00000000

* Possible Reference to Dialog: DialogID_008F      <==nag screen
                                  |
:10007B3D 688F000000              push 0000008F
      
       只需改10007B32处 jne为jmp,never show nagscreen,kool!

                   ----------=======The Patch========----------

       在文件zannp32.dll的offset:0x00006F32处,修改7528为EB28
2004-8-3 15:57
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
7
Tutor6  How to crack StayAlive 2.0d

作者:dREAMtHEATER
E-mail:dreamtheater@263.net
写作日期: 31th, July 1999

软件背景资料

运行平台: Win9X/NT
文件名称: sa20d.zip
程序类型: 系统增强工具
下载地点: 6c2K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6i4c8X3K9g2)9J5k6s2c8W2j5$3S2F1L8$3I4G2k6%4W2Q4x3X3g2U0L8$3@1`.

文件大小: 395KB

使用的工具

SoftIce V3.25--Win9X Debugger
W32Dasm V8.93--Win9X Dissembler
Hex WorkShop v2.54--Hex Editor
RegSnap V2.51--Registry Tracer

难易程度

Easy(x)-Part1  Medium(x)-Part2  Hard( )  Pro( )

                   ----------=======声明========----------

      未经作者同意,不得修改、引用原文,一切权利保留。
      本教程只供教学用,其他一切用途皆被禁止。
               
                  ----------=======软件介绍========----------
      
      软件的作者这样说:
      The goal of StayAlive is to keep your applications running when they crash,
allowing you to save your work and exit the application gracefully.  In fulfilling this
goal we hope that StayAlive makes you more productive and removes the frustration of
losing hours of work when an application crashes.
     
                ----------=======软件的保护机制========-------

     典型的name/code形式,安装时间记录在
HKEY_LOCAL_MACHINE\Software\CLASSES\CLSID\{02501B06-8899-11d2-A166-00A0C9AB415D}\

程序启动时,会出现启动画面(splash screen),但过期后,会使splash screen停留时间延长,让
你达到无法忍受的程度,随后还会出现请注册的dialog,不注册只能退出程序。
     注册后,name/code写在
HKEY_LOCAL_MACHINE\Software\TFI Technology Ltd\StayAlive\User
HKEY_LOCAL_MACHINE\Software\TFI Technology Ltd\StayAlive\License

                    ----------=======正文========----------

Part1  Snippet out code

      在注册窗口,填入我的neme:dREAMtHEATER;code:1212121,你会发现“OK”按钮始终保持禁按
状态(呈灰色),没关系,按照我在tutor1中教的方法:
      Ctrl-D,进入SoftIce,设断点bpx hmemcpy,Ctrl-D,重新回到注册窗口,在code中再填入一
位数字2,你会立刻重新回到SoftIce中,再次按“Ctrl-D”,又回到SoftIce中,按数次F12,你会看
到下面的代码,同时你会发现偏移地址是2500xxxx形式,后来经验证,代码是在sares.dll中:

:25005199 8D45EC                  lea eax, dword ptr [ebp-14]   <==SoftIce返回这里
:2500519C 6A11                    push 00000011
:2500519E 50                      push eax
:2500519F 68EF030000              push 000003EF
:250051A4 FF7604                  push [esi+04]
:250051A7 FFD7                    call edi
:250051A9 50                      push eax
:250051AA FFD3                    call ebx
:250051AC 8D45EC                  lea eax, dword ptr [ebp-14]  <==指向我们输入的fake
code
:250051AF 50                      push eax
:250051B0 8D85ECFEFFFF            lea eax, dword ptr [ebp+FFFFFEEC]  <==指向name
:250051B6 50                      push eax
:250051B7 E866160000              call 25006822    <==计算注册码的CALL
:250051BC 59                      pop ecx
:250051BD 59                      pop ecx
:250051BE 50                      push eax
:250051BF FFB620010000            push dword ptr [esi+00000120]

        Trace into call 25006822

* Referenced by a CALL at Addresses:
|:250051B7   , :2500654B   
|
:25006822 55                      push ebp
:25006823 8BEC                    mov ebp, esp
:25006825 83EC14                  sub esp, 00000014
:25006828 FF750C                  push [ebp+0C]

* Reference To: KERNEL32.lstrlenA, Ord:0308h     <==API函数lstrlenA检查我们输入的code的
长度
                                  |
:2500682B FF15F4100125            Call dword ptr [250110F4]
:25006831 83F810                  cmp eax, 00000010   〈==返回值eax与0x10比较,这表明你
必须输入16个字符
:25006834 7404                    je 2500683A     〈==相等,jump to 2500683A,继续检验
,否则返回
:25006836 33C0                    xor eax, eax     <==eax=0
:25006838 C9                      leave
:25006839 C3                      ret

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:25006834(C)
|
:2500683A 8D45EC                  lea eax, dword ptr [ebp-14]
:2500683D 50                      push eax
:2500683E FF7508                  push [ebp+08]
:25006841 E842FFFFFF              call 25006788   <==key maker的CALL
:25006846 59                      pop ecx
:25006847 8D45EC                  lea eax, dword ptr [ebp-14]  <=="d eax"你会在SoftIce
的数据窗口发现real code
:2500684A 59                      pop ecx
:2500684B FF750C                  push [ebp+0C]    <==指向fake code的首地址
:2500684E 50                      push eax         <==指向Real code的首地址

* Reference To: KERNEL32.lstrcmpA, Ord:02FCh     <==Api函数:lstrcmpA比较字符串
                                  |
:2500684F FF1574100125            Call dword ptr [25011074]
:25006855 F7D8                    neg eax   
:25006857 1BC0                    sbb eax, eax
:25006859 40                      inc eax     <==如果相等,返回值eax=1
:2500685A C9                      leave  
:2500685B C3                      ret
      
     我自己的注册信息 name :dREAMtHEATER  code: PLGKBBLIMFGFDNGH
     本例中,你应学会一个非常重要的API函数:lstrcmpA。它的形式:
    int lstrcmp( LPCTSTR lpString1,     // address of first string
                LPCTSTR lpString2       // address of second string );
详细信息请查看Win32编程参考手册。     
   
Part2

线索

      过期后,出现对话框(dialog box)告诉你已过期,在W32Dasm的Dialog Information中你会
发现:

Name: DialogID_008A, # of Controls=007, Caption:"StayAlive Evaluation", ClassName:""
     001 - ControlID:0001, Control Class:"BUTTON" Control Text:"OK"
     002 - ControlID:FFFF, Control Class:"STATIC" Control Text:""
     003 - ControlID:040B, Control Class:"STATIC" Control Text:"Thank you for trying
StayAlive"
     004 - ControlID:03F1, Control Class:"BUTTON" Control Text:"&Buy Now..."
     005 - ControlID:0409, Control Class:"BUTTON" Control Text:"&Unlock"
     006 - ControlID:FFFF, Control Class:"STATIC" Control Text:"Your evaluation period
has expired."
     007 - ControlID:FFFF, Control Class:"STATIC" Control Text:"StayAlive is the best
crash protection software for Windows.  To continue to b"

      在W32Dasm中寻找“ID_008A”,你会找到两处:

第一处:

* Referenced by a CALL at Address:
|:00408E30   
|
:00403872 56                      push esi
:00403873 8BF1                    mov esi, ecx
:00403875 FF742408                push [esp+08]

* Possible Reference to Dialog: DialogID_008A    〈==ID_008A
                                  |
:00403879 688A000000              push 0000008A
:0040387E E893840100              call 0041BD16
:00403883 83665C00                and dword ptr [esi+5C], 00000000
:00403887 C706C0EA4200            mov dword ptr [esi], 0042EAC0
:0040388D 8BC6                    mov eax, esi
:0040388F 5E                      pop esi
:00403890 C20400                  ret 0004

第二处:

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004122BF(C)
|
:004122CA 3D920000C0              cmp eax, C0000092
:004122CF 7507                    jne 004122D8

* Possible Reference to Dialog: DialogID_008A    〈==ID_008A
                                  |
:004122D1 C746588A000000          mov [esi+58], 0000008A

       经分析,第一处需要我们继续分析,它是从00408E30处CALL来的,让我们去那里看看:

:00408DF2 50                      push eax
:00408DF3 C645FC04                mov [ebp-04], 04
:00408DF7 E8F2030200              call 004291EE
:00408DFC E8662A0000              call 0040B867     <==寻找注册信息,并进行检验
:00408E01 85C0                    test eax, eax
:00408E03 756D                    jne 00408E72     〈==已注册,jump to 00408E72
:00408E05 395DC4                  cmp dword ptr [ebp-3C], ebx
:00408E08 750C                    jne 00408E16    〈==
:00408E0A 53                      push ebx
:00408E0B 8D8DA8FEFFFF            lea ecx, dword ptr [ebp+FFFFFEA8]
:00408E11 E8AAF5FFFF              call 004083C0

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00408E08(C)
|
:00408E16 395DB0                  cmp dword ptr [ebp-50], ebx
:00408E19 740E                    je 00408E29     〈==30天试用期已过,即跳转至00408E29
:00408E1B FF75B0                  push [ebp-50]

* Reference To: KERNEL32.SetEvent, Ord:0265h
                                  |
:00408E1E FF1510E34200            Call dword ptr [0042E310]
:00408E24 E9D8020000              jmp 00409101

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00408E19(C)
|
:00408E29 53                      push ebx
:00408E2A 8D8D28FFFFFF            lea ecx, dword ptr [ebp+FFFFFF28]

:00408E30 E83DAAFFFF              call 00403872       <=="DialogID_008A"从这里呼叫
:00408E35 8D8528FFFFFF            lea eax, dword ptr [ebp+FFFFFF28]
:00408E3B 8D8D28FFFFFF            lea ecx, dword ptr [ebp+FFFFFF28]
   
      再让我们trace into call 0040B867

* Referenced by a CALL at Addresses:
|:00408DFC   , :00408E50   
|
:0040B867 55                      push ebp
:0040B868 8BEC                    mov ebp, esp
:0040B86A 81EC1C010000            sub esp, 0000011C
:0040B870 8D45E4                  lea eax, dword ptr [ebp-1C]
:0040B873 50                      push eax
:0040B874 8D85E4FEFFFF            lea eax, dword ptr [ebp+FFFFFEE4]
:0040B87A 50                      push eax
:0040B87B E8AFFCFFFF              call 0040B52F   <==从注册表提取信息,并验证
:0040B880 59                      pop ecx
:0040B881 85C0                    test eax, eax    〈==返回值eax进行test检查
:0040B883 59                      pop ecx
:0040B884 7405                    je 0040B88B   
:0040B886 6A01                    push 00000001     〈==if eax=1,then push 00000001
:0040B888 58                      pop eax            <==pop后,eax=1
:0040B889 C9                      leave
:0040B88A C3                      ret

     再进一步trace into call 0040B52F

* Referenced by a CALL at Addresses:
|:0040126A   , :00407838   , :0040B87B   , :0040B8B6   
|
:0040B52F 55                      push ebp
:0040B530 8BEC                    mov ebp, esp
:0040B532 81EC24010000            sub esp, 00000124
:0040B538 8B450C                  mov eax, dword ptr [ebp+0C]
:0040B53B 53                      push ebx
:0040B53C 56                      push esi
:0040B53D 57                      push edi
:0040B53E 8B7D08                  mov edi, dword ptr [ebp+08]
:0040B541 33DB                    xor ebx, ebx
:0040B543 895DFC                  mov dword ptr [ebp-04], ebx
:0040B546 C745F011000000          mov [ebp-10], 00000011
:0040B54D 881F                    mov byte ptr [edi], bl
:0040B54F 8818                    mov byte ptr [eax], bl
:0040B551 8D4508                  lea eax, dword ptr [ebp+08]
:0040B554 C745F800010000          mov [ebp-08], 00000100
:0040B55B 50                      push eax
:0040B55C FF3510A64300            push dword ptr [0043A610]
:0040B562 6802000080              push 80000002

* Reference To: ADVAPI32.RegOpenKeyA, Ord:0171h    <==
                                  |
:0040B567 FF1514E04200            Call dword ptr [0042E014]
:0040B56D 85C0                    test eax, eax
:0040B56F 0F858A000000            jne 0040B5FF
:0040B575 8D45F0                  lea eax, dword ptr [ebp-10]

* Reference To: ADVAPI32.RegQueryValueExA, Ord:017Bh   <==
                                  |
:0040B578 8B3500E04200            mov esi, dword ptr [0042E000]
:0040B57E 50                      push eax
:0040B57F 8D45DC                  lea eax, dword ptr [ebp-24]
:0040B582 50                      push eax
:0040B583 8D45F4                  lea eax, dword ptr [ebp-0C]
:0040B586 50                      push eax
:0040B587 53                      push ebx
:0040B588 FF3514A64300            push dword ptr [0043A614]
:0040B58E FF7508                  push [ebp+08]
:0040B591 FFD6                    call esi
:0040B593 85C0                    test eax, eax
:0040B595 7526                    jne 0040B5BD
:0040B597 8D45F8                  lea eax, dword ptr [ebp-08]
:0040B59A 50                      push eax
:0040B59B 8D85DCFEFFFF            lea eax, dword ptr [ebp+FFFFFEDC]
:0040B5A1 50                      push eax
:0040B5A2 8D45F4                  lea eax, dword ptr [ebp-0C]
:0040B5A5 50                      push eax
:0040B5A6 53                      push ebx
:0040B5A7 FF3518A64300            push dword ptr [0043A618]
:0040B5AD FF7508                  push [ebp+08]
:0040B5B0 FFD6                    call esi
:0040B5B2 85C0                    test eax, eax
:0040B5B4 7507                    jne 0040B5BD
:0040B5B6 C745FC01000000          mov [ebp-04], 00000001

* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:0040B595(C), :0040B5B4(C)
|
:0040B5BD FF7508                  push [ebp+08]

* Reference To: ADVAPI32.RegCloseKey, Ord:015Bh
                                  |
:0040B5C0 FF1508E04200            Call dword ptr [0042E008]
:0040B5C6 395DFC                  cmp dword ptr [ebp-04], ebx
:0040B5C9 7434                    je 0040B5FF      <==没有找到相应的注册表键值,jump to
0040B5FF,否则继续验证
:0040B5CB 8D45DC                  lea eax, dword ptr [ebp-24]
:0040B5CE 50                      push eax
:0040B5CF 8D85DCFEFFFF            lea eax, dword ptr [ebp+FFFFFEDC]
:0040B5D5 50                      push eax
:0040B5D6 E852020000              call 0040B82D    〈==验证注册码
:0040B5DB 59                      pop ecx
:0040B5DC 85C0                    test eax, eax
:0040B5DE 59                      pop ecx
:0040B5DF 741E                    je 0040B5FF       〈==注册码不正确,jump to 0040B5FF

* Reference To: KERNEL32.lstrcpyA, Ord:0302h
                                  |
:0040B5E1 8B3584E24200            mov esi, dword ptr [0042E284]
:0040B5E7 8D85DCFEFFFF            lea eax, dword ptr [ebp+FFFFFEDC]
:0040B5ED 50                      push eax
:0040B5EE 57                      push edi
:0040B5EF FFD6                    call esi
:0040B5F1 8D45DC                  lea eax, dword ptr [ebp-24]
:0040B5F4 50                      push eax
:0040B5F5 FF750C                  push [ebp+0C]
:0040B5F8 FFD6                    call esi
:0040B5FA 6A01                    push 00000001
:0040B5FC 58                      pop eax
:0040B5FD EB02                    jmp 0040B601

* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:0040B56F(C), :0040B5C9(C), :0040B5DF(C)
|
:0040B5FF 33C0                    xor eax, eax    <==异或的结果eax=0

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0040B5FD(U)
|
:0040B601 5F                      pop edi
:0040B602 5E                      pop esi
:0040B603 5B                      pop ebx
:0040B604 C9                      leave
:0040B605 C3                      ret
     
      如果你trace into call 0040B82D,你会发现代码是与Part1中检验注册码的部分一样,这里
就不列出了。
      这时候会有人问了,我们到底需要Patch哪部分代码?有几个方案,但我只讲一个最佳方案。
      认真分析后,可看到0040B52F后处的代码被:0040126A   , :00407838   , :0040B87B   ,
:0040B8B6四处参考,若注册,返回值eax应等于1。那我们在0040B52F处,修改代码为mov eax,
00000001;Ret
      重新启动程序,验证是否注册,Bingo!百分之百注册!
      有一点我要说,在splash screen上显示的仍是未注册的信息,这部分代码做在sares.dll中
,不影响程序运行,为了art of cracking,感兴趣的你可自行修改,这里就不再赘述。

                    ----------=======The Patch========----------

       在文件sa.exe的offset:0000B52F处,修改558BEC81EC24 为B801000000C3
2004-8-3 15:58
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
8
Tutor7  How to crack DU Meter 2.20

作者:dREAMtHEATER
E-mail:dreamtheater@263.net
写作日期: 1st, Aug 1999

软件背景资料

运行平台: Win9X/NT  
文件名称: dumtr22.exe
程序类型: Internet工具  
下载地点: 626K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6h3S2S2k6$3g2D9N6r3g2U0K9q4)9J5k6h3y4G2L8b7`.`.

文件大小: 398KB

使用的工具

SoftIce V3.25--Win9X Debugger
W32Dasm V8.93--Win9X Dissembler
Hex WorkShop v2.54--Hex Editor
RegSnap V2.51--Registry Tracer

难易程度

Easy(x)  Medium( )  Hard( )  Pro( )

                   ----------=======声明========----------

      未经作者同意,不得修改、引用原文,一切权利保留。
      本教程只供教学用,其他一切用途皆被禁止。
              
                  ----------=======软件介绍========----------

      软件的作者这样说:
      an network throughput monitoring utility. what does DU Meter actually do? Quite
simply, it lets you see how much of your full bandwidth potential is actually utilized
at any given point of time, either by displaying real-time graph, numerical display, or
both. It lets you actually SEE the data flowing!

                ----------=======软件的保护机制========-------
   
       需输入Name/Code,不论你是否处在小写状态,输入的code中的字母部分自动转为大写。与其
他共享软件不同,参与注册码计算的是你输入的code一部分,很有趣吧。请看正文。
       软件的安装时间保存在 HKEY_LOCAL_MACHINE\Software\Hagel\Config 注册后,注册信息保
存在   HKEY_LOCAL_MACHINE\Software\Hagel\DU Meter\UserName
       HKEY_LOCAL_MACHINE\Software\Hagel\DU Meter\SerialNum

                  ----------========正文========----------
Part1 Snippet out code
      
      在注册窗口中,输入任意的name/code,我输入dREAMtHEATER/12121212
      在SoftIce中设断点bpx hmemcpy do "p ret;",Ctrl-D,回到注册窗口,press "OK" button,
重新回到SoftIce中,再次Ctrl-D,又立即回到SoftIce中,"bc *",取消所有断点,Press F12数次,
程序停在:

:00067DB4 E80736FDFF              call 0003B3C0
:00067DB9 8B45FC                  mov eax, dword ptr [ebp-04]  <==回到这里
:00067DBC 8D55F4                  lea edx, dword ptr [ebp-0C]
:00067DBF E8F0FEFAFF              call 00017CB4
:00067DC4 8B55F4                  mov edx, dword ptr [ebp-0C]
:00067DC7 8BC6                    mov eax, esi
:00067DC9 E82236FDFF              call 0003B3F0
:00067DCE 8D55FC                  lea edx, dword ptr [ebp-04]
:00067DD1 8BB3E4020000            mov esi, dword ptr [ebx+000002E4]
:00067DD7 8BC6                    mov eax, esi
:00067DD9 E8E235FDFF              call 0003B3C0
:00067DDE 8B45FC                  mov eax, dword ptr [ebp-04]
:00067DE1 8D55F4                  lea edx, dword ptr [ebp-0C]
:00067DE4 E8CBFEFAFF              call 00017CB4
:00067DE9 8B55F4                  mov edx, dword ptr [ebp-0C]
:00067DEC 8BC6                    mov eax, esi
:00067DEE E8FD35FDFF              call 0003B3F0
:00067DF3 8D55FC                  lea edx, dword ptr [ebp-04]
:00067DF6 8B83E4020000            mov eax, dword ptr [ebx+000002E4]
:00067DFC E8BF35FDFF              call 0003B3C0
:00067E01 837DFC00                cmp dword ptr [ebp-04], 00000000
:00067E05 7414                    je 00067E1B
:00067E07 8D55F8                  lea edx, dword ptr [ebp-08]
:00067E0A 8B83E0020000            mov eax, dword ptr [ebx+000002E0]
:00067E10 E8AB35FDFF              call 0003B3C0
:00067E15 837DF800                cmp dword ptr [ebp-08], 00000000
:00067E19 751A                    jne 00067E35

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00067E05(C)
|
:00067E1B 6A00                    push 00000000
:00067E1D 668B0D507F0600          mov cx, word ptr [00067F50]
:00067E24 B201                    mov dl, 01

* Possible StringData Ref from Code Obj ->"Please specify both the user name "
                                        ->"and serial number."
                                  |
:00067E26 B85C7F0600              mov eax, 00067F5C
:00067E2B E80CB6FFFF              call 0006343C
:00067E30 E9EA000000              jmp 00067F1F

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00067E19(C)
|
:00067E35 8D55FC                  lea edx, dword ptr [ebp-04]
:00067E38 8B83E4020000            mov eax, dword ptr [ebx+000002E4]
:00067E3E E87D35FDFF              call 0003B3C0
:00067E43 8B45FC                  mov eax, dword ptr [ebp-04]
:00067E46 8D55F4                  lea edx, dword ptr [ebp-0C]
:00067E49 E8A6FCFAFF              call 00017AF4
:00067E4E 8B4DF4                  mov ecx, dword ptr [ebp-0C]  <==指向fake code
:00067E51 B232                    mov dl, 32      <== dl=0x32
:00067E53 B044                    mov al, 44      <== al=0x44
:00067E55 E8760CFFFF              call 00058AD0   <==计算注册码
:00067E5A 6685C0                  test ax, ax
:00067E5D 0F84A7000000            je 00067F0A     <==code不正确,jump to 00067F0A
:00067E63 8D55FC                  lea edx, dword ptr [ebp-04]
:00067E66 8B83E0020000            mov eax, dword ptr [ebx+000002E0]
:00067E6C E84F35FDFF              call 0003B3C0
:00067E71 8B55FC                  mov edx, dword ptr [ebp-04]
:00067E74 8D85F4FEFFFF            lea eax, dword ptr [ebp+FFFFFEF4]
:00067E7A B9FF000000              mov ecx, 000000FF
:00067E7F E8D8BDFAFF              call 00013C5C
:00067E84 8D95F4FEFFFF            lea edx, dword ptr [ebp+FFFFFEF4]
:00067E8A A134B30700              mov eax, dword ptr [0007B334]
:00067E8F B164                    mov cl, 64
:00067E91 E8AEABFAFF              call 00012A44
:00067E96 8D55FC                  lea edx, dword ptr [ebp-04]
:00067E99 8B83E4020000            mov eax, dword ptr [ebx+000002E4]
:00067E9F E81C35FDFF              call 0003B3C0
:00067EA4 8B55FC                  mov edx, dword ptr [ebp-04]
:00067EA7 8D85F4FEFFFF            lea eax, dword ptr [ebp+FFFFFEF4]
:00067EAD B9FF000000              mov ecx, 000000FF
:00067EB2 E8A5BDFAFF              call 00013C5C
:00067EB7 8D95F4FEFFFF            lea edx, dword ptr [ebp+FFFFFEF4]
:00067EBD A104B10700              mov eax, dword ptr [0007B104]
:00067EC2 B164                    mov cl, 64
:00067EC4 E87BABFAFF              call 00012A44
:00067EC9 E86E0B0100              call 00078A3C    <==向注册表里写入注册信息
:00067ECE 84C0                    test al, al  
:00067ED0 7421                    je 00067EF3      <==写入失败,跳至00067EF3
:00067ED2 6A00                    push 00000000
:00067ED4 668B0D507F0600          mov cx, word ptr [00067F50]
:00067EDB B202                    mov dl, 02

* Possible StringData Ref from Code Obj ->"Thank you for registering DU Meter."
                                  |
:00067EDD B89C7F0600              mov eax, 00067F9C
:00067EE2 E855B5FFFF              call 0006343C
:00067EE7 C7832C02000001000000    mov dword ptr [ebx+0000022C], 00000001
:00067EF1 EB2C                    jmp 00067F1F

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00067ED0(C)
|
:00067EF3 6A00                    push 00000000
:00067EF5 668B0D507F0600          mov cx, word ptr [00067F50]
:00067EFC B201                    mov dl, 01

* Possible StringData Ref from Code Obj ->"Error saving registration information "
                                        ->"in the registry."
                                  |
:00067EFE B8C87F0600              mov eax, 00067FC8
:00067F03 E834B5FFFF              call 0006343C
:00067F08 EB15                    jmp 00067F1F

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00067E5D(C)
|
:00067F0A 6A00                    push 00000000
:00067F0C 668B0D507F0600          mov cx, word ptr [00067F50]
:00067F13 B201                    mov dl, 01

* Possible StringData Ref from Code Obj ->"Invalid serial number specified. "
                                        ->"Please retry."
                                  |
:00067F15 B808800600              mov eax, 00068008
:00067F1A E81DB5FFFF              call 0006343C

     让我们Trace into call 00058AD0。

* Referenced by a CALL at Addresses:
|:00067E55   , :0007815D   
|
:00058AD0 55                      push ebp
:00058AD1 8BEC                    mov ebp, esp
:00058AD3 83C4F0                  add esp, FFFFFFF0
:00058AD6 53                      push ebx
:00058AD7 56                      push esi
:00058AD8 33DB                    xor ebx, ebx
:00058ADA 895DF0                  mov dword ptr [ebp-10], ebx
:00058ADD 894DF8                  mov dword ptr [ebp-08], ecx  <==dword ptr [ebp-08]存
入指向fake code的首地址
:00058AE0 8855FF                  mov byte ptr [ebp-01], dl   <==byte ptr
[ebp-01]=0x32,即ASCII"2"
:00058AE3 8BD8                    mov ebx, eax
:00058AE5 8B45F8                  mov eax, dword ptr [ebp-08]   <==EAX指向fake code
:00058AE8 E847B3FBFF              call 00013E34
:00058AED 33C0                    xor eax, eax
:00058AEF 55                      push ebp
:00058AF0 68D88B0500              push 00058BD8
:00058AF5 64FF30                  push dword ptr fs:[eax]
:00058AF8 648920                  mov dword ptr fs:[eax], esp
:00058AFB 66C745F60000            mov [ebp-0A], 0000
:00058B01 8B45F8                  mov eax, dword ptr [ebp-08]    <==EAX指向fake code
:00058B04 E877B1FBFF              call 00013C80        <==计算输入的code的长度
:00058B09 83F818                  cmp eax, 00000018   〈==输入的code必须是24个字符
:00058B0C 0F85A8000000            jne 00058BBA         〈==不是24个字符,jump to
00058BBA
:00058B12 8B45F8                  mov eax, dword ptr [ebp-08]  <==EAX指向fake code
:00058B15 3A18                    cmp bl, byte ptr [eax]  <==输入的code的第一个字符与
bl(0x44)比较,即与ASCII"D"比较
:00058B17 0F859D000000            jne 00058BBA   <==输入的code的第一个字符不是“D”,
jump to 00058BBA
:00058B1D 8B45F8                  mov eax, dword ptr [ebp-08]  <==EAX指向fake code
:00058B20 8A4001                  mov al, byte ptr [eax+01]    <==将输入的code的第二个
字符的十六进制值赋给al
:00058B23 3A45FF                  cmp al, byte ptr [ebp-01]   al与0x32比较,即输入的
code的第二个字符与ASCII"2"比较
:00058B26 0F828E000000            jb 00058BBA   〈==小于ASCII“2”,jump to 00058BBA
:00058B2C 8D45F0                  lea eax, dword ptr [ebp-10]
:00058B2F 50                      push eax
:00058B30 B903000000              mov ecx, 00000003
:00058B35 BA04000000              mov edx, 00000004
:00058B3A 8B45F8                  mov eax, dword ptr [ebp-08]
:00058B3D E842B3FBFF              call 00013E84
:00058B42 8B45F0                  mov eax, dword ptr [ebp-10]
:00058B45 E892FDFFFF              call 000588DC
:00058B4A 668945F4                mov word ptr [ebp-0C], ax
:00058B4E 8D45F0                  lea eax, dword ptr [ebp-10]
:00058B51 50                      push eax
:00058B52 B908000000              mov ecx, 00000008
:00058B57 BA08000000              mov edx, 00000008
:00058B5C 8B45F8                  mov eax, dword ptr [ebp-08]
:00058B5F E820B3FBFF              call 00013E84
:00058B64 8B45F0                  mov eax, dword ptr [ebp-10]
:00058B67 E898FEFFFF              call 00058A04
:00058B6C 8BF0                    mov esi, eax
:00058B6E 8D45F0                  lea eax, dword ptr [ebp-10]
:00058B71 50                      push eax
:00058B72 B908000000              mov ecx, 00000008
:00058B77 BA11000000              mov edx, 00000011
:00058B7C 8B45F8                  mov eax, dword ptr [ebp-08]
:00058B7F E800B3FBFF              call 00013E84
:00058B84 8B45F0                  mov eax, dword ptr [ebp-10]
:00058B87 E878FEFFFF              call 00058A04
:00058B8C 8BD8                    mov ebx, eax
:00058B8E 8D45F0                  lea eax, dword ptr [ebp-10]
:00058B91 50                      push eax
:00058B92 B910000000              mov ecx, 00000010
:00058B97 BA01000000              mov edx, 00000001
:00058B9C 8B45F8                  mov eax, dword ptr [ebp-08]
:00058B9F E8E0B2FBFF              call 00013E84
:00058BA4 8B45F0                  mov eax, dword ptr [ebp-10]
:00058BA7 E898000000              call 00058C44
:00058BAC 33C6                    xor eax, esi
:00058BAE 3BC3                    cmp eax, ebx    <==输入code的最后8位字符转换成十六进
制形式,存入ebx,并与eax比较
:00058BB0 7508                    jne 00058BBA    <==不相等,jump to 00058BBA
:00058BB2 668B45F4                mov ax, word ptr [ebp-0C]
:00058BB6 668945F6                mov word ptr [ebp-0A], ax

* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:00058B0C(C), :00058B17(C), :00058B26(C), :00058BB0(C)
|
:00058BBA 33C0                    xor eax, eax
:00058BBC 5A                      pop edx
:00058BBD 59                      pop ecx
:00058BBE 59                      pop ecx
:00058BBF 648910                  mov dword ptr fs:[eax], edx
:00058BC2 68DF8B0500              push 00058BDF

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00058BDD(U)
|
:00058BC7 8D45F0                  lea eax, dword ptr [ebp-10]
:00058BCA E825AEFBFF              call 000139F4
:00058BCF 8D45F8                  lea eax, dword ptr [ebp-08]
:00058BD2 E81DAEFBFF              call 000139F4
:00058BD7 C3                      ret

       可以看出,你的code必须是24位,第一位是“D”,第二位必须大于或等于ASCII码“2”,
请注意不是数字“2”。
       从00058B2C开始到00058BAC,程序分别取code的第4-6位、第9-15位、第1-16位进行不同的
计算,最后eax与esi做异或操作。(这部分略)
       在“00058BAE cmp eax, ebx”判断eax与输入code的哪8位字符进行比较,这需要有一定的
技巧,你输入的注册码不能是重复的字符,因为这样使你无法判断,可以象我这样输入,注意一定
是24位:D21234567890ABCD98765432,当执行到00058BAE的这一行,在SoftIce中寄存器窗口你会看
到ebx=0x98765432,所以可以判断eax是与输入code的最后8位字符进行比较的。eax这时等于
0xFF2965C8。Ctrl-D回到注册窗口,在code栏中重新填入"D21234567890ABCDFF2965C8" ,
press"OK",Bingo! 成功注册!
2004-8-3 15:58
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
9
Tutor8  How to crack LockDown 2000 3.0 Build 3.0.1.28

作者:dREAMtHEATER
E-mail:dreamtheater@263.net
写作日期: 3rd, Aug 1999

软件背景资料

运行平台: Win9X/NT        
文件名称: Lockdown2000.exe
程序类型: 杀毒工具
下载地点: a15K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8X3I4G2j5$3E0V1L8%4N6F1x3U0l9H3x3q4)9J5k6h3y4G2L8g2)9#2b7$3c8G2N6$3&6D9L8$3q4V1i4K6u0W2K9s2c8E0L8l9`.`.

文件大小: 2,046KB

使用的工具

SoftIce V3.25--Win9X Debugger
W32Dasm V8.93--Win9X Dissembler
Hex WorkShop v2.54--Hex Editor
RegSnap V2.51--Registry Tracer

难易程度

Easy(X)  Medium( )  Hard( )  Pro( )

                   ----------=======声明========----------

      未经作者同意,不得修改、引用原文,一切权利保留。
      本教程只供教学用,其他一切用途皆被禁止。
               
                  ----------=======软件介绍========----------
     
      简单地说,它是一个查杀网上流行黑客程序的共享软件(还是先防防我的cracking吧,^O^)他
的查杀速度我可不敢恭维,另外启动极慢,反正我是不会用的。

                ----------=======软件的保护机制========-------

      第一次运行时间记录在windows目录\AJBALSE.INI中
      注册时,不需要name,程序自动产生一个Product Serial,我的是:6WD-Q2D3-6F67-2,为了证
实这个码是不是随机产生的,我曾将该软件反安装,为了保险,并将安装时在windows目录里生成的
文件、注册表键值均统统删掉,然后再次安装,看看Product Serial变没变,结果还是
6WD-Q2D3-6F67-2,但我估计他的产生有可能根据windows安装时你输入的个人信息。如果你感兴趣
,在你的机器上安装此软件,看看是否与我的Product Serial一样。
      注册后,注册信息保存在注册表的
HKEY_LOCAL_MACHINE\Software\Harbor Telco\LockDown 2000 v3.0\3.0.1.1\Register

                   ----------========正文========----------

Part1 Snippet out code

      在注册窗口中,输入任意的code,我输入:12121212
      在SoftIce中设断点bpx hmemcpy do "p ret;",Ctrl-D,回到注册窗口,press "OK" button,
重新回到SoftIce中,"bc *",取消所有断点,Press F12数次,程序停在:

:004C5132 E8CDDCF6FF              call 00432E04
:004C5137 8B55F8                  mov edx, dword ptr [ebp-08]   <==回到这里,edx指向我
们输入的code的首地址
:004C513A 58                      pop eax
:004C513B E8FCEEF3FF              call 0040403C   <==计算注册码
:004C5140 7504                    jne 004C5146    <==注册不成功,jump to 004c5146
:004C5142 B301                    mov bl, 01      <==注册成功,bl=1
:004C5144 EB02                    jmp 004C5148

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004C5140(C)
|
:004C5146 33DB                    xor ebx, ebx    <==ebx=0

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004C5144(U)
|
:004C5148 84DB                    test bl, bl     
:004C514A 7523                    jne 004C516F   <==注册成功,则bl=1,jump to 004C516F
:004C514C 6A00                    push 00000000
:004C514E 668B0D7C524C00          mov cx, word ptr [004C527C]
:004C5155 33D2                    xor edx, edx

* Possible StringData Ref from Code Obj ->"The unlock code you have entered "
                                        ->"is invalid for this machine, please "
                                        ->"re-type the number or contact "
                                        ->"Harbor Telco to receive a new "
                                        ->"registration number."
                                  |
:004C5157 B888524C00              mov eax, 004C5288
:004C515C E80F14F9FF              call 00456570
:004C5161 8B86CC020000            mov eax, dword ptr [esi+000002CC]
:004C5167 8B10                    mov edx, dword ptr [eax]
:004C5169 FF92B4000000            call dword ptr [edx+000000B4]

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004C514A(C)
|
:004C516F 84DB                    test bl, bl   <==再一次检查bl是否为1
:004C5171 0F84D9000000            je 004C5250   〈==不等于0,显示注册成功
:004C5177 8D55F8                  lea edx, dword ptr [ebp-08]
:004C517A 8B86CC020000            mov eax, dword ptr [esi+000002CC]
:004C5180 E87FDCF6FF              call 00432E04
:004C5185 8B45F8                  mov eax, dword ptr [ebp-08]
:004C5188 E8F7E5FDFF              call 004A3784
:004C518D 6A00                    push 00000000
:004C518F 668B0D7C524C00          mov cx, word ptr [004C527C]
:004C5196 B202                    mov dl, 02

* Possible StringData Ref from Code Obj ->"Thank you for registering LockDown "
                                        ->"2000!"
                                  |
:004C5198 B828534C00              mov eax, 004C5328
:004C519D E8CE13F9FF              call 00456570
:004C51A2 A120EC4C00              mov eax, dword ptr [004CEC20]
:004C51A7 8B00                    mov eax, dword ptr [eax]
:004C51A9 80784700                cmp byte ptr [eax+47], 00
:004C51AD 750E                    jne 004C51BD
:004C51AF A120EC4C00              mov eax, dword ptr [004CEC20]
      
        为了找到注册码, 让我们trace into call 0040403C

:0040403C 53                      push ebx
:0040403D 56                      push esi
:0040403E 57                      push edi
:0040403F 89C6                    mov esi, eax   <==令esi指向real code的首地址
:00404041 89D7                    mov edi, edx   <==令edi指向fake code的首地址
:00404043 39D0                    cmp eax, edx   
:00404045 0F848F000000            je 004040DA
:0040404B 85F6                    test esi, esi
:0040404D 7468                    je 004040B7
:0040404F 85FF                    test edi, edi
:00404051 746B                    je 004040BE
:00404053 8B46FC                  mov eax, dword ptr [esi-04]
:00404056 8B57FC                  mov edx, dword ptr [edi-04]
:00404059 29D0                    sub eax, edx
:0040405B 7702                    ja 0040405F
:0040405D 01C2                    add edx, eax

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0040405B(C)
|
:0040405F 52                      push edx
:00404060 C1EA02                  shr edx, 02
:00404063 7426                    je 0040408B

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00404081(C)
|
:00404065 8B0E                    mov ecx, dword ptr [esi] 〈==real code前四位字符的
ASCII码值赋给ecx
:00404067 8B1F                    mov ebx, dword ptr [edi]  <==fake code前四位字符的
ASCII码值赋给ecx
:00404069 39D9                    cmp ecx, ebx  <==比较real与fake的前四位字符
:0040406B 7558                    jne 004040C5
:0040406D 4A                      dec edx
:0040406E 7415                    je 00404085     <==jump to 00404085
:00404070 8B4E04                  mov ecx, dword ptr [esi+04]   
:00404073 8B5F04                  mov ebx, dword ptr [edi+04]  
:00404076 39D9                    cmp ecx, ebx   
:00404078 754B                    jne 004040C5   
:0040407A 83C608                  add esi, 00000008
:0040407D 83C708                  add edi, 00000008
:00404080 4A                      dec edx
:00404081 75E2                    jne 00404065
:00404083 EB06                    jmp 0040408B

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0040406E(C)
|
:00404085 83C604                  add esi, 00000004   <==esi=esi+4
:00404088 83C704                  add edi, 00000004   <==edi=edi+4

* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:00404063(C), :00404083(U)
|
:0040408B 5A                      pop edx
:0040408C 83E203                  and edx, 00000003
:0040408F 7422                    je 004040B3   
:00404091 8B0E                    mov ecx, dword ptr [esi]   <==从real code第五位取四位
字符的ASCII码赋给ecx
:00404093 8B1F                    mov ebx, dword ptr [edi]  〈==从fake code第五位取四位
字符的ASCII码赋给ecx
:00404095 38D9                    cmp cl, bl      <==比较fake与real的第五位字符的ASCII
码值
:00404097 7541                    jne 004040DA   
:00404099 4A                      dec edx
:0040409A 7417                    je 004040B3  
:0040409C 38FD                    cmp ch, bh      〈==比较fake与real的第六位字符的ASCII
码值
:0040409E 753A                    jne 004040DA
:004040A0 4A                      dec edx
:004040A1 7410                    je 004040B3      〈==jump to 004040B3
:004040A3 81E30000FF00            and ebx, 00FF0000
:004040A9 81E10000FF00            and ecx, 00FF0000
:004040AF 39D9                    cmp ecx, ebx
:004040B1 7527                    jne 004040DA

* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:0040408F(C), :0040409A(C), :004040A1(C)
|
:004040B3 01C0                    add eax, eax
:004040B5 EB23                    jmp 004040DA

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0040404D(C)
|
:004040B7 8B57FC                  mov edx, dword ptr [edi-04]
:004040BA 29D0                    sub eax, edx
:004040BC EB1C                    jmp 004040DA

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00404051(C)
|
:004040BE 8B46FC                  mov eax, dword ptr [esi-04]
:004040C1 29D0                    sub eax, edx
:004040C3 EB15                    jmp 004040DA

* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:0040406B(C), :00404078(C)
|
:004040C5 5A                      pop edx   
:004040C6 38D9                    cmp cl, bl   
:004040C8 7510                    jne 004040DA
:004040CA 38FD                    cmp ch, bh
:004040CC 750C                    jne 004040DA
:004040CE C1E910                  shr ecx, 10
:004040D1 C1EB10                  shr ebx, 10
:004040D4 38D9                    cmp cl, bl
:004040D6 7502                    jne 004040DA
:004040D8 38FD                    cmp ch, bh

* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:00404045(C), :00404097(C), :0040409E(C), :004040B1(C), :004040B5(U)
|:004040BC(U), :004040C3(U), :004040C8(C), :004040CC(C), :004040D6(C)
|
:004040DA 5F                      pop edi
:004040DB 5E                      pop esi
:004040DC 5B                      pop ebx
:004040DD C3                      ret

      有注释的部分为填入的code正确时程序的执行过程,其实在0040403F处,我们在SoftIce中下
命令“d eax”,即可在数据窗口看到real code,做注释的目的使你更清楚程序是如何检验你输入的
code的正确性。
      我的code:7ERE55

Part2   快速破解法

线索
     当我从该软件公司的主页下载此程序时,对方告之试用版只能查黑客程序而不能杀掉。

     在W32Dasm中,反汇编LockDown2000.exe,用鼠标点击工具栏中的“String Data References
”,调出程序参考的字符串,你会看到程序参考的字符串量非常大,你需要有耐心,一点点找,当你
发现下面的这部分:

"tcp is the only protocol supported "
"tcp"
"test.txt"
"text/html"
"TextHeight"
"Thank you for registering LockDown "
"The trial period on this demo "
"The unlock code you have entered "
"time to live expired"
"To enable LockDown 2000 trojan "     〈==这一行
"Too many levels of remote in path"
"Too many levels of symbolic links"
"Too many open files"
"Too many processes"
"Too many references: can't splice"
"Too many users"
"too much data availaible"
   
     用鼠标双击这一行,主窗口将显示与此字符串相关的程序代码部分;

:004C5617 E83CE2FDFF              call 004A3858
:004C561C 84C0                    test al, al     
:004C561E 751A                    jne 004C563A   <==

* Possible StringData Ref from Code Obj ->"To enable LockDown 2000 trojan "
                                        ->"removal and repair features, you "
                                        ->"must first purchase a license "
                                        ->"for this computer."
                                  |
:004C5620 B858564C00              mov eax, 004C5658
:004C5625 E83E10F9FF              call 00456668
:004C562A A11CEB4C00              mov eax, dword ptr [004CEB1C]
:004C562F 8B00                    mov eax, dword ptr [eax]
   
       从004C5617至004C561E ,又是经典的call/test/conditional jump,让我们进入那个call看
看,用鼠标单击 004C5617这一行,这使窗口高亮显示这一行代码,再用鼠标点击工具栏中的“
Execute Call”,窗口将显示下面这部分代码:

* Referenced by a CALL at Addresses:
|:004A457F   , :004A46A6   , :004A4B70   , :004A507F   , :004B78F5   
|:004BD0A1   , :004BE69C   , :004C3F12   , :004C5617   , :004C5773   
|
:004A3858 55                      push ebp
:004A3859 8BEC                    mov ebp, esp
:004A385B 6A00                    push 00000000
:004A385D 6A00                    push 00000000
:004A385F 53                      push ebx
:004A3860 33C0                    xor eax, eax
:004A3862 55                      push ebp
:004A3863 68E9384A00              push 004A38E9
:004A3868 64FF30                  push dword ptr fs:[eax]
:004A386B 648920                  mov dword ptr fs:[eax], esp
:004A386E B201                    mov dl, 01
:004A3870 A15C974700              mov eax, dword ptr [0047975C]
:004A3875 E82260FDFF              call 0047989C
:004A387A 8BD8                    mov ebx, eax
:004A387C BA02000080              mov edx, 80000002
:004A3881 8BC3                    mov eax, ebx
:004A3883 E8AC60FDFF              call 00479934
:004A3888 B101                    mov cl, 01

* Possible StringData Ref from Code Obj ->"Software\Harbor Telco\LockDown "
                                        ->"2000 v3.0\3.0.1.1"
                                  |
:004A388A BA00394A00              mov edx, 004A3900
:004A388F 8BC3                    mov eax, ebx
:004A3891 E80261FDFF              call 00479998
:004A3896 8D4DFC                  lea ecx, dword ptr [ebp-04]

* Possible StringData Ref from Code Obj ->"Register"
                                  |
:004A3899 BA3C394A00              mov edx, 004A393C
:004A389E 8BC3                    mov eax, ebx
:004A38A0 E8EB64FDFF              call 00479D90
:004A38A5 8BC3                    mov eax, ebx
:004A38A7 E85860FDFF              call 00479904
:004A38AC 8BC3                    mov eax, ebx
:004A38AE E869F7F5FF              call 0040301C
:004A38B3 8D45F8                  lea eax, dword ptr [ebp-08]
:004A38B6 E89DFBFFFF              call 004A3458
:004A38BB 8B55F8                  mov edx, dword ptr [ebp-08]
:004A38BE 8B45FC                  mov eax, dword ptr [ebp-04]
:004A38C1 E87607F6FF              call 0040403C
:004A38C6 7504                    jne 004A38CC
:004A38C8 B301                    mov bl, 01
:004A38CA EB02                    jmp 004A38CE

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004A38C6(C)
|
:004A38CC 33DB                    xor ebx, ebx

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004A38CA(U)
|
:004A38CE 33C0                    xor eax, eax
:004A38D0 5A                      pop edx
:004A38D1 59                      pop ecx
:004A38D2 59                      pop ecx
:004A38D3 648910                  mov dword ptr fs:[eax], edx
:004A38D6 68F0384A00              push 004A38F0

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004A38EE(U)
|
:004A38DB 8D45F8                  lea eax, dword ptr [ebp-08]
:004A38DE BA02000000              mov edx, 00000002
:004A38E3 E8EC03F6FF              call 00403CD4
:004A38E8 C3                      ret

     看到了吗?这部分代码从注册表的
HKEY_LOCAL_MACHINE\Software\Harbor Telco\LockDown 2000 v3.0\3.0.1.1\Register
获取注册信息,若存在,检验正确性,一切OK,让返回值al=1。另外,你还会看到,此段代码被10个
call参考,那就说明程序从10个不同方面检查你是否注册。
     我没有再仔细分析这段代码,为了让所有参考此部分代码的call都认为程序已注册,最简单的
方法:在004A3858处,按顺序修改代码为 (1)mov al, 01 (2)ret
     修改后,重新执行程序,bingo!程序百分之百注册!
           
                  ----------=======The Patch========----------

       在文件LockDown2000.exe的offset:0xA2C58处,修改558BEC为B001C3。
2004-8-3 15:59
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
10
Tutor 9  How to crack Second Copy 97 version 5.31 build 96

作者:dREAMtHEATER
E-mail:dreamtheater@263.net
写作日期:13th, August 1999

软件背景资料

运行平台: Win9X  
文件名称: setup97.exe
程序类型: 备份工具
下载地点: ff2K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6h3y4W2L8Y4c8W2M7X3g2V1i4K6u0W2j5$3!0E0

文件大小: 702KB

使用的工具

SoftIce V4.0--Win9X Debugger
W32Dasm V8.93--Win9X Dissembler
Hex WorkShop v2.54--Hex Editor
RegSnap V2.51--Registry Analyzing Tool

难易程度

Easy(x)  Medium( )  Hard( )  Pro( )

                   ----------=======声明========----------

      未经作者同意,不得修改、引用原文,一切权利保留。
      本教程只供教学用,其他一切用途皆被禁止。
               
                  ----------=======软件介绍========----------
     
      软件的作者这样说:

      Second Copy 97 allows you to keep a "second copy" of all your important files at
a different location.   Set it up once and forget about it.  Second Copy 97 will copy
your files at specified intervals in the background without manual intervention.  
Initially it will copy all specified files.  In subsequent runs it will only copy new
or changed files.

                ----------=======软件的保护机制========-------

       典型的name/code注册形式,未注册时,每次启动都有nagscreen,告诉你还可以使用多少天
,时间和注册信息均存在本软件同目录下的SC97.cfg文件中

SC97.cfg格式(sample):

[General]
Settings=8E21   〈==第一次运行的时间
Version=5.31
Build=96
RegName=dREAMtHEATER   
RegKey=466A-2E7B-37B2

       这实际上就是一个INI文件,只有[General]一个小节,不要被他的文件扩展名所迷惑!
       另外,我还需说明,code还分"Single User License"与"Site License"之分,后面我会详
讲。

                   ----------========正文========----------

Part1 Snippet out code

      在注册窗口中,输入任意的name/code,我输入dREAMtHEATER/1234567890
      在SoftIce中设断点bpx hmemcpy ,Ctrl-D,回到注册窗口,press "Register" button,重新回
到SoftIce中,再次Ctrl-D,又立即回到SoftIce中,"bc *",取消所有断点,Press F12数次,程序停
在:

:00461DAE E875A5FCFF              call 0042C328
:00461DB3 8B45F8                  mov eax, dword ptr [ebp-08]  <==SoftIce回到这里,eax指
向我们输入的code
:00461DB6 50                      push eax
:00461DB7 8D55F4                  lea edx, dword ptr [ebp-0C]  <==edx指向name
:00461DBA 8B83E4010000            mov eax, dword ptr [ebx+000001E4]
:00461DC0 E863A5FCFF              call 0042C328
:00461DC5 8B45F4                  mov eax, dword ptr [ebp-0C]
:00461DC8 5A                      pop edx
:00461DC9 E8D2F3FFFF              call 004611A0   <==计算注册码,trace into
:00461DCE 8BF0                    mov esi, eax
:00461DD0 85F6                    test esi, esi
:00461DD2 0F8E0A010000            jle 00461EE2    <==返回值esi<=0,注册失败
:00461DD8 8D45F0                  lea eax, dword ptr [ebp-10]
:00461DDB E82C0C0000              call 00462A0C
:00461DE0 8B4DF0                  mov ecx, dword ptr [ebp-10]
:00461DE3 B201                    mov dl, 01
:00461DE5 A1FC374400              mov eax, dword ptr [004437FC]
:00461DEA E8691AFEFF              call 00443858
:00461DEF 8945FC                  mov dword ptr [ebp-04], eax
:00461DF2 33C0                    xor eax, eax
:00461DF4 55                      push ebp
:00461DF5 68DB1E4600              push 00461EDB
:00461DFA 64FF30                  push dword ptr fs:[eax]
:00461DFD 648920                  mov dword ptr fs:[eax], esp
:00461E00 8D55F8                  lea edx, dword ptr [ebp-08]
:00461E03 8B83E4010000            mov eax, dword ptr [ebx+000001E4]
:00461E09 E81AA5FCFF              call 0042C328
:00461E0E 8B45F8                  mov eax, dword ptr [ebp-08]
:00461E11 50                      push eax

* Possible StringData Ref from Code Obj ->"RegName"
                                  |
:00461E12 B9A01F4600              mov ecx, 00461FA0

* Possible StringData Ref from Code Obj ->"General"
                                  |
:00461E17 BAB01F4600              mov edx, 00461FB0
:00461E1C 8B45FC                  mov eax, dword ptr [ebp-04]
:00461E1F E8C81AFEFF              call 004438EC
:00461E24 8D55F8                  lea edx, dword ptr [ebp-08]
:00461E27 8B83F0010000            mov eax, dword ptr [ebx+000001F0]
:00461E2D E8F6A4FCFF              call 0042C328
:00461E32 8B45F8                  mov eax, dword ptr [ebp-08]
:00461E35 50                      push eax

* Possible StringData Ref from Code Obj ->"RegKey"
                                  |
:00461E36 B9C01F4600              mov ecx, 00461FC0

* Possible StringData Ref from Code Obj ->"General"
                                  |
:00461E3B BAB01F4600              mov edx, 00461FB0
:00461E40 8B45FC                  mov eax, dword ptr [ebp-04]
:00461E43 E8A41AFEFF              call 004438EC
:00461E48 A1A0CE4700              mov eax, dword ptr [0047CEA0]
:00461E4D 8B00                    mov eax, dword ptr [eax]
:00461E4F 50                      push eax

* Possible StringData Ref from Code Obj ->"Version"
                                  |
:00461E50 B9D01F4600              mov ecx, 00461FD0

* Possible StringData Ref from Code Obj ->"General"
                                  |
:00461E55 BAB01F4600              mov edx, 00461FB0
:00461E5A 8B45FC                  mov eax, dword ptr [ebp-04]
:00461E5D E88A1AFEFF              call 004438EC
:00461E62 6A00                    push 00000000

* Possible StringData Ref from Code Obj ->"You are now registered with "
                                  |
:00461E64 68E01F4600              push 00461FE0
:00461E69 8D55EC                  lea edx, dword ptr [ebp-14]
:00461E6C 8BC6                    mov eax, esi
:00461E6E E87155FAFF              call 004073E4
:00461E73 FF75EC                  push [ebp-14]

* Possible StringData Ref from Code Obj ->" user license."
                                  |
:00461E76 6808204600              push 00462008
:00461E7B 6820204600              push 00462020

* Possible StringData Ref from Code Obj ->"Keep the registration key in a "
                                        ->"safe place."
                                  |
:00461E80 6830204600              push 00462030
:00461E85 6820204600              push 00462020

* Possible StringData Ref from Code Obj ->"You can also see this key on the "
                                        ->"About box."
                                  |
:00461E8A 6864204600              push 00462064
:00461E8F 8D45F0                  lea eax, dword ptr [ebp-10]
:00461E92 BA07000000              mov edx, 00000007
:00461E97 E8601EFAFF              call 00403CFC
:00461E9C 8B45F0                  mov eax, dword ptr [ebp-10]
:00461E9F 668B0D6C1F4600          mov cx, word ptr [00461F6C]
:00461EA6 B202                    mov dl, 02
:00461EA8 E833E5FDFF              call 004403E0
:00461EAD A194CE4700              mov eax, dword ptr [0047CE94]
:00461EB2 8B00                    mov eax, dword ptr [eax]
:00461EB4 33D2                    xor edx, edx
:00461EB6 E839F8FFFF              call 004616F4
:00461EBB C7835001000001000000    mov dword ptr [ebx+00000150], 00000001
:00461EC5 33C0                    xor eax, eax
:00461EC7 5A                      pop edx
:00461EC8 59                      pop ecx
:00461EC9 59                      pop ecx
:00461ECA 648910                  mov dword ptr fs:[eax], edx
:00461ECD 68351F4600              push 00461F35

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00461EE0(U)
|
:00461ED2 8B45FC                  mov eax, dword ptr [ebp-04]
:00461ED5 E84E0FFAFF              call 00402E28
:00461EDA C3                      ret

:00461EDB E90015FAFF              jmp 004033E0
:00461EE0 EBF0                    jmp 00461ED2

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00461DD2(C)
|
:00461EE2 8D55F8                  lea edx, dword ptr [ebp-08]
:00461EE5 8B83F0010000            mov eax, dword ptr [ebx+000001F0]
:00461EEB E838A4FCFF              call 0042C328
:00461EF0 8B55F8                  mov edx, dword ptr [ebp-08]

* Possible StringData Ref from Code Obj ->"HELPMEPLEASE"
                                  |
:00461EF3 B898204600              mov eax, 00462098
:00461EF8 E82720FAFF              call 00403F24
:00461EFD 85C0                    test eax, eax
:00461EFF 7E1F                    jle 00461F20
:00461F01 8B83F4010000            mov eax, dword ptr [ebx+000001F4]
:00461F07 8B88E0000000            mov ecx, dword ptr [eax+000000E0]
:00461F0D A1DCCF4700              mov eax, dword ptr [0047CFDC]
:00461F12 8B00                    mov eax, dword ptr [eax]
:00461F14 BA01000000              mov edx, 00000001
:00461F19 E8524FFCFF              call 00426E70
:00461F1E EB15                    jmp 00461F35

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00461EFF(C)
|
:00461F20 6A00                    push 00000000
:00461F22 668B0D6C1F4600          mov cx, word ptr [00461F6C]
:00461F29 B201                    mov dl, 01

* Possible StringData Ref from Code Obj ->"Invalid Registration Key"
                                  |
:00461F2B B8B0204600              mov eax, 004620B0
:00461F30 E8ABE4FDFF              call 004403E0

* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:00461DA0(U), :00461F1E(U)
|
:00461F35 33C0                    xor eax, eax
:00461F37 5A                      pop edx
:00461F38 59                      pop ecx
:00461F39 59                      pop ecx
:00461F3A 648910                  mov dword ptr fs:[eax], edx
:00461F3D 68641F4600              push 00461F64

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00461F62(U)
|
:00461F42 8D45EC                  lea eax, dword ptr [ebp-14]
:00461F45 BA02000000              mov edx, 00000002
:00461F4A E8951AFAFF              call 004039E4
:00461F4F 8D45F4                  lea eax, dword ptr [ebp-0C]
:00461F52 BA02000000              mov edx, 00000002
:00461F57 E8881AFAFF              call 004039E4
:00461F5C C3                      ret

     让我们trace into call 004611A0

* Referenced by a CALL at Addresses:
|:00461BF5   , :00461DC9   , :00462BBF   , :004635B8   
|
:004611A0 55                      push ebp
:004611A1 8BEC                    mov ebp, esp
:004611A3 33C9                    xor ecx, ecx
:004611A5 51                      push ecx
:004611A6 51                      push ecx
:004611A7 51                      push ecx
:004611A8 51                      push ecx
:004611A9 53                      push ebx
:004611AA 56                      push esi
:004611AB 57                      push edi
:004611AC 8BDA                    mov ebx, edx
:004611AE 8BF0                    mov esi, eax
:004611B0 33C0                    xor eax, eax
:004611B2 55                      push ebp
:004611B3 688C124600              push 0046128C
:004611B8 64FF30                  push dword ptr fs:[eax]
:004611BB 648920                  mov dword ptr fs:[eax], esp
:004611BE 85F6                    test esi, esi
:004611C0 0F84A9000000            je 0046126F
:004611C6 8BC3                    mov eax, ebx
:004611C8 E86F2AFAFF              call 00403C3C   <==计算输入的code的长度
:004611CD 83F80E                  cmp eax, 0000000E  〈==code必须是14个字符
:004611D0 0F8599000000            jne 0046126F
:004611D6 8D45F8                  lea eax, dword ptr [ebp-08]
:004611D9 50                      push eax
:004611DA B904000000              mov ecx, 00000004
:004611DF BA01000000              mov edx, 00000001
:004611E4 8BC3                    mov eax, ebx
:004611E6 E8552CFAFF              call 00403E40
:004611EB 8D45F4                  lea eax, dword ptr [ebp-0C]
:004611EE 50                      push eax
:004611EF B909000000              mov ecx, 00000009
:004611F4 BA06000000              mov edx, 00000006
:004611F9 8BC3                    mov eax, ebx
:004611FB E8402CFAFF              call 00403E40
:00461200 8D45FC                  lea eax, dword ptr [ebp-04]
:00461203 8BCE                    mov ecx, esi   〈==ecx指向name
:00461205 8B55F8                  mov edx, dword ptr [ebp-08]  <==edx指向fake code的前
四位
:00461208 E87B2AFAFF              call 00403C88
:0046120D 8D55F0                  lea edx, dword ptr [ebp-10]
:00461210 8B45FC                  mov eax, dword ptr [ebp-04]
:00461213 E898010000              call 004613B0
:00461218 8B55F0                  mov edx, dword ptr [ebp-10]  <==指向real code的后九位
:0046121B 8B45F4                  mov eax, dword ptr [ebp-0C]  <==指向fake code的后九位
:0046121E E8292BFAFF              call 00403D4C    <==比较real与fake的后九位
:00461223 7546                    jne 0046126B
:00461225 33D2                    xor edx, edx
:00461227 55                      push ebp
:00461228 685D124600              push 0046125D  

       该子程序是真正计算注册码的部分,程序首先计算你输入的code是否是14个字符,然后根据
你输入的name以及code的前四位计算code的后面的八个数值。
       我必须说明,你必须trace into call 00403D4C,看懂程序如何比较code的后九位,这部分
我就不想讲了,留给读者自己去练习,不是很难,记住,要想提高自己的技术,必须能看懂一部分
汇编代码,否则真的很难深入!
       为了验证code的规律性,我反复实验了十多次,总结如下:程序取code的前四位算出
"Single User License"或者"Site License"(包括user的数目)的后八位code,但前四位数是应该
有限制的,只能包括数字,字母应是"A"--"F",看来程序要取前四位code的十六进制值,我没有继续
去研究,第五位可以是任意字符,倒数三位是固定的,是“7B2”。code形式应为xxxxxxxx-x7B2。

Part 2   做Patch

线索

    Part 1里列出的计算注册码的子程序被四个地方呼叫,分别是:00461BF5   , :00461DC9   ,
:00462BBF   , :004635B8,让我们去00461BF5处看看该子程序的返回值是什么。

    * Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:00461BA1(C)
|
:00461BBD 6A00                    push 00000000
:00461BBF 8D45F4                  lea eax, dword ptr [ebp-0C]
:00461BC2 50                      push eax

* Possible StringData Ref from Code Obj ->"RegKey"
                                  |
:00461BC3 B9301D4600              mov ecx, 00461D30

* Possible StringData Ref from Code Obj ->"General"
                                  |
:00461BC8 BA001D4600              mov edx, 00461D00
:00461BCD 8B45FC                  mov eax, dword ptr [ebp-04]
:00461BD0 E8B71CFEFF              call 0044388C
:00461BD5 8B45F4                  mov eax, dword ptr [ebp-0C]
:00461BD8 50                      push eax
:00461BD9 6A00                    push 00000000
:00461BDB 8D45F0                  lea eax, dword ptr [ebp-10]
:00461BDE 50                      push eax

* Possible StringData Ref from Code Obj ->"RegName"
                                  |
:00461BDF B9401D4600              mov ecx, 00461D40

* Possible StringData Ref from Code Obj ->"General"
                                  |
:00461BE4 BA001D4600              mov edx, 00461D00
:00461BE9 8B45FC                  mov eax, dword ptr [ebp-04]
:00461BEC E89B1CFEFF              call 0044388C
:00461BF1 8B45F0                  mov eax, dword ptr [ebp-10]
:00461BF4 5A                      pop edx
:00461BF5 E8A6F5FFFF              call 004611A0  <==计算注册码
:00461BFA 85C0                    test eax, eax
:00461BFC 7570                    jne 00461C6E   〈== if eax=1,then you have been
registered
:00461BFE A1F4CE4700              mov eax, dword ptr [0047CEF4]
:00461C03 C60001                  mov byte ptr [eax], 01
:00461C06 A1DCCF4700              mov eax, dword ptr [0047CFDC]
:00461C0B 8B00                    mov eax, dword ptr [eax]
:00461C0D 8B482C                  mov ecx, dword ptr [eax+2C]
:00461C10 B201                    mov dl, 01
:00461C12 A134264600              mov eax, dword ptr [00462634]
:00461C17 E8CCFEFBFF              call 00421AE8
:00461C1C 8945F8                  mov dword ptr [ebp-08], eax
:00461C1F 33C0                    xor eax, eax
:00461C21 55                      push ebp
:00461C22 685C1C4600              push 00461C5C
:00461C27 64FF30                  push dword ptr fs:[eax]
:00461C2A 648920                  mov dword ptr fs:[eax], esp
:00461C2D 8B45F8                  mov eax, dword ptr [ebp-08]
:00461C30 C780480200000B000000    mov dword ptr [ebx+00000248], 0000000B
:00461C3A 8B45F8                  mov eax, dword ptr [ebp-08]
:00461C3D 8B80DC010000            mov eax, dword ptr [eax+000001DC]
:00461C43 B201                    mov dl, 01
:00461C45 E866BBFDFF              call 0043D7B0
:00461C4A 8B45F8                  mov eax, dword ptr [ebp-08]
:00461C4D E8AE2EFCFF              call 00424B00   <==呼叫nagscreen
:00461C52 33C0                    xor eax, eax
:00461C54 5A                      pop edx
:00461C55 59                      pop ecx
:00461C56 59                      pop ecx
:00461C57 648910                  mov dword ptr fs:[eax], edx
:00461C5A EB12                    jmp 00461C6E
:00461C5C E98315FAFF              jmp 004031E4
:00461C61 8B45F8                  mov eax, dword ptr [ebp-08]
:00461C64 E8BF11FAFF              call 00402E28
:00461C69 E81A18FAFF              call 00403488

* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:00461BFC(C), :00461C5A(U)
|
:00461C6E 33C0                    xor eax, eax
:00461C70 5A                      pop edx
:00461C71 59                      pop ecx
   
     该段代码从文件SC97.cfg中读取RegName、RegKey,并进行注册码的验证,
     这样我们可以在004611A0处改代码为 (1)mov eax, 00000001 (2)ret,然后删掉文件SC97.cfg
,重新启动程序,nag screen不见了,但about中"registered to"还是"unregistered",没关系,用
NotePad打开文件SC97.cfg,按照我软件的保护机制中讲的SC97.cfg文件格式添上RegName、RegKey
这两行,内容随意输入你想要的,保存,再重新启动程序,ABOUT会告诉你"registered to xxxx",
Kool!      

                ----------=======The Patch========----------

       在文件sc97.exe的offset:000605A0h处,修改558BEC33C951为B801000000C3。
2004-8-3 16:00
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
11
Tutor 10  How to crack AutoZip 98 v4.0

作者:dREAMtHEATER
E-mail:dreamtheater@263.net
写作日期: 15/16th, August 1999

软件背景资料

运行平台: Win9X  
文件名称: azp32v41.exe(版本号可能有误)
程序类型: 解压缩类工具
下载地点: 9e1K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6h3#2X3M7$3!0X3N6q4)9J5k6h3y4G2L8b7`.`.

文件大小: 771KB

使用的工具

W32Dasm V8.93--Win9X Dissembler
Hex WorkShop V2.54--Hex Editor
RegSnap V2.51--Registry Analyzing Tool
Registry Studio V1.01--Enhanced Registry Editor

难易程度

Easy(x)  Medium( )  Hard( )  Pro( )

                   ----------=======声明========----------

      未经作者同意,不得修改、引用原文,一切权利保留。
      本教程只供教学用,其他一切用途皆被禁止。
               
                  ----------=======软件介绍========----------
     
      软件的作者这样说:
      AutoZip is a tool that lets you extract zip files directly from Netscape and
Internet Explorer. If the zip file contains a setup program, AutoZip can extract the
archive temporarily and run the setup file.

                ----------=======软件的保护机制========-------

      这个shareware做的很体贴人,没有nag,程序中也没有任何地方可注册,应该是在线(
on-line)注册,只有你使用超过30天以后,才出现提示窗口告诉你必须注册,否则休想再继续使用
。没关系,你可以用RegSnap在软件安装前后分别给注册表做个快照,然后进行比较。比较后,凭直
觉我认为程序第一次运行时间保存在:HKEY_USERS\.DEFAULT\Software\MFSoft\AutoZip\Config40
,验证的方法直接从注册表删除这个键值,重新启动程序。congratulate!你又获得了三十天的试用
期。

                   ----------========正文========----------

Part1 如何用W32Dasm的Debugger功能快速破解本程序

线索
     首先将主运行程序在W32Dasm中反汇编,然后看看“String Data References”中有没有跟“
共享”、时间限制等相关的词汇,这可是你快速破解的最好方式!很可惜,没有找到任何有参考价
值的词汇,这会让你不知所措吗?想一想,还有什么蛛丝马迹可让你来跟踪的。请看下面:

"Color"
"Columns"
"comctl32.dll"
"commdlg_FindReplace"
"commdlg_help"
"Config40"       〈==看到了吗?
"CONGRATULATIONS! "
"Content Type"
"ControlOfs%.8X%.8X"
"Convert EXE to ZIP"
"Convert ZIP to EXE"
"Copy"
"CoReleaseServerProcess"
"CoResumeClassObjects"
"CoSuspendClassObjects"
"Couldn"
"Create directory"

      "Config40"是从注册表中读写记录时间的键值!在"W32Dasm List of String Data Items"窗
口中高亮显示这一行,并用鼠标双击这一行,你会发现代码窗口中有两处与此相关的部分。

1)
* Possible StringData Ref from Code Obj ->"Software\MFSoft\AutoZip"
                                  |
:00492364 BA98234900              mov edx, 00492398
:00492369 8BC3                    mov eax, ebx
:0049236B E8344DFCFF              call 004570A4
:00492370 8BCE                    mov ecx, esi

* Possible StringData Ref from Code Obj ->"Config40"
                                  |
:00492372 BAB8234900              mov edx, 004923B8
:00492377 8BC3                    mov eax, ebx
:00492379 E8864FFCFF              call 00457304

2)
* Possible StringData Ref from Code Obj ->"Software\MFSoft\AutoZip"
                                  |
:004923F9 BA5C244900              mov edx, 0049245C
:004923FE 8B45FC                  mov eax, dword ptr [ebp-04]
:00492401 E89E4CFCFF              call 004570A4
:00492406 33C0                    xor eax, eax
:00492408 55                      push ebp
:00492409 682D244900              push 0049242D
:0049240E 64FF30                  push dword ptr fs:[eax]
:00492411 648920                  mov dword ptr fs:[eax], esp

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0049239B(C)
|

* Possible StringData Ref from Code Obj ->"Config40"
                                  |
:00492414 BA7C244900              mov edx, 0049247C
:00492419 8B45FC                  mov eax, dword ptr [ebp-04]
:0049241C E8F74EFCFF              call 00457318

    这两部分代码验证了我前面说的,你可以看到在每个"Config40"前面数行都有
"Software\MFSoft\AutoZip",这分明在读取注册表的"Config40"的键值。
    那么,到底哪部分是我们所需要的呢?请在W32dasm的Debugger状态下,分别在出现"Config40"
字符串的下面一行的偏移地址设断点,即:00492372、:00492414两处,然后press F9,程序停在
:00492414y一行。
    上面过程说明程序是在我上面列出的第二部分的代码处读取安装时间的(请保证你不是第一次
运行该程序)。如果这时你的此程序还没有过期,请退出W32Dasm的Debugger状态,往后调整系统时
间,迫使程序过期,再重新进入W32Dasm的Debugger状态,设断点在:00492414;否则,你只须取消所
有的断点,press F6,继续跟踪,你会发现程序很快呼叫出过期的提示窗口:
   
:00492591 83F81E                  cmp eax, 0000001E   <==与30天比较
:00492594 7E25                    jle 004925BB   <==小于30天跳转
:00492596 B9085A4900              mov ecx, 00495A08
:0049259B A1304B4900              mov eax, dword ptr [00494B30]
:004925A0 8B00                    mov eax, dword ptr [eax]
:004925A2 8B15F4204900            mov edx, dword ptr [004920F4]
:004925A8 E8F7AAFBFF              call 0044D0A4
:004925AD A1304B4900              mov eax, dword ptr [00494B30]
:004925B2 8B00                    mov eax, dword ptr [eax]
:004925B4 E86BABFBFF              call 0044D124   <==呼叫过期的提示窗口
:004925B9 B301                    mov bl, 01

       多么直接了当的一段代码,不用我说了,应该知道怎么改吧!

                  ----------=======The Patch========----------

       在文件AutoZip.exe的offset:00091994处,修改7E25为EB25

                  ---------========The Final========----------
      
       W32Dasm的一些具体操作我没有很仔细地讲,如若有不清楚的地方,请看它的Help文件。
       Debugger状态下,如想能在很短的时间内找出呼叫象Nag Screen这样的窗口的CALL,如果你
没有其他好的方法可以使用(比如下合适的API函数断点),那就必须找到与此有关联的部分,例如
从注册表读取安装时间、注册信息的代码部分,这些都是很好的线索,呼叫nag的CALL与这些代码应
该离得很近,此种方法在大多数情况下都很有效,再不济的,如果你实在找不到任何信息,那你就
从程序的入口点(Entry Point)一行一行地执行代码,直到执行到呼叫出nag的那个CALL,到这还没
完,如果你在这里修改程序,往往会使程序@#^&*!,这是因为这个CAll里面还包含着很多的CAll,你
还须trace into 这个CALL,然后有可能且极有可能再trace into.....天啊!是不是把你已经累死了
!不要认为这种方法不可行,我曾经不止一次这样trace过,而且成功地破解过数个shareware,不过
,还好,没有把我完全累死,只是咳咳.... :-)
       从本章内容,你会了解到W32Dasm的Debug功能也蛮强的,不过他远不如SoftIce的断点设置
能力强,尤其在windows API函数断点设置方面简直就是白痴!其Debugger状态下,最大的优点就是
非常容易观察程序的变化。不要再迷信SoftIce了,他绝对不是你唯一的选择!
       W32Dasm,kool!
2004-8-3 16:00
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
12
Tutor 11  How to crack WebZIP V2.72.135

作者:dREAMtHEATER
E-mail:dreamtheater@263.net
写作日期: 20th, August 1999

软件背景资料

运行平台: Win9X/NT4
文件名称: WEBZIP272.EXE
程序类型: InterNet工具
下载地点: 747K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6i4y4H3K9h3c8W2M7Y4y4G2k6Y4c8Q4x3X3g2U0L8$3@1`.

文件大小: 1,314KB

使用的工具

W32Dasm V8.93--Win9X Dissembler&Debugger
Hex WorkShop V2.54--Hex Editor
RegSnap V2.51--Registry Analyzing Tool
Registry Studio V1.01--Enhanced Registry Editor

难易程度

Easy( )  Medium(x)  Hard( )  Pro( )

                   ----------=======声明========----------

      未经作者同意,不得修改、引用原文,一切权利保留。
      本教程只供教学用,其他一切用途皆被禁止。
               
                  ----------=======软件介绍========----------
     
      WebZip是目前一个非常流行的网站下载软件,它的很大的一个卖点就是可将下载的站点压缩
为一个Zip文件,方便传输及节省磁盘空间,另外它的界面相当的漂亮,并且可换Skins,同类软件中
它应是你首选的。不过我认为它的不足是启动时间过长,经我检查,此软件又是用Delphi编写的,
而且用了很多第三方的控件,太多的功能必然导致占据较多的系统资源,对于我来说,我不喜欢这
种过多占用系统资源的软件,你呢?

                ----------=======软件的保护机制========-------
      
      又是Name/Code保护形式,试用期28天,试用期或过期后,如若往回调整系统时间,程序均会
提醒你将系统时间调回,如果是在试用期间调整的,那么将直接导致试用期结束,结束后程序每个
下载任务最多包括50个网页。
      未注册时,每次启动均有nag,提醒你还剩多少天的试用期。
      用RegSnap拍照、分析注册表后,得知时间与注册信息保存在:
HKEY_USERS\.DEFAULT\Software\Microsoft\IFind\
HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Metrics\
两处的键值是完全一模一样的,这就相当于在其中的一处做了备份,试用期过后,只有将两处的键
值同时删去,才能重新获得28天试用期。另外,键值的内容是加密的,包括注册信息,下面是程序
在我的注册表里生成的时间记录值(sample):
4u8h????E=@I@DCDE??RJMVMQPQR、¥Y`Ж┆f]`f`dcde吹斗nnpo哎究懒旅呐

                   ----------========正文========----------

       这个软件如果你没有足够的crack经验,我想几天之内休想破解掉它。我曾经先后几次破解
此软件,但均以失败告终,但昨天站长Cflanker让我帮帮忙,把此软件破掉,于是我抱着最后一线
希望又拿它开刀了!老天真给我面子,这会我终于找到了切入点,看来做什么事情都需要讲究点方
式方法(怎么那么多废话!得!各位看官着急了,我这就话回正题)。
       还是老规矩,请出我们的老朋友--W32Dasm,反汇编、等待(够你歇会儿的),OK!
       还是先去“String Data References”看看有没有可值得参考的字符串,在这里,我想要的
信息都找到了,我分别到代码窗口去寻找他们对应的代码,看看有没有CALL/TEST/JNE这样的经典结
构,或者reg flag这样的全局变量,很不幸,我迷失在“汇编”丛林中。我可以推测出这些相应的
代码是被寄存器间接寻址方式呼叫的,因此只有在Debugger状态下才能找到源头!
       真的没有办法了吗?我开始漫无边际地寻找,也许幸运之神很青睐我,请看下面的代码:

:004E28A8 8B45FC                  mov eax, dword ptr [ebp-04]
:004E28AB E8241AF2FF              call 004042D4
:004E28B0 50                      push eax

* Reference To: SHRLK20.InputUnlockCode, Ord:0000h   《==调用动态链结库SHRLK20.DLL的
InputUnlockCode函数
                                  |
:004E28B1 E872F9FFFF              Call 004E2228
:004E28B6 33C0                    xor eax, eax
:004E28B8 5A                      pop edx
:004E28B9 59                      pop ecx
         
      我终于大彻大悟,原来所有的秘密都在这个SHRLK20.DLL动态链结库里,怪不得找不到CALL的
源头。
      接下来我到W32代码窗口开始部分的“IMPORTED FUNCTIONS”处看看程序调用了SHRLK20.DLL
的哪些函数(如下):

   Import Module 021: SHRLK20.DLL

Addr:0011BE5C hint(0000) Name: PassHandle
Addr:0011BE6A hint(0000) Name: InputUnlockCode
Addr:0011BE7C hint(0000) Name: GetUserName
Addr:0011BE8A hint(0000) Name: GetTryNumber
Addr:0011BE9A hint(0000) Name: GetTrialPeriodRemaining
Addr:0011BEB4 hint(0000) Name: CheckProtectionDLL

       各个函数的名称非常直接了当,不用我再多说了吧!我非常关心“PassHandle”这个函数,
它极有可能是程序启动时调用的函数。在W32Dasm的search窗口,输入“PassHandle”,查找的结果
有两处,其中一处是由下面的代码呼叫出来的,可不予考虑:

* Referenced by a CALL at Address:
|:0050A8B4   
|
:004E2780 55                      push ebp
:004E2781 8BEC                    mov ebp, esp
:004E2783 6A00                    push 00000000
:004E2785 53                      push ebx
:004E2786 8BD8                    mov ebx, eax
:004E2788 33C0                    xor eax, eax
:004E278A 55                      push ebp
:004E278B 6824284E00              push 004E2824
:004E2790 64FF30                  push dword ptr fs:[eax]
:004E2793 648920                  mov dword ptr fs:[eax], esp
:004E2796 8B4324                  mov eax, dword ptr [ebx+24]
:004E2799 50                      push eax

* Reference To: SHRLK20.PassHandle, Ord:0000h
                                  |
:004E279A E891FAFFFF              Call 004E2230  〈==trace进去,还是呼叫“
SHRLK20.PassHandle”
:004E279F 33C0                    xor eax, eax
:004E27A1 8A4344                  mov al, byte ptr [ebx+44]
:004E27A4 50                      push eax
:004E27A5 33C0                    xor eax, eax
:004E27A7 8A4370                  mov al, byte ptr [ebx+70]
:004E27AA 50                      push eax
:004E27AB 8B4354                  mov eax, dword ptr [ebx+54]
:004E27AE 50                      push eax
:004E27AF 8B4350                  mov eax, dword ptr [ebx+50]
:004E27B2 50                      push eax
:004E27B3 8B434C                  mov eax, dword ptr [ebx+4C]
:004E27B6 50                      push eax
:004E27B7 8B4368                  mov eax, dword ptr [ebx+68]
:004E27BA E8151BF2FF              call 004042D4
:004E27BF 50                      push eax
:004E27C0 8B4360                  mov eax, dword ptr [ebx+60]
:004E27C3 E87C99F2FF              call 0040C144
:004E27C8 83C4F8                  add esp, FFFFFFF8
:004E27CB DD1C24                  fstp qword ptr [esp]
:004E27CE 9B                      wait
:004E27CF 8D55FC                  lea edx, dword ptr [ebp-04]

* Possible StringData Ref from Code Obj ->"ddddd"
                                  |
:004E27D2 B838284E00              mov eax, 004E2838
:004E27D7 E8A091F2FF              call 0040B97C
:004E27DC 8B45FC                  mov eax, dword ptr [ebp-04]
:004E27DF E8F01AF2FF              call 004042D4
:004E27E4 50                      push eax
:004E27E5 8B436C                  mov eax, dword ptr [ebx+6C]
:004E27E8 E8E71AF2FF              call 004042D4
:004E27ED 50                      push eax
:004E27EE 8B4364                  mov eax, dword ptr [ebx+64]
:004E27F1 E8DE1AF2FF              call 004042D4
:004E27F6 50                      push eax
:004E27F7 8B432C                  mov eax, dword ptr [ebx+2C]
:004E27FA E8D51AF2FF              call 004042D4
:004E27FF 50                      push eax
:004E2800 8B4328                  mov eax, dword ptr [ebx+28]
:004E2803 E8CC1AF2FF              call 004042D4
:004E2808 50                      push eax

* Reference To: SHRLK20.CheckProtectionDLL, Ord:0000h
                                  |
:004E2809 E8FAF9FFFF              Call 004E2208   <==此处出现nag
:004E280E 33C0                    xor eax, eax
:004E2810 5A                      pop edx
:004E2811 59                      pop ecx
:004E2812 59                      pop ecx
:004E2813 648910                  mov dword ptr fs:[eax], edx

* Possible StringData Ref from Code Obj ->"[Y]"
                                  |
:004E2816 682B284E00              push 004E282B

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004E2829(U)
|
:004E281B 8D45FC                  lea eax, dword ptr [ebp-04]
:004E281E E86116F2FF              call 00403E84
:004E2823 C3                      ret

      为了验证以上结论,我是在W32Dasm的Debugger状态下通过的,具体操作方式请看W32Dasm的
Help。
      再让我们去呼叫此部分代码的上一个CALL去瞧瞧,即:0050A8B4处

:0050A891 E8BA85FCFF              call 004D2E50
:0050A896 B201                    mov dl, 01
:0050A898 A1B4674F00              mov eax, dword ptr [004F67B4]
:0050A89D E88EBFFEFF              call 004F6830
:0050A8A2 A32C815100              mov dword ptr [0051812C], eax
:0050A8A7 8BC3                    mov eax, ebx
:0050A8A9 E85AEBFFFF              call 00509408
:0050A8AE 8B8314030000            mov eax, dword ptr [ebx+00000314]
:0050A8B4 E8C77EFDFF              call 004E2780  〈==呼叫nag
:0050A8B9 A104695100              mov eax, dword ptr [00516904]
:0050A8BE 8B00                    mov eax, dword ptr [eax]
:0050A8C0 E84364F4FF              call 00450D08
:0050A8C5 A104695100              mov eax, dword ptr [00516904]
:0050A8CA 8B00                    mov eax, dword ptr [eax]
:0050A8CC 80B88400000000          cmp byte ptr [eax+00000084], 00
:0050A8D3 0F85BC010000            jne 0050AA95
:0050A8D9 C683D507000000          mov byte ptr [ebx+000007D5], 00
:0050A8E0 B201                    mov dl, 01

      为了进一步验证,在W32Dasm的Debugger状态下,在:0050A8B4处设断点,又一次验证了结论,
程序执行完此行后,出现nag;将你的系统时间往前调整,再次用此方法验证,还是在这个CALL里出
现提醒你将系统时间调回的messagebox。看来这个CALL是处理程序启动时检查注册信息、试用期是
否已过的部分!
      接下来,我试着把此CALL Nop掉,重新运行程序,Bingo!nag没了,窗口的title处也不再有
还剩多少天的适用期的提示,Cool!为了进一步验证,我将系统时间调前调后均没有任何影响,看来
可以收兵了!

The Patch

       在文件WebZIP.exe的offset:00109CB4h处,将E8C77EFDFF修改为9090909090,但这不是最好
的办法,你应该知道机器码E8xxxxxxxx代表CALL xxxxxxxx,而B8xxxxxxxx代表MOV eax, xxxxxxxx,
这样只需将E8改为B8即可,是不是很cool,只改半个字节就让程序百分之百注册!

                  ---------========The Final========----------
      
      这回你知道了,在W32Dasm中,除了“String Data References”以外,“IMPORTED
FUNCTIONS”也很重要哦!
      祝你好运!下节见。
.
2004-8-3 16:01
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
13
Tutor12  How to crack Emblaze.Audio 1.01

作者:dREAMtHEATER
E-mail:dreamtheater@263.net
写作日期: 17th, Sep 1999

软件背景资料

运行平台: Win9X  
文件名称: embaudio.exe
程序类型: Multimedia Tools
下载地点: dcbK9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6h3g2E0j5X3I4S2P5X3g2Q4x3X3g2U0L8$3@1`.

文件大小: 1,151KB

使用的工具

W32Dasm V8.93--Win9X Dissembler
Hex WorkShop V2.54--Hex Editor
RegSnap V2.51--Registry Analyzing Tool
Registry Studio V1.01--Enhanced Registry Editor

难易程度

Easy(x)  Medium( )  Hard( )  Pro( )

                   ----------=======声明========----------

      未经作者同意,不得修改、引用原文,一切权利保留。
      本教程只供教学用,其他一切用途皆被禁止。
               
                  ----------=======软件介绍========----------
     
      Emblaze Audio is an application used for compressing *.wav audio files suitable
for use on the Internet.

                ----------=======软件的保护机制========-------
      
      与时间相关的键值记录在:
      HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\ultxfile\Format\MSHV04A6\open
      HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\ultxfile\Format\MSHV04A6\write
      HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\ultxfile\Format\MSHV04A6\xlate
      其他内容看正文!

                   ----------========正文========----------

      Hi! 大家好!我们又见面了 :-)
      我已有好长一段时间没有写tutor了(距tutor 11的推出已有28天了),想必让各位等苦了(
千万不要对我失去了信心啊!)。上个月简直没差点把我累死,咳咳.....,为了练好CRACKing内功
,我没白天黑日地做练习,每天搞得我都是脑发胀、眼发直、手发酸,还好,功夫不负有心人,一
个月下来我也许创下了破解记录---crack掉将近100个共享软件(所有软件均随机性的从网上D下的,
这可花了我一百大元),可以说我遇到了几乎所有的保护系统,并积累了大量的cracking经验。说
实话,学习cracking没有什么捷径可走,你唯一可以做的就是努力再努力!
      好!话回正题,我今天向大家介绍一种程序保护类型。如果文中提到的例子的破解你能完全
理解,那么再遇到此类程序,你应该能百分之百地破解。
      本讲中用的shareware例子叫“Emblaze.Audio”,该共享软件是用Release Software
Corporation(简称RS)出品的time limited类型的保护程序封装的。安装后在该软件的安装目录下有
三个与此相关的文件,分别是Rsagent.hlp,rsdll.dll,rsagnt32.dll,我也曾经遇到过其他几个
用RS封装的软件,均是在软件的安装目录下存在这三个文件,其中包括著名的杀毒软件--Norton
AntiVirus 4.0,因此我觉得有必要将这一类共享程序的破解方法公布于众。不过告诉你,这个RS封
装程序真的很差劲,可以说极容易破解,因此我今天不着重讲解破解过程,只对他的注册过程做一
详细介绍。刚开始时,我也被他的注册过程给唬住了,以为该程序必须网上注册,其实不然!
      首先,运行文件AUDIO.exe,程序马上跳出一个nagscreen,告诉你还剩多少天可以试用,窗口
上还有三个BUTTON,分别是Buy Now,Try It,Cancel,此界面做得很象用VBox封装的程序。请用鼠标点
取"Buy Now" button,进入Registration Wizard,你必须逐项的填写registration form,当然你可
以随便填了,填好后点击next,这一步要求你填credit card number,expired date, card name,
这回估计你犯难了,你上哪儿找credit card number, 没关系,我在网上找了一个VISA的number,当
然这也不能用,只是骗骗他 :-),请填入credit card number:4760313551454,expired date:
10/99, card name:dREAMtHEATER(你可以随便填),点击next-->order by fax/mail-->完成!该操
作完毕后,会在你的windows目录下生成一个叫“rsagent.ini”的文件,里面包括你刚才你输入的
个人信息,同时生成一个personalCode项。
      退出程序,重新运行,再次点击“Buy Now”,这会程序读取rsagent.ini中的信息,并提取
其中的firstName=dREAMtHEATER,lastName=Home'99,personalCode=0018471466(这是我的信息)
列于order by fax/mail的注册窗口上,并且有一个空的EditBox等待你输入UnlockingCode,那么
OK,我随便输入1234567890。      
      在SoftIce中设断点bpx hmemcpy ,Ctrl-D,回到注册窗口,press "OK" button,重新回到
SoftIce中,记住你不要再按Ctrl-D,"bc *",取消所有断点,Press F12数次,程序停在:

:100055FA 6816040000              push 00000416
:100055FF 55                      push ebp
:10005600 FFD3                    call ebx
:10005602 BFE00D0310              mov edi, 10030DE0  <==回到这里
:10005607 83C9FF                  or ecx, FFFFFFFF
:1000560A 33C0                    xor eax, eax
:1000560C F2                      repnz
:1000560D AE                      scasb
:1000560E F7D1                    not ecx
:10005610 49                      dec ecx
:10005611 83F90A                  cmp ecx, 0000000A  <==检查输入的code是否是10位数
:10005614 743F                    je 10005655
:10005616 8D542410                lea edx, dword ptr [esp+10]

* Possible StringData Ref from Data Obj ->"Sorry, that unlocking code is "
                                        ->"not valid for this program."
                                  |
:1000561A 6890180210              push 10021890
:1000561F 52                      push edx
:10005620 E88BF20000              call 100148B0
:10005625 83C408                  add esp, 00000008
:10005628 8D442410                lea eax, dword ptr [esp+10]
:1000562C 6A30                    push 00000030

* Possible StringData Ref from Data Obj ->"Invalid Unlocking Code"
                                  |
:1000562E 6878180210              push 10021878
:10005633 50                      push eax
:10005634 55                      push ebp

* Reference To: USER32.MessageBoxA, Ord:0195h
                                  |
:10005635 FF15A8950310            Call dword ptr [100395A8]
:1000563B 8B0D74170310            mov ecx, dword ptr [10031774]
:10005641 83C8FF                  or eax, FFFFFFFF
:10005644 66C741040000            mov [ecx+04], 0000
:1000564A 5F                      pop edi
:1000564B 5E                      pop esi
:1000564C 5D                      pop ebp
:1000564D 5B                      pop ebx
:1000564E 81C470020000            add esp, 00000270
:10005654 C3                      ret

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:10005614(C)
|
:10005655 BF10B00210              mov edi, 1002B010
:1000565A 83C9FF                  or ecx, FFFFFFFF
:1000565D 33C0                    xor eax, eax
:1000565F 8D94240C010000          lea edx, dword ptr [esp+0000010C]
:10005666 F2                      repnz
:10005667 AE                      scasb
:10005668 F7D1                    not ecx
:1000566A 2BF9                    sub edi, ecx
:1000566C 8BC1                    mov eax, ecx
:1000566E 8BF7                    mov esi, edi
:10005670 8BFA                    mov edi, edx
:10005672 8B1574170310            mov edx, dword ptr [10031774]
:10005678 C1E902                  shr ecx, 02
:1000567B F3                      repz
:1000567C A5                      movsd
:1000567D 8BC8                    mov ecx, eax
:1000567F 81C2B6000000            add edx, 000000B6
:10005685 83E103                  and ecx, 00000003
:10005688 8D84240C010000          lea eax, dword ptr [esp+0000010C]
:1000568F F3                      repz
:10005690 A4                      movsb
:10005691 8D8C24D8000000          lea ecx, dword ptr [esp+000000D8]
:10005698 51                      push ecx
:10005699 52                      push edx
:1000569A 50                      push eax
:1000569B E8B0620000              call 1000B950
:100056A0 83C40C                  add esp, 0000000C
:100056A3 8D8C24D8000000          lea ecx, dword ptr [esp+000000D8]  <==ecx指向real
code
:100056AA 68E00D0310              push 10030DE0
:100056AF 51                      push ecx
:100056B0 E8ABA20100              call 1001F960  <==real code与你输入code进行比较
:100056B5 83C408                  add esp, 00000008
:100056B8 85C0                    test eax, eax
:100056BA 0F85AC020000            jne 1000596C
:100056C0 8D942480010000          lea edx, dword ptr [esp+00000180]

你用F10执行到:100056AA这一行时,下命令"d ecx",即可看到数据窗口中显示的real code(我的是
UnlockingCode=JDALNFVWQI),是不是真的很简单?
      在注册窗口重新填入你的code,press OK,出现类似Explorer中复制文件的窗口,告诉你请等
待,稍等片刻,程序注册成功,出现主窗口!
      到此为止,你已百分之百地cracking了该程序!

                  ---------========The Final========----------

      所有用RS封装的程序破解过程是完全一样的,不同的只是UnlockingCode!
2004-8-3 16:02
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
14
2004-8-3 16:51
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
15
《Windows 95 系统程式设计 大奥秘》
Windows 95 System Programming SECRETs 侯捷 译
9a7K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8X3A6B7K9r3!0#2i4K6u0W2j5%4y4V1L8W2)9J5k6h3&6W2N6q4)9J5c8R3`.`.
2004-8-3 16:57
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
16
Windows 95 程式设计指南
(Windows 95 : A Developer's Guide 繁体中文版)
《Windows 95 系统程式设计 - 虚拟机器与 VxD 程式设计》
System Programming for Windows 95侯捷 译

50cK9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8X3A6B7K9r3!0#2i4K6u0W2j5%4y4V1L8W2)9J5k6h3&6W2N6q4)9J5c8R3`.`.
2004-8-3 17:35
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
17
draren总结的ollydbg v1.09d中文版使用说明
一点一滴的积累,也就会了.
之所以选择ollydbg
1.我的os是winXP,无法使用trw2000,而softice装了多次均未成功,还蓝屏死机多次.郁闷.
2.友好的gui界面,不像softice.可以边干活边听歌,不像softice,把整个os都挂起了.多用两次,连时间都不知道了.
3.强大的内存查看功能,再不用什么-d了,而且跳转方便,爽!一目了然.
4.强大的右键菜单功能

ollydbg的界面:

菜单:
文件:
    1.其中包括该菜单的下部有上次打开的纪录,该纪录保存有上次未清除的断点.
    2.附加.对付那些Anti-Debug程序.先运行程序,再运行od,文件-->附加.
查看:
    1.执行模块(Alt+E),查看程序使用的动态链接库
    2.查看断点.Alt+B
调试:
    1.运行(F9)加载程序后,运行!
    2.暂停(F12)
    3.单步进入(F7)遇见CALL进入!进入该子程序.
    4.单步跳过(F8)遇见CALL不进去!
    5.执行到返回(ALT+F9)就是执行到该子程的返回语句
ollydbg的16进制编辑功能.类似与hiew,hex workshop

查看-->文件

二进制文件编辑功能.查看-->文件,打开的文件是二进制显示.选中要改变的机器指令,空格,修改,右击-->保存.

ollydbg的四个区域
左上角是cpu窗口,分别是地址,机器码,汇编代码,注释;注释添加方便,而且还能即时显示函数的调用结果,返回值.
右上角是寄存器窗口,但不仅仅反映寄存器的状况,还有好多东东;     
双击即可改变Eflag的值,对于寄存器,指令执行后发生改变的寄存器会用红色显示.
cpu窗口下面还有一个小窗口,显示当前操作改变的寄存器状态.  不错;
左下角是内存窗口.可以ascii或者unicode两种方式显示内存信息;
右下角的是当前堆栈情况,还有注释啊.

F3选择打开程序.  
使用F9执行程序.
下断点:

1.对函数下下断点
在代码区右击-->搜索-->当前模块中的名称(ctrl+N),在跳出来的对话框中选择需要下的断点函数.->右击->查找导入参考(enter),按F2下断点.如果有多个地方调用了该函数就这样操作。
2.在需要的地方下断点  F2
添加注释:
在代码区第四列,右击-->注释
查看内存地址
右击内存地址列-->前往-->输入要查看的内存地址
在函数lstrlen的注释的上方,有一个变量string,当执行到该函数的时候,string后面会出现lstrlen函数的参数字符串.在实际使用中一般是输入的字符串.(很好用哦)
类似的还有lstrcmp,上面有string1,string2能够显示将要比较的两个字符串.
另外,一般在执行getwindowtext等函数后,右边寄存器列,eax会显示函数的返回值,即取到的内容.同时内存中也会有显示.
在反汇编中选中一条命令,如果其中有用到内存中的地址,右击-->在转存中跟随-->直接常数
此时内存地址会显示指令中引用到的内存字符
拷贝功能十分强大.直接选择要拷贝的内容.右击-->复制-->文件or剪贴板
ollydbg的条件断点可以按寄存器,存储器,消息(必须是消息的数字,如wm_command就是111)等等设断,非常强大,一旦设了之后记录到文件中,下次restart程序还能用,不用拿笔记,很方便。

显示跳转路进:
选项-->调试设置-->cpu页-->显示跳转的方向,显示跳转的路径,如果跳转没有实现则显示灰色路径。在cpu窗口中,机器码的前面显示">"符号.同时,在cpu窗口下的小缝中会显示跳转路径,从何跳转而来.右击-->前往...一般都是条件跳转,上面的内容就是比较的地方啦。:)

跟踪功能:
选项-->调试跟踪-->跟踪:设置运行跟踪的缓存大小.越大越好.
调试-->打开或清除运行跟踪
然后我们就可以用CTRL+F11或CTRL+F12开启“跟踪进入”和“ 跟踪跳过”了。当我们暂停程序的时候,可以用小键盘上的“+”,“-”,“*”来控制跟踪功能了。
其中,“跟踪进入”和运行类似,但是记录所有指令以及寄存器变化。并且会自动进入所有的CALL中。
“ 跟踪跳过”和“跟踪进入”类似,但是不进入CALL
“+”用来显示跟踪缓冲区中的下一条指令
“-”用来显示跟踪缓冲区中的上一条指令
“*”用来发返回当前指令

让OD显示MFC42.DLL中的函数
打开调试-->选择导入库-->添加-->选择MFC43.LIB加入.重新载入MFC程序,就可以看到call后面的api函数了.

动态暂停以messagebox为例)
先运行目标程序,再运行od,选择文件-->附加.在目标程序运行出现对话框时,切换至od,F12暂停.

字符串参考:
在汇编代码区,右击-->搜索-->字符参考

更改二进制文件:
方法1.查看-->文件,打开文件,找到欲修改的偏移,使用机器码修改,然后右击保存文件.缺点是需要使用其他软件来获取偏移地址.
方法2.直接在反汇编代码区更改,这时可以使用汇编代码更改,不用记机器码.完了.右击-->复制到可执行文件-->保存文件.很是方便哪!

关于虚拟地址和偏移地址:
ollydbg果然强大,太强大了,在欲修改的指令处右击-->复制到可执行文件,弹出窗口中光标所在行即是欲修改的指令所在的偏移地址,右击-->汇编,直接修改汇编指令,不用记机器码,又不用虚拟地址到偏移地址的转换.改完后保存文件.爽丫!
2004-8-3 17:53
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
18
Hiew是一款优秀的16进制编辑器,特别的它可以对应用程序进行反汇编,而且同时支持对可执行文件的16进制代码及汇编语言代码修改,使用起来非常方便。现在虽然有很多WINDOWS界面的16进制编辑器,如:UltraEdit、Hex Workshop等,但是本人还是比较喜欢 Hiew,因为它的界面简单、使用方便,没有太多花哨而在我们破解中又用不到的功能。Hiew是传统的DOS界面,其操作多用功能组合键完成,这里主要介绍如何用它来编辑可执行应用程序,对于其它功能请用F1功能键查看帮助信息。

  将下载后的Hiew直接解压到一个目录下即可使用,不需要安装。主执行程序为Hiew.exe,直接运行这个文件即进入Hiew编辑环境,其界面图如下所示:

  F1:帮助 F3:按文件名字排序 F4:按文件扩展名排序 F5:按文件时间排序 F6:按文件大小排序

  按ALT+F1可选择驱动器:

  按上下键选中欲编辑程序后回车即可进入编辑区,默认是进入文本浏览模式,可以用F4键或连续按回车键在“文本―16进制代码―汇编代码”之间转换,其中文本模式不能进行编辑,只供查看,三种模式的界面如下所示:

  F1:帮助 F3:编辑 F4:模式 F5:跳到指定偏移地址 F7:寻找指定代码 F8:文件头信息 F9:选择文件 F10:退出

  按F4可选择显示模式:

  通常我们一般使用汇编代码模式比较方便,首先用F7搜寻需要修改的代码,例如下面的一段程序:
  263855FF  CMP ES:[DI][-001],DL
    7408  JE 0000012D

  我们要将JE 0000012D(16进制代码为7408)改为JNE 0000012D(16进制代码为7508),在HIEW中按F7后输入两句原始程序的16进制代码 26 38 55 FF 74 08 :

  HIEW找到这段代码后将这段程序显示在屏幕中间,此时我们按F3进入编辑状态,有两种方法修改程序:1. 直接修改16进制代码,例如将74改为75;2. 按TAB键将修改切换到汇编代码模式。两种方式的截图如下:

  在HIEW中可以用ESC键退出当前的命令状态,修改完指令代码后按F9键“Update”更新程序(即存盘),然后退出HIEW,完成对应用程序的修改。

作者 :ddcrack
2004-8-3 17:56
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
19
作者 :ddcrack

 如今越来越多的软件用EXE压缩工具来加密了,虽然我们可以用Softice来动态跟踪,但是如果需要修改程序代码时就麻烦了,因为软件被压缩处理后程序代码已经不是原始的可执行代码,而是被压缩软件的壳藏起来,所以遇到这样的情况时我们是没有办法直接修改程序代码的。如果要破解软件,一种办法是给程序脱壳,另外一种办法是给程序打个补丁。当你想要修改程序代码却又找不到在动态跟踪时看到的那些程序代码时就应该怀疑要破解的软件是否被EXE压缩工具加壳了(也有可能是应用程序自己对关键代码部分进行了加密变换处理),而Gtw就能帮你查看软件是否带壳。

  Gtw程序很小,压缩文件才100多KB,不需要安装,将下载后的软件直接解压到目录下就可以工作了。

  Windows界面的Gtw其主运行程序是gtui.exe,初次运行Gtw时会出现如下的对话框:

  点击“Serach...”后在目录中选定“gtw.exe”,其它选项默认即可,按“OK”进入Gtw的Windows主程序界面:

  点击“Open...”后在目录中选定需要查看的应用程序名,然后Gtw就会显示该程序的类型信息:

此例中Trw2000.exe是没有经过压缩的应用程序

此例中Notepad.exe是被ASPACK V1.083压缩过的应用程序

  程序中的“Option”选项即为程序初次运行时出现的对话框(即第一个图片),选中“/ZE - Show extended EXE information”可以查看应用程序的扩展EXE信息,其余的选项一般也不需要用到,建议大家最好把这个选项选上,因为有时候在默认设置下Gtw不能正确识别某些被压缩的应用程序,而加上“/ZE”设置后我们还可以从其扩展信息中发现壳的类型。
2004-8-3 17:57
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
20
作者 :ddcrack

 Win32dasm是个反编译工具,它可以将应用程序静态反编译为WIN 32汇编代码,利用Win32dasm我们可以对程序进行静态分析,帮助快速找到程序的破解突破口,有时甚至可以直接用它来破解软件。不过Win32dasm只能对应用程序进行静态反汇编,如果原程序经过了加密变换处理或着是被EXE压缩工具压缩过,那么用Win32dasm对程序进行反汇编就没有任何意义了。与Win32dasm相对应的另外一个反编译工具是IDA PRO,它的功能比Win32dasm更为强大,不过IDA PRO那9兆的巨大身躯也着实挺让人吃惊的。Win32dasm同时支持Windows 9x和NT两个操作系统平台,压缩文件大小不过500多KB,所以综合起来还是很实用的。

  Win32dasm不需要复杂的安装过程,直接将下载的压缩文件解压到目录下就可以立即使用了,其运行主程序是W32dsm89.exe,程序运行后的界面图如下:

  * 选择“Disassembler”下的“Open File To Disassemble...”打开需要反汇编的程序就可以开始反编译了,上面的画面即为程序反汇编后的结果。

  * 在对较大的应用程序进行反汇编时通常会耗费不少的时间,为了能保存Win32dasm反汇编的结果以便于下次查阅而不用再次进行重复反汇编,可以选择“Disassembler”下的“Save Disassembly Text File and Create Project File”选项将结果存到文件中,下次需要打开时可以用“Project”下的“Open Porject File...”打开所保存的反汇编结果。

  * 分析程序时我们经常需要搜索程序中的特定字符串,了解字符串被调用的情况,这时选择“Search”下的“Find Text”就可以了,“Find Next”(或按功能键F3)能帮助找到程序中其它调用此字符串的地方。

  * “Goto”菜单下提供了四种快速跳到指定程序地方的功能:Goto Code Start――跳到程序代码开始处,快捷键为CTRL+S;Goto Program Entry Point――跳到程序进入点,快捷键为F10;Goto Page――跳到指定页,快捷键为F11;Goto Code Location――跳到指定地址代码处,快捷键为SHIFT+F12,我们用得比较多的是“Goto Code Location”,即跳到指定地址代码处,在Win32dasm中按住SHIFT+F12即可:

  其中需要输入的代码地址“Code Offset(Hex)”和Softice中显示的代码地址一样

  * “Functions”下的“Imports”功能显示了反汇编程序中所调用到的WIN32 API函数:

  双击指定的行可以直接跳到程序中这个WIN32 API函数被调用的代码处

  * “HexData”下的“Hex Display of Data Objects/Segments”和“Hex Display of Code Data”可以分别查看16进制形式的数据段和代码段数据。

  * “Refs”菜单对于程序的分析是很有用处的,“Menu References”显示程序中的菜单资源,“Dialog References”显示程序中的对话框资源,“String Data References”显示程序中的字符串资源。

  “Refs”菜单下的各个功能中都可以通过双击鼠标跳到指定行资源被调用的代码地址处,其中“String Data References”是最有用的,我们可以通过查找程序中出现的特定字符串,从而快速跳到可疑字符串被调用的代码处,分析程序的运行机制:
2004-8-3 17:58
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
21
作者 :ddcrack

  对于FrogsICE这个东东我不知道有多少人在使用它,以前我也没有用过,只是后来无意中试了一下,感觉挺不错的,所以在这里给大家推荐。如今有越来越多的软件为了防止我们这些CRACKER的破解而在程序中大量使用ANTI-DEBUGGERS技术,最显著的效果就是在用调试工具(如SOFTICE、TRW2000)跟踪软件时常常莫名其妙的死机。FrogsICE的出现正是为了解决这个问题来的,它首先进入系统内存,然后欺骗使用ANTI-DEBUGGERS技术的应用程序,让它们检测不到DEBUGGER的存在。虽然FrogsICE不能保证百分百的对任何软件都有效果,但是应付绝大部分含有ANTI技术的程序是不成问题的,至少FrogsICE能帮助我们减少DOWN机的次数,为我们的破解之路扫除障碍。

  FrogsICE的安装过程很简单,只要将下载的压缩文件直接解压到目录下就可以了,其运行主程序是FPloader.exe;
  注意:FrogsICE目录下有3个子目录,分别是WIN95/WIN98/WINME,首先将与你使用的操作系统相对应的子目录下的“frogsice.vxd”文件拷贝到FrogsICE的当前目录,然后才能运行FPloader.exe,程序运行后首先会进行一些系统备份的工作,我们可以直接按“OK”确认,

  * FrogsICE启动后会立即最小化到系统任务栏中,我们在它的图标上右击鼠标右键即可弹出其主界面:

  注意:FrogsICE每次启动后都默认处于“Disable”状态,即不起任何作用(其任务栏中的图标带有红色的“X”号),为了使FrogsICE进入功能状态,我们必须每次手动点击“Activation”下的“Enable FrogsICE”(启动时默认设置为“Disable FrogsICE”)。

  通常我们使用FrogsICE的默认设置就可以较好的工作了,但为了更好的掌握它,在这里我将其命令大概都讲一下:

Basic options :
  * BlueScreenOfDeath:当FrogsICE检测到anti-SoftICE代码时弹出Windows异常蓝屏,显示anti-SoftICE代码类型、寄存器值、anti-SoftICE代码地址等信息,然后你可以选择“Press (Y)es to fool the app”欺骗程序,选择“Press (N)o to let it run”不欺骗程序,选择“Press ESCAPE to disable BSOD”退出BlueScreenOfDeath功能。当你想要了解应用程序使用什么样的anti-SoftICE手段时,这个选项可帮上你的大忙了,关于anti-SoftICE代码类型的具体含义请看FrogsICE目录下的“Code.txt”文件;
  * Hide SICE drivers:隐藏SoftICE的驱动程序(SICE, SIWDEBUG and SIWVID),使它们不会被检测到,当SoftICE没有装载时为灰色不可用状态;
  * Log to file:将FrogsICE每一个检测到的结果写入文件,该文件一般位于C盘根目录下,且文件名是随机的,形式如“c:\Fihjzpan.wga”,其目的是防止应用程序将这个文件删除;
  * Protect SICE files:保护SoftICE目录下的每个文件不被应用程序破坏,同时也保护FrogsICE的log文件;
  * Auto-scan on startup/exit:当FrogsICE启动及退出时进行自动进行一些检查,尽管作用不是很大,不过有毕竟比没有强;
  * Hide FPloader:隐藏FPloader.exe自己;
  * Beep:当FrogsICE发现anti-debugger代码时启动系统喇叭发出警告。

Quick options :
  * Default Settings / Bulletproof / User Defined:默认设置/最大安全性能(除了'BSOD')/用户自定义;
  * Protection:选择、编辑、添加、删除带有anti-SoftICE代码的应用程序。

Advanced options :
  * Pop-up SoftICE:当FrogsICE发现anti-debugger代码时先弹出SoftICE(SoftICE必须已经运行“I1HERE ON”命令),然后才把控制权返回给应用程序;
  * Hook DRx:检测任何对寄存器(dr0-dr7)进行的读/写操作,此项被选后不能使用“BPM”断点;
  * IDT monitor/protector:禁止任何对IDT的修改;
  * INT03 Hook:强迫FrogsICE在SoftICE之前接管INT03,不论SoftICE是否已经被装入内存,此项被选后不能使用“BPX”断点;

  * Adjust localtime to RTC:将当前WINDOWS的系统时间调整为BIOS的真实时间;

Misc options :
  * Run app...:在FrogsICE中运行程序;
  * Run Loader32:运行SoftICE的“Symbol Loader32”即使“Hide SICE drivers”选项被选取;
  * Scan now...:按“Basic options”中的选项进行扫描测试。

Logfile :
  * View Log:当FrogsICE检测到anti-SoftICE代码时查看LOG文件;
  * Delete Log:删除FrogsICE的LOG文件。

Activation :
  * ENABLE / DISABLE:允许/禁止FrogsICE的功能。

Apply :当改变FrogsICE的设置时,用来保存和使新设置起效。
2004-8-3 17:59
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
22
2004-8-3 18:00
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
23
About anti-SoftICE tricks
text written by Frog's Print
Method 01
=========
This method of detection of SoftICE (as well as the following one) is
used by the majority of packers/encryptors found on Internet.
It seeks the signature of BoundsChecker in SoftICE

   mov     ebp, 04243484Bh        ; 'BCHK'
   mov     ax, 04h
   int     3      
   cmp     al,4
   jnz     SoftICE_Detected
___________________________________________________________________________
Method 02
=========

Still a method very much used (perhaps the most frequent one).  It is used
to get SoftICE 'Back Door commands' which gives infos on Breakpoints,
or execute SoftICE commands...
It is also used to crash SoftICE and to force it to execute any commands
(HBOOT...) :-((  

Here is a quick description:
-AX = 0910h   (Display string in SIce windows)
-AX = 0911h   (Execute SIce commands -command is displayed is ds:dx)
-AX = 0912h   (Get breakpoint infos)
-AX = 0913h   (Set Sice breakpoints)
-AX = 0914h   (Remove SIce breakoints)

Each time you'll meet this trick, you'll see:
-SI = 4647h
-DI = 4A4Dh
Which are the 'magic values' used by SoftIce.
For more informations, see "Ralf Brown Interrupt list" chapter int 03h.

Here is one example from the file "Haspinst.exe" which is the dongle HASP
Envelope utility use to protect DOS applications:

4C19:0095   MOV    AX,0911  ; execute command.
4C19:0098   MOV    DX,[BX]  ; ds:dx point to the command (see below).
4C19:009A   MOV    SI,4647  ; 1st magic value.
4C19:009D   MOV    DI,4A4D  ; 2nd magic value.
4C19:00A0   INT    3        ; Int call.(if SIce is not loaded, jmp to 00AD*)
4C19:00A1   ADD    BX,02    ; BX+2 to point to next command to execute
4C19:00A4   INC    CX
4C19:00A5   CMP    CX,06    ; Repeat 6 times  to execute
4C19:00A8   JB     0095     ; 6 different commands.
4C19:00AA   JMP    0002     ; Bad_Guy jmp back.
4C19:00AD   MOV    BX,SP    ; Good_Guy go ahead

The program will execute 6 different SIce commands located at ds:dx, which
are: LDT, IDT, GDT, TSS, RS, and ...HBOOT.

* the "jmp to 00ADh" is performed via an SEH if the debugger is not loaded.
___________________________________________________________________________
Method 03
=========

Less used method.  It seeks the ID of SoftICE VxD via the int 2Fh/1684h
(API Get entry point)      

   xor     di,di
   mov     es,di
   mov     ax, 1684h      
   mov     bx, 0202h       ; VxD ID of winice
   int     2Fh
   mov     ax, es          ; ES:DI -> VxD API entry point
   add     ax, di
   test    ax,ax
   jnz     SoftICE_Detected

___________________________________________________________________________
Method 04
=========

Method identical to the preceding one except that it seeks the ID of SoftICE
GFX VxD.

   xor     di,di
   mov     es,di
   mov     ax, 1684h      
   mov     bx, 7a5Fh       ; VxD ID of SIWVID
   int     2fh
   mov     ax, es          ; ES:DI -> VxD API entry point
   add     ax, di
   test    ax,ax
   jnz     SoftICE_Detected
__________________________________________________________________________
Method 05
=========
Method seeking the 'magic number' 0F386h returned (in ax) by all system
debugger. It calls the int 41h, function 4Fh.
There are several alternatives.  

The following one is the simplest:

   mov     ax,4fh
   int     41h
   cmp     ax, 0F386
   jz      SoftICE_detected

Next method as well as the following one are 2 examples from Stone's
"stn-wid.zip" (8cbN6%4N6%4i4K6u0W2j5%4u0S2j5$3E0A6L8X3N6Q4x3X3g2F1k6i4b7`.):

   mov     bx, cs
   lea     dx, int41handler2
   xchg    dx, es:[41h*4]
   xchg    bx, es:[41h*4+2]
   mov     ax,4fh
   int     41h
   xchg    dx, es:[41h*4]
   xchg    bx, es:[41h*4+2]
   cmp     ax, 0f386h
   jz      SoftICE_detected

int41handler2 PROC
   iret
int41handler2 ENDP

_________________________________________________________________________
Method 06
=========

2nd method similar to the preceding one but more difficult to detect:

int41handler PROC
   mov     cl,al
   iret
int41handler ENDP

   xor     ax,ax
   mov     es,ax
   mov     bx, cs
   lea     dx, int41handler
   xchg    dx, es:[41h*4]
   xchg    bx, es:[41h*4+2]
   in      al, 40h
   xor     cx,cx
   int     41h
   xchg    dx, es:[41h*4]
   xchg    bx, es:[41h*4+2]
   cmp     cl,al
   jnz     SoftICE_detected

_________________________________________________________________________
Method 07
=========

Method of detection of the WinICE handler in the int68h (V86)

   mov     ah,43h
   int     68h
   cmp     ax,0F386h
   jz      SoftICE_Detected

=> it is not possible to set a BPINT 68 with softice but you can hook a 32Bit
  app like this:

  BPX exec_int if ax==68
  (function called is located at byte ptr [ebp+1Dh] and client eip is
  located at [ebp+48h] for 32Bit apps)
__________________________________________________________________________
Method 08
=========

It is not a method of detection of SoftICE but a possibility to crash the
system by intercepting int 01h and int 03h and redirecting them to another
routine.
It calls int 21h functions 25h and 35h (set/get int vector) and ds:dx points
to the new routine to execute (hangs computer...)

   mov     ah, 25h
   mov     al, Int_Number (01h or 03h)
   mov     dx, offset New_Int_Routine
   int     21h
__________________________________________________________________________
Method 09
=========

This method is closed to methods 03 and 04 (int 2Fh/1684h) but it is only
performed in ring0 (VxD or a ring3 app using the VxdCall).
The Get_DDB service is used to determine whether or not a VxD is installed
for the specified device and returns a Device Description Block (in ecx) for
that device if it is installed.

  mov     eax, Device_ID   ; 202h for SICE or 7a5Fh for SIWVID VxD ID
  mov     edi, Device_Name ; only used if no VxD ID (useless in our case
  VMMCall Get_DDB
  mov     [DDB], ecx       ; ecx=DDB or 0 if the VxD is not installed

Note as well that you can easily detect this method with SoftICE:
  bpx Get_DDB if ax==0202 || ax==7a5fh
__________________________________________________________________________
Method 10
=========

=>Disable or clear breakpoints before using this feature. DO NOT trace with
SoftICE while the option is enable!!

This trick is very efficient:
by checking the Debug Registers, you can detect if SoftICE is loaded
(dr7=0x700 if you loaded the soft with SoftICE loader, 0x400 otherwise) or if
there are some memory breakpoints set (dr0 to dr3) simply by reading their
value (in ring0 only). values can be manipulated and or changed as well
(clearing BPMs for instance)

__________________________________________________________________________
Method 11
=========

This method is most known as 'MeltICE' because it has been freely distributed
via 7c4N6%4N6%4i4K6u0W2N6$3W2F1k6X3W2D9k6i4y4Q4x3X3g2U0L8$3#2Q4x3X3f1`. However it was first used by NuMega people to allow
Symbol Loader to check if SoftICE was active or not (the code is located
inside nmtrans.dll).

The way it works is very simple:
It tries to open SoftICE drivers handles (SICE, SIWVID for Win9x, NTICE for
WinNT) with the CreateFileA API.

Here is a sample (checking for 'SICE'):

BOOL IsSoftIce95Loaded()
{
  HANDLE hFile;  
  hFile = CreateFile( "\\\\.\\SICE", GENERIC_READ | GENERIC_WRITE,
                     FILE_SHARE_READ | FILE_SHARE_WRITE,
                     NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
  if( hFile != INVALID_HANDLE_value )
  {
     CloseHandle(hFile);
     return TRUE;
  }
  return FALSE;
}

Although this trick calls the CreateFileA function, don't even expect to be
able to intercept it by installing a IFS hook: it will not work, no way!
In fact, after the call to CreateFileA it will get through VWIN32 0x001F
service _VWIN32_ReleaseWin32Mutex (via Kernel32!ORD_0001/VxDCall function)
and then browse the DDB list until it find the VxD and its DDB_Control_Proc
field.
In fact, its purpose is not to load/unload VxDs but only to send a
W32_DEVICEIOCONTROL (0x23) control message (DIOC_OPEN and DIOC_CLOSEHANDLE)
to the VxD Control_Dispatch proc (how the hell a shareware soft could try
to load/unload a non-dynamically loadable driver such as SoftICE ;-).
If the VxD is loaded, it will always clear eax and the Carry flag to allow
its handle to be opened and then, will be detected.
You can check that simply by hooking Winice.exe control proc entry point
while running MeltICE.

00401067:  push      00402025    ; \\.\SICE
0040106C:  call      CreateFileA
00401071:  cmp       eax,-001
00401074:  je        00401091

There could be hundreds of BPX you could use to detect this trick.
-The most classical one is:
BPX CreateFileA if *(esp->4+4)=='SICE' || *(esp->4+4)=='SIWV' ||
   *(esp->4+4)=='NTIC'

-The most exotic ones (could be very slooooow
  BPINT 30 if eax==002A001F && (*edi=='SICE' || *edi=='SIWV')  
    ;will break 3 times

-or (a bit) faster:
  BPINT 30 if (*edi=='SICE' || *edi=='SIWV')

  BPX KERNEL32!ORD_0001 if *edi=='SICE' || *edi=='SIWV'  
    ;will break 3 times

-Much faster:
  BPX VMM_GetDDBList if eax->3=='SICE' || eax->3=='SIWV'

Note also that some programs (like AZPR3.00) use de old 16-bit _lopen
function to do the same job:

  push    00                        ; OF_READ
  mov     eax,[00656634]            ; '\\.\SICE',0
  push    eax
  call    KERNEL32!_lopen
  inc     eax
  jnz     00650589                  ; detected
  push    00                        ; OF_READ
  mov     eax,[00656638]            ; '\\.\SICE'
  push    eax
  call    KERNEL32!_lopen
  inc     eax
  jz      006505ae                  ; not detected

__________________________________________________________________________
Method 12
=========

This trick is similar to int41h/4fh Debugger installation check (code 05
& 06) but very limited because it's only available for Win95/98 (not NT)
as it uses the VxDCall backdoor. This detection was found in Bleem Demo.

  push  0000004fh         ; function 4fh
  push  002a002ah         ; high word specifies which VxD (VWIN32)
                          ; low word specifies which service
                            (VWIN32_Int41Dispatch)
  call  Kernel32!ORD_001  ; VxdCall
  cmp   ax, 0f386h        ; magic number returned by system debuggers
  jz    SoftICE_detected

Here again, several ways to detect it:

   BPINT 41 if ax==4f

   BPINT 30 if ax==0xF386   ; SoftICE must be loaded for this one

   BPX Exec_PM_Int if eax==41 && edx->1c==4f && edx->10==002A002A

   BPX Kernel32!ord_0001 if esp->4==002A002A && esp->8==4f   ; slooooow!

__________________________________________________________________________

Method 13
=========

Not a real method of detection, but a good way to know if SoftICE is
installed on a computer and to locate its installation directory.
It is used by few softs which access the following registry keys (usually #2) :

-#1: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion
\Uninstall\SoftICE
-#2: HKEY_LOCAL_MACHINE\Software\NuMega\SoftICE
-#3: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion
\App Paths\Loader32.Exe

Note that some nasty apps could then erase all files from SoftICE directory
(I faced that once

Useful breakpoint to detect it:

    BPX _regopenkey if *(esp->8+0x13)=='tICE' || *(esp->8+0x37)=='tICE'

__________________________________________________________________________

Method 14
=========

A call to VMM 'Test_Debug_Installed' service. As the name says, its purpose
is to determines whether a debugger is running on your system (ring0 only).

  VMMCall Test_Debug_Installed
  je      not_installed

This service just checks a flag.
2004-8-3 18:03
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
24
2004-8-3 18:08
0
雪    币: 106728
活跃值: (202444)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
25
《组合语言之艺术》
d76K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6h3g2T1L8$3!0C8x3o6l9%4i4K6u0W2j5$3!0E0i4K6u0r3x3e0p5H3y4s2S2A6j5h3&6V1j5h3V1J5j5$3S2E0i4K6u0r3k6r3I4Q4x3V1k6*7M7r3A6Q4x3V1k6V1L8%4N6F1i4K6u0r3P5X3S2#2j5X3q4F1k6$3k6#2i4K6u0r3P5Y4g2Z5k6i4W2#2P5h3q4F1P5X3S2A6P5h3W2K6K9s2g2Q4x3X3g2Z5N6r3#2D9
2004-8-3 18:12
0
游客
登录 | 注册 方可回帖
返回