[I]by:dsong @ 看雪论坛[bbs.pediy.com][/I]
==================== 声明 ====================
以下内容是给想要学习破解的人看的,里面有我个人经历以及破解时的阻碍和想法。所以请伸手党们快快离开.
我也是个菜鸟,所以这篇文章中的程序是不包含花指令、VM、混淆等的保护的,代码可读性是较好的,但是又由于是年轻的版本,所以破解的时候和2005年前后的程序肯定又有了一些不同之处。当然高手就快快绕过,这种给学过一点破解的人看可能会有些帮助。当然0基础不能直接看,另找更简单、更老的程序吧。
====================写在前面====================
这篇文章我在吾爱破解论坛已经发过了,顺便在这里也发一下...... (算是"转"我自己的帖,呵呵。)我之前也发过一个帖,但是那个不适合初学者看,因为讲得很不清楚,一些东西怎么得出的我都没说。而且当时有个暗桩没有去除,现在我去除了,但是方法我先不说,等有人回帖说了方法后,我再说我自己的方法。
还有在吾爱我发现有很多伸手党,这篇文章发到看雪来不知会不会出现真正的"交流分享"的效果呢?
我本来其实不是很想写出来的,但经过考虑,还是放出来吧。但愿软件官方不会把他们程序改复杂的......(因为我下载了垃圾公司的软件,发现它的程序反调试加了好多,我的OD撑不住,而吾爱的OD我又不会设置......老是不能正常运行。垃圾公司的我做了一个Loader,不完美的,因为下了断点它会检测到,所以不打算继续尝试了。还有一个FlashDecompilerTrillix,我还在研究怎么脱掉它的穿山甲壳呢,因为它的脱壳和天草黑鹰教程里面的穿山甲壳很不一样......唉,学习的路还很长啊。)
====================破解步骤====================
(一)彻底去掉程序注册弹框+未注册水印
<方法一>简单方法,低级
这个方法非常简单,但是有些破解初学者(指已经看完了黑鹰初级的)就会有卡掉的地方,我们来具体分析看看。
首先,载入OD,程序有点大,得等一会。
从一个初学者角度来看,第一个是做什么呢,查壳(废话,这是必须的)得:Microsoft Visual C++ 8 [Overlay] * . 恩,很好,没加壳。(而且根据后面分析,代码可读性很好)
下面一个才是真的初学者才做的,查找字符串!看到结果有6542个字符串,是不是很心动呢?我们来看注册提示窗口,标题:欢迎使用......;内容:未注册......。哈,找到重点了。但是一看字符串就傻眼了,基本都是英文,没有什么有用的中文字。而且英文的什么unregistered也都查不到。然后,到了这里,有一半的初学者就阵亡了,很可能把程序扔进回收站了。然后另一半很聪明,让程序先跑起来(这就是今天要讲的方法),然后弹框出现,就在 OD按暂停,看堆栈。[或者你直接Ctrl+N看函数下段,问题是你能够断下来吗?那么多函数你要一个个试?;-)算了,告诉你这个程序你要想拦截到有用的,找函数结尾是W的下段。]
调用堆栈
地址 堆栈 函数例程 / 参数 调用来自 框架
0012F0F0 77D191BE 包含 ntdll.KiFastSystemCallRet USER32.77D191BC 0012F10C
0012F0F4 77D191F1 USER32.77D191B2 USER32.77D191EC 0012F10C
0012F110 7882183C USER32.GetMessageW mfc100u.78821836 0012F10C
0012F114 00144BD0 pMsg = 00144BD0
0012F118 00000000 hWnd = NULL
0012F11C 00000000 MsgFilterMin = 0
0012F120 00000000 MsgFilterMax = 0
0012F12C 78837E81 mfc100u.7882186D mfc100u.78837E7C 0012F154
0012F158 787D5B04 mfc100u.78837DB9 mfc100u.787D5AFF 0012F154
0012F15C 00000004 Arg1 = 00000004
0012F1A4 0047F76B ? <jmp.&mfc100u.#3627> XXXXXXX7.0047F766 0012F1A0
0012FF1C 788477C6 XXXXXXX7.0047DD60 mfc100u.788477C3 0012FF18
0012FF30 0063C2DB ? XXXXXXX7.0063EBBC XXXXXXX7.0063C2D6 0012FF2C
7882181D CC int3
7882181E CC int3
7882181F CC int3
78821820 CC int3
78821821 CC int3
78821822 8BFF mov edi,edi
78821824 56 push esi
78821825 57 push edi
78821826 E8 DD80F0FF call mfc100u.78729908
7882182B 8BF0 mov esi,eax
7882182D 33C0 xor eax,eax
7882182F 50 push eax
78821830 50 push eax
78821831 50 push eax
78821832 8D7E 30 lea edi,dword ptr ds:[esi+30]
78821835 57 push edi
78821836 FF15 F8185F78 call dword ptr ds:[<&USER32.GetMessageW>; USER32.GetMessageW //到了这里
7882183C 85C0 test eax,eax
7882183E 74 25 je short mfc100u.78821865
78821840 817E 34 6A030000 cmp dword ptr ds:[esi+34],36A
78821847 74 19 je short mfc100u.78821862
78821849 57 push edi
7882184A E8 02010000 call mfc100u.78821951
7882184F 59 pop ecx
78821850 85C0 test eax,eax
78821852 75 0E jnz short mfc100u.78821862
78821854 57 push edi
78821855 FF15 241A5F78 call dword ptr ds:[<&USER32.TranslateMe>; USER32.TranslateMessage
7882185B 57 push edi
7882185C FF15 201A5F78 call dword ptr ds:[<&USER32.DispatchMes>; USER32.DispatchMessageW
78821862 33C0 xor eax,eax
78821864 40 inc eax
78821865 5F pop edi
78821866 5E pop esi
78821867 C3 retn
78837DB4 CC int3
78837DB5 CC int3
78837DB6 CC int3
78837DB7 CC int3
78837DB8 CC int3
78837DB9 8BFF mov edi,edi
78837DBB 55 push ebp
78837DBC 8BEC mov ebp,esp
78837DBE 83EC 18 sub esp,18
78837DC1 53 push ebx
78837DC2 56 push esi
78837DC3 33DB xor ebx,ebx
78837DC5 57 push edi
78837DC6 43 inc ebx
78837DC7 33FF xor edi,edi
78837DC9 F645 08 04 test byte ptr ss:[ebp+8],4
78837DCD 8BF1 mov esi,ecx
78837DCF 895D F4 mov dword ptr ss:[ebp-C],ebx
78837DD2 897D F8 mov dword ptr ss:[ebp-8],edi
78837DD5 74 0F je short mfc100u.78837DE6
78837DD7 E8 8A210100 call mfc100u.78849F66
78837DDC 895D FC mov dword ptr ss:[ebp-4],ebx
78837DDF A9 00000010 test eax,10000000
78837DE4 74 03 je short mfc100u.78837DE9
78837DE6 897D FC mov dword ptr ss:[ebp-4],edi
78837DE9 FF76 20 push dword ptr ds:[esi+20]
78837DEC FF15 1C185F78 call dword ptr ds:[<&USER32.GetParent>] ; USER32.GetParent
78837DF2 834E 58 18 or dword ptr ds:[esi+58],18
78837DF6 8945 EC mov dword ptr ss:[ebp-14],eax
78837DF9 E8 0A1BEFFF call mfc100u.78729908
78837DFE 8B1D 30185F78 mov ebx,dword ptr ds:[<&USER32.UpdateWi>; USER32.UpdateWindow
78837E04 83C0 30 add eax,30
78837E07 8945 F0 mov dword ptr ss:[ebp-10],eax
78837E0A EB 6B jmp short mfc100u.78837E77
78837E0C 57 push edi
78837E0D 57 push edi
78837E0E 57 push edi
78837E0F 57 push edi
78837E10 FF75 F0 push dword ptr ss:[ebp-10]
78837E13 FF15 281A5F78 call dword ptr ds:[<&USER32.PeekMessage>; USER32.PeekMessageW
78837E19 85C0 test eax,eax
78837E1B 75 5F jnz short mfc100u.78837E7C
78837E1D 397D FC cmp dword ptr ss:[ebp-4],edi
78837E20 74 11 je short mfc100u.78837E33
78837E22 6A 01 push 1
78837E24 8BCE mov ecx,esi
78837E26 E8 D8230100 call mfc100u.7884A203
78837E2B FF76 20 push dword ptr ds:[esi+20]
78837E2E FFD3 call ebx
78837E30 897D FC mov dword ptr ss:[ebp-4],edi
78837E33 F645 08 01 test byte ptr ss:[ebp+8],1
78837E37 75 1C jnz short mfc100u.78837E55
78837E39 397D EC cmp dword ptr ss:[ebp-14],edi
78837E3C 74 17 je short mfc100u.78837E55
78837E3E 397D F8 cmp dword ptr ss:[ebp-8],edi
78837E41 75 12 jnz short mfc100u.78837E55
78837E43 FF76 20 push dword ptr ds:[esi+20]
78837E46 57 push edi
78837E47 68 21010000 push 121
78837E4C FF75 EC push dword ptr ss:[ebp-14]
78837E4F FF15 54185F78 call dword ptr ds:[<&USER32.SendMessage>; USER32.SendMessageW
78837E55 F645 08 02 test byte ptr ss:[ebp+8],2
78837E59 75 19 jnz short mfc100u.78837E74
78837E5B FF75 F8 push dword ptr ss:[ebp-8]
78837E5E 57 push edi
78837E5F 68 6A030000 push 36A
78837E64 FF76 20 push dword ptr ds:[esi+20]
78837E67 FF15 54185F78call dword ptr ds:[<&USER32.SendMessage>; USER32.SendMessageW
78837E6D FF45 F8 inc dword ptr ss:[ebp-8]
78837E70 85C0 test eax,eax
78837E72 75 03 jnz short mfc100u.78837E77
78837E74 897D F4 mov dword ptr ss:[ebp-C],edi
78837E77 397D F4 cmp dword ptr ss:[ebp-C],edi
78837E7A ^ 75 90 jnz short mfc100u.78837E0C
78837E7C E8 EC99FEFF call mfc100u.7882186D
78837E81 85C0 test eax,eax
78837E83 74 62 je short mfc100u.78837EE7
78837E85 397D FC cmp dword ptr ss:[ebp-4],edi
78837E88 74 25 je short mfc100u.78837EAF
78837E8A 8B45 F0 mov eax,dword ptr ss:[ebp-10]
78837E8D 8B40 04 mov eax,dword ptr ds:[eax+4]
78837E90 3D 18010000 cmp eax,118
78837E95 74 07 je short mfc100u.78837E9E
78837E97 3D 04010000 cmp eax,104
78837E9C 75 11 jnz short mfc100u.78837EAF
78837E9E 6A 01 push 1
78837EA0 8BCE mov ecx,esi
78837EA2 E8 5C230100 call mfc100u.7884A203
78837EA7 FF76 20 push dword ptr ds:[esi+20]
78837EAA FFD3 call ebx
78837EAC 897D FC mov dword ptr ss:[ebp-4],edi
78837EAF 8B06 mov eax,dword ptr ds:[esi]
78837EB1 8BCE mov ecx,esi
78837EB3 FF90 90000000call dword ptr ds:[eax+90]
78837EB9 85C0 test eax,eax
78837EBB 74 35 je short mfc100u.78837EF2
78837EBD FF75 F0 push dword ptr ss:[ebp-10]
78837EC0 E8 209BFEFF call mfc100u.788219E5
78837EC5 59 pop ecx
78837EC6 85C0 test eax,eax
78837EC8 74 0A je short mfc100u.78837ED4
78837ECA C745 F4 01000000mov dword ptr ss:[ebp-C],1
78837ED1 897D F8 mov dword ptr ss:[ebp-8],edi
78837ED4 57 push edi
78837ED5 57 push edi
78837ED6 57 push edi
78837ED7 57 push edi
78837ED8 FF75 F0 push dword ptr ss:[ebp-10]
78837EDB FF15 281A5F78call dword ptr ds:[<&USER32.PeekMessage>; USER32.PeekMessageW
78837EE1 85C0 test eax,eax
78837EE3 ^ 75 97 jnz short mfc100u.78837E7C
78837EE5 ^ EB 90 jmp short mfc100u.78837E77
78837EE7 57 push edi
78837EE8 E8 D976F6FF call mfc100u.7879F5C6
78837EED 83C8 FF or eax,FFFFFFFF
78837EF0 EB 07 jmp short mfc100u.78837EF9
78837EF2 8366 58 E7 and dword ptr ds:[esi+58],FFFFFFE7
78837EF6 8B46 60 mov eax,dword ptr ds:[esi+60]
78837EF9 5F pop edi
78837EFA 5E pop esi
78837EFB 5B pop ebx
78837EFC C9 leave
78837EFD C2 0400 retn 4
......
787D5AE0 /74 3A je short mfc100u.787D5B1C
787D5AE2 |F646 58 10 test byte ptr ds:[esi+58],10
787D5AE6 |74 1E je short mfc100u.787D5B06
787D5AE8 |6A 04 push 4
787D5AEA |5B pop ebx
787D5AEB |8BCE mov ecx,esi
787D5AED |E8 74440700 call mfc100u.78849F66
787D5AF2 |A9 00010000 test eax,100
787D5AF7 |74 03 je short mfc100u.787D5AFC
787D5AF9 |6A 05 push 5
787D5AFB |5B pop ebx
787D5AFC |53 push ebx
787D5AFD |8BCE mov ecx,esi
787D5AFF |E8 B5220600 call mfc100u.78837DB9
787D5B04 33DB xor ebx,ebx ; 我们到了这里
787D5B06 |395E 20 cmp dword ptr ds:[esi+20],ebx
787D5B09 |74 11 je short mfc100u.787D5B1C
787D5B0B |68 97000000 push 97
787D5B10 |53 push ebx
787D5B11 |53 push ebx
787D5B12 |53 push ebx
787D5B13 |53 push ebx
787D5B14 |53 push ebx
787D5B15 |8BCE mov ecx,esi
787D5B17 |E8 A4460700 call mfc100u.7884A1C0
787D5B1C \834D FC FF or dword ptr ss:[ebp-4],FFFFFFFF
787D5B20 EB 25 jmp short mfc100u.787D5B47
787D5B22 8B4D D4 mov ecx,dword ptr ss:[ebp-2C]
787D5B25 85C9 test ecx,ecx
787D5B27 74 05 je short mfc100u.787D5B2E
787D5B29 E8 7C530100 call mfc100u.787EAEAA
787D5B2E 8B45 E4 mov eax,dword ptr ss:[ebp-1C]
787D5B31 8348 60 FF or dword ptr ds:[eax+60],FFFFFFFF
787D5B35 834D FC FF or dword ptr ss:[ebp-4],FFFFFFFF
787D5B39 B8 3F5B7D78 mov eax,mfc100u.787D5B3F
787D5B3E C3 retn
0047F719 |. /75 04 jnz short XXXXXXX7.0047F71F ; 这里一跳就惨了
0047F71B |. |85C0 test eax,eax
0047F71D |. |75 63 jnz short XXXXXXX7.0047F782 ; 跳过了提示框Call了
0047F71F |> \8B4B 20 mov ecx,dword ptr ds:[ebx+20]
0047F722 |. 6A 00 push 0 ; /Arg3 = 00000000
0047F724 |. 56 push esi ; |Arg2
0047F725 |. 51 push ecx ; |Arg1
0047F726 |. 8D8D 70FEFFFF lea ecx,dword ptr ss:[ebp-190] ; |
0047F72C |. E8 7FDC0A00 call XXXXXXX7.0052D3B0 ; \
0047F731 |. 68 70C86500 push XXXXXXX7.0065C870
0047F736 |. 8D8B 54010000 lea ecx,dword ptr ds:[ebx+154]
0047F73C |. C645 FC 20 mov byte ptr ss:[ebp-4],20
0047F740 |. FF15 E08C6500 call dword ptr ds:[<&mfc100u.#2614>] ; mfc100u.78650031
0047F746 |. 85C0 test eax,eax
0047F748 |. 7E 16 jle short XXXXXXX7.0047F760
0047F74A |. B8 1D000000 mov eax,1D
0047F74F |. 8D56 FF lea edx,dword ptr ds:[esi-1]
0047F752 |. 3BC2 cmp eax,edx
0047F754 |. 1BC0 sbb eax,eax
0047F756 |. F7D0 not eax
0047F758 |. 23C6 and eax,esi
0047F75A |. 8983 20030000 mov dword ptr ds:[ebx+320],eax
0047F760 |> 8D8D 70FEFFFF lea ecx,dword ptr ss:[ebp-190]
0047F766 |. E8 3FBB1B00 call <jmp.&mfc100u.#3627>
0047F76B |. 8D8D 70FEFFFF lea ecx,dword ptr ss:[ebp-190]
0047F771 |. C645 FC 19 mov byte ptr ss:[ebp-4],19
0047F775 |. E8 86DC0A00 call XXXXXXX7.0052D400
0047F77A |. 85FF test edi,edi
0047F77C |. 0F85 A6000000 jnz XXXXXXX7.0047F828
0047F782 |> 83BB 10030000 0>cmp dword ptr ds:[ebx+310],0
名称位于 XXXXXXX7,项目 2825
地址=00656004
区段=.rdata
类型=导入 (已知)
名称=ADVAPI32.RegOpenKeyExW
0012F418 80000002 |hKey = HKEY_LOCAL_MACHINE
0012F41C 003FCD98 |Subkey = "SOFTWARE\Hyperionics\HyperSnap 7"
0012F420 00000000 |Reserved = 0
0012F424 00020019 |Access = KEY_READ
0012F428 0012F438 \pHandle = 0012F438
0012ED14 80000000 |hKey = HKEY_CLASSES_ROOT
0012ED18 0065B968 |Subkey = "Applications\HprSnap7.exe\shell\open\command"
0012ED1C 00000000 |Reserved = 0
0012ED20 00020019 |Access = KEY_READ
0012ED24 0012ED38 \pHandle = 0012ED38
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)