- UID
 - 31971
 
 注册时间2007-5-6
阅读权限10
最后登录1970-1-1
周游历练 
  
 
 
 
该用户从未签到  
 | 
 
[P.Y.G]2007破解教程Patch过KEY法 
 
【破文标题】Patch[P.Y.G]2007视频教程 
【破文作者】tangxiaodao[梦想成为P.Y.G的一员^_^.] 
【作者邮箱】[email protected] 
【作者主页】dtxd.vicp.net  QQ:172751148 
【破解工具】PEID,OD第二版,FI,Armadillo Find Protected 
【破解平台】win2003 server sp2 
【软件名称】P.Y.G2007教学视频第12课(只要搞定一课,其它的也一样搞定了) 
【原版下载】找P.Y.G的大大们要吧,呵呵 
【保护方式】▲ 目标经Armadillo保护;保护系统授权等级(专业版) 
                屏蔽调试器,双进程模式,使用 防止内存补丁 程序保护模式 
               【备份密钥设置】固定的备份密钥;【程序压缩设置】较好/较慢地压缩方式 
               【其它保护设置】使用 Digital River 版本密钥▲ 版本号 4.40(用FI可以查出来) 
             Armadillo 1.xx - 2.xx -> Silicon Realms Toolworks  双进程壳+KEY+播放密码 
首先在这里对P.Y.G的大大们说声不好意思,本人不敢妄自尊大,更不敢在各位大大们面前卖弄,只是出于技术交流.如有侵犯P.Y.G某些利益的话, 
 
就请删此贴!好了,言归正题. 
      用PEID查壳:Armadillo 1.xx - 2.xx -> Silicon Realms Toolworks,在双击第12课.exe看进程,是双进程的 
      准备工作:1.自己的Hardware Fingerprint:6C71-0134 
               2.注册用户的Hardware Fingerprint:843D-1A14 
                           Name:crack 
                           Key:YT75HW-66YF8I-DJIE8D-NF8766W-LO00GF-78ERTE-9YRTGH-SDF452-CVBMNX-UR6648 
                           播放密码:Thank You Everyone 
              3.以上两条信息后面会用到 
              PS:这里的注册用户的信息都是假的,大家不要去尝试了,我这里主要和大家交流的是方法. 
      那么我们就开始动手了.用OD载入 
     一.将双进程切换成单进程: 
      1.用OD载入,忽略所有异常,隐藏OD, 
004E1243 第12课.<模块入口点>   55              push ebp   //OD载入停在这里 
004E1244                8BEC            mov ebp,esp 
004E1246                6A FF           push -1 
004E1248                68 40AF5000     push 第12课.0050AF40 
004E124D                68 800F4E00     push 第12课.004E0F80 
004E1252                64:A1 00000000  mov eax,dword ptr fs:[0] 
004E1258                50              push eax 
004E1259                64:8925 0000000>mov dword ptr fs:[0],esp 
004E1260                83EC 58         sub esp,58 
004E1263                53              push ebx 
004E1264                56              push esi 
004E1265                57              push edi 
004E1266                8965 E8         mov dword ptr ss:[ebp-18],esp 
004E1269                FF15 88515000   call dword ptr ds:[<&KERNEL32.GetVersion>>; kernel32.GetVersion 
004E126F                33D2            xor edx,edx 
004E1271                8AD4            mov dl,ah 
004E1273                8915 30C65000   mov dword ptr ds:[50C630],edx 
004E1279                8BC8            mov ecx,eax 
004E127B                81E1 FF000000   and ecx,0FF 
004E1281                890D 2CC65000   mov dword ptr ds:[50C62C],ecx 
004E1287                C1E1 08         shl ecx,8 
004E128A                03CA            add ecx,edx 
 
        2.下断bp OpenMutexA,F9运行 
 
7C817247 kernel32.Ope>  8BFF            mov edi,edi   //断在这里 
7C817249                55              push ebp 
7C81724A                8BEC            mov ebp,esp 
7C81724C                51              push ecx 
7C81724D                51              push ecx 
7C81724E                837D 10 00      cmp dword ptr ss:[ebp+10],0 
7C817252                56              push esi 
7C817253                0F84 7C090400   je kernel32.7C857BD5 
7C817259                FF75 10         push dword ptr ss:[ebp+10] 
7C81725C                64:8B35 1800000>mov esi,dword ptr fs:[18] 
7C817263                8D45 F8         lea eax,dword ptr ss:[ebp-8] 
7C817266                50              push eax 
7C817267                81C6 F80B0000   add esi,0BF8 
7C81726D                FF15 8C10807C   call dword ptr ds:[<&ntdll.RtlInitAnsiStr>; ntdll.RtlInitAnsiString 
7C817273                6A 00           push 0 
7C817275                8D45 F8         lea eax,dword ptr ss:[ebp-8] 
7C817278                50              push eax 
7C817279                56              push esi 
7C81727A                FF15 8810807C   call dword ptr ds:[<&ntdll.RtlAnsiStringT>; ntdll.RtlAnsiStringToUnicodeString 
7C817280                85C0            test eax,eax 
***************这里我们要看堆栈,记录堆栈的内容****************** 
0012F798       004CCDB8  /CALL 到 OpenMutexA 来自 第12课.004CCDB2 
0012F79C       001F0001  |Access = 1F0001 
0012F7A0       00000000  |Inheritable = FALSE 
0012F7A4       0012FDD8  \MutexName = "B90::DA6F99F282"            //这里的东西会用到 
**************这里面的内容待会会用到**************************** 
     3.CTRL+G :来到-->  004010000,来到这里: 
00401000                0000            add byte ptr ds:[eax],al 
00401002                0000            add byte ptr ds:[eax],al 
00401004                0000            add byte ptr ds:[eax],al 
00401006                0000            add byte ptr ds:[eax],al 
00401008                0000            add byte ptr ds:[eax],al 
0040100A                0000            add byte ptr ds:[eax],al 
0040100C                0000            add byte ptr ds:[eax],al 
0040100E                0000            add byte ptr ds:[eax],al 
00401010                0000            add byte ptr ds:[eax],al 
修改上面的代码为: 
00401000                60              pushad 
00401001                9C              pushfd 
00401002                68 D8FD1200     push 12FDD8    ; ASCII "B90::DA6F99F282"   //这里的12FDD8就是上面我们记录的堆栈内容了 
00401007                33C0            xor eax,eax 
00401009                50              push eax 
0040100A                50              push eax 
0040100B                E8 305A417C     call kernel32.CreateMutexA 
00401010                9D              popfd 
00401011                61              popad 
00401012              - E9 3062417C     jmp kernel32.OpenMutexA 
    *注:将以上这些代码复制下来或者用二进制复制下来,后面会用到. 
     60 9C 68 D8 FD 12 00 33 C0 50 50 E8 30 5A 41 7C 9D 61 E9 30 62 41 7C     //这是我复制下来的二进制代码 
然后在修改过的代码处   右键->此处新建EIP,F9运行,断在这里: 
7C817247 kernel32.Ope>  8BFF            mov edi,edi      //断在这里,取消断点 
7C817249                55              push ebp 
7C81724A                8BEC            mov ebp,esp 
7C81724C                51              push ecx 
7C81724D                51              push ecx 
7C81724E                837D 10 00      cmp dword ptr ss:[ebp+10],0 
7C817252                56              push esi 
7C817253                0F84 7C090400   je kernel32.7C857BD5 
7C817259                FF75 10         push dword ptr ss:[ebp+10] 
7C81725C                64:8B35 1800000>mov esi,dword ptr fs:[18] 
7C817263                8D45 F8         lea eax,dword ptr ss:[ebp-8] 
7C817266                50              push eax 
7C817267                81C6 F80B0000   add esi,0BF8 
7C81726D                FF15 8C10807C   call dword ptr ds:[<&ntdll.RtlInitAnsiStr>; ntdll.RtlInitAnsiString 
7C817273                6A 00           push 0 
7C817275                8D45 F8         lea eax,dword ptr ss:[ebp-8] 
7C817278                50              push eax 
7C817279                56              push esi 
7C81727A                FF15 8810807C   call dword ptr ds:[<&ntdll.RtlAnsiStringT>; ntdll.RtlAnsiStringToUnicodeString 
 
取消断点后,CTRL+G:00410000,撤消选择处修改,(至此已经是单进程了,记住以上的这些操作,后面会用到), 
下断  he GetDlgItem    SHIFT+F9运行,断在这里: 
77E1F4C9 USER32.GetDl>  8BFF            mov edi,edi 
77E1F4CB                55              push ebp 
77E1F4CC                8BEC            mov ebp,esp 
77E1F4CE                8B4D 08         mov ecx,dword ptr ss:[ebp+8] 
77E1F4D1                E8 CACE0000     call USER32.77E2C3A0 
77E1F4D6                85C0            test eax,eax 
77E1F4D8                74 1F           je short USER32.77E1F4F9 
77E1F4DA                56              push esi 
77E1F4DB                FF75 0C         push dword ptr ss:[ebp+C] 
77E1F4DE                50              push eax 
77E1F4DF                E8 A9FFFFFF     call USER32.77E1F48D 
77E1F4E4                85C0            test eax,eax 
 
******************堆栈内容************************************************************* 
0012947C       0137210C  /CALL 到 GetDlgItem 来自 01372106 
00129480       003C0872  |hWnd = 003C0872 ('Key Required',class='SRTSmartDlg{49419F98-1DFE-4A> 
00129484       00000001  \ControlID = 1 
00129488       0012EB14 
0012948C       00000000 
00129490       00000000 
00129494       00000000 
00129498       0144B068  UNICODE "Key Required" 
0012949C       0146F098  UNICODE "This program requires a security key. If you have one, sele> 
************************************************************************************** 
 
继续Shift+F9运行,直到出现有"OK","CANCEL"这个对话框,不要点"OK",下断   he GetDlgItem,然后点"OK"  ,  断到这里: 
77E1F4C9 USER32.GetDl>  8BFF            mov edi,edi    ; 
77E1F4CB                55              push ebp 
77E1F4CC                8BEC            mov ebp,esp 
77E1F4CE                8B4D 08         mov ecx,dword ptr ss:[ebp+8] 
77E1F4D1                E8 CACE0000     call USER32.77E2C3A0 
77E1F4D6                85C0            test eax,eax 
77E1F4D8                74 1F           je short USER32.77E1F4F9 
77E1F4DA                56              push esi 
77E1F4DB                FF75 0C         push dword ptr ss:[ebp+C] 
77E1F4DE                50              push eax 
77E1F4DF                E8 A9FFFFFF     call USER32.77E1F48D 
77E1F4E4                85C0            test eax,eax 
 
****************************堆栈内容****************************************************** 
00128250       01364618  /CALL 到 GetDlgItem 来自 01364616 
00128254       003E0872  |hWnd = 003E0872 ('Enter Key',class='#32770') 
00128258       00000001  \ControlID = 1 
 
******************************************************************************************* 
ALT+F9:执行到用户代码,到这里 
01364618                50              push eax 
01364619                68 15040000     push 415 
0136461E                57              push edi 
0136461F                FFD6            call esi 
01364621                50              push eax 
01364622                68 07040000     push 407 
01364627                57              push edi 
01364628                FFD6            call esi 
0136462A                50              push eax 
0136462B                E8 2370FFFF     call 0135B653 
01364630                8B0D E01E3801   mov ecx,dword ptr ds:[1381EE0] 
01364636                83C4 0C         add esp,0C 
01364639                E8 9F3EFEFF     call 013484DD 
0136463E                33DB            xor ebx,ebx 
01364640                84C0            test al,al 
01364642                75 36           jnz short 0136467A 
01364644                381D E8C03701   cmp byte ptr ds:[137C0E8],bl 
 
F8单步运行,又回到这里: 
77E1F4C9 USER32.GetDl>  8BFF            mov edi,edi                               ; 
77E1F4CB                55              push ebp 
77E1F4CC                8BEC            mov ebp,esp 
77E1F4CE                8B4D 08         mov ecx,dword ptr ss:[ebp+8] 
77E1F4D1                E8 CACE0000     call USER32.77E2C3A0 
77E1F4D6                85C0            test eax,eax 
77E1F4D8                74 1F           je short USER32.77E1F4F9 
77E1F4DA                56              push esi 
77E1F4DB                FF75 0C         push dword ptr ss:[ebp+C] 
77E1F4DE                50              push eax 
77E1F4DF                E8 A9FFFFFF     call USER32.77E1F48D 
77E1F4E4                85C0            test eax,eax 
77E1F4E6                0F84 6CA60100   je USER32.77E39B58 
77E1F4EC                8B30            mov esi,dword ptr ds:[eax] 
77E1F4EE                85F6            test esi,esi 
77E1F4F0                0F84 64A60100   je USER32.77E39B5A 
    继续F8单步运行,来到这里:向下找到TEST AL,AL  删除硬件断点,F4运行到此处 
01364621                50              push eax 
01364622                68 07040000     push 407 
01364627                57              push edi 
01364628                FFD6            call esi 
0136462A                50              push eax 
0136462B                E8 2370FFFF     call 0135B653 
01364630                8B0D E01E3801   mov ecx,dword ptr ds:[1381EE0] 
01364636                83C4 0C         add esp,0C 
01364639                E8 9F3EFEFF     call 013484DD 
0136463E                33DB            xor ebx,ebx 
01364640                84C0            test al,al             ;删除硬件断点,F4运行到这里 
01364642                75 36           jnz short 0136467A 
01364644                381D E8C03701   cmp byte ptr ds:[137C0E8],bl 
0136464A                74 2E           je short 0136467A 
F4运行到上面的TEST AL,AL后,F8单步运行到下面的这个CALL,然后F7跟进下面的CALL 
 
01364689                E8 253CFEFF     call 013482B3   ;F7跟进 
0136468E                53              push ebx 
0136468F                B9 98FA3701     mov ecx,137FA98 
01364694                8945 08         mov dword ptr ss:[ebp+8],eax 
01364697                E8 353CFEFF     call 013482D1 
0136469C                837D 14 01      cmp dword ptr ss:[ebp+14],1 
013646A0                75 27           jnz short 013646C9 
013646A2                8B45 08         mov eax,dword ptr ss:[ebp+8] 
013646A5                8BC8            mov ecx,eax 
就来到了这里:大家看到下面还有一个CALL吧,用F4运行到那里,再F7跟进 
013482B3                56              push esi                                  ; USER32.GetDlgItem 
013482B4                8BF1            mov esi,ecx 
013482B6                FF7424 08       push dword ptr ss:[esp+8] 
013482BA                8B8E 5C060000   mov ecx,dword ptr ds:[esi+65C] 
013482C0                6A 00           push 0 
013482C2                E8 24D70000     call 013559EB            ;F4运行到这里,F7跟进 
013482C7                3386 5C200000   xor eax,dword ptr ds:[esi+205C] 
013482CD                5E              pop esi 
013482CE                C2 0400         retn 4 
013482D1                56              push es 
F7跟进CALL后来到这里: 
 
013559EB                8B4424 04       mov eax,dword ptr ss:[esp+4] 
013559EF                C1E0 06         shl eax,6 
013559F2                034424 08       add eax,dword ptr ss:[esp+8] 
013559F6                8B4481 18       mov eax,dword ptr ds:[ecx+eax*4+18] 
013559FA                35 8AC0E665     xor eax,65E6C08A 
013559FF                C2 0800         retn 8 
01355A02                E8 05000000     call 01355A0C 
01355A07                E9 0C000000     jmp 01355A18 
01355A0C                68 78303801     push 1383078 
01355A11                FF15 70623701   call dword ptr ds:[1376270]               ; kernel32.InitializeCriticalSection 
01355A17                C3              retn 
F8单步,到下面的代码处:然后在我标的位置下 硬件执行断点: 
013559F6                8B4481 18       mov eax,dword ptr ds:[ecx+eax*4+18]   ;在这里下硬件执行断点 
013559FA                35 8AC0E665     xor eax,65E6C08A 
013559FF                C2 0800         retn 8 
01355A02                E8 05000000     call 01355A0C 
01355A07                E9 0C000000     jmp 01355A18 
01355A0C                68 78303801     push 1383078 
01355A11                FF15 70623701   call dword ptr ds:[1376270]               ; kernel32.InitializeCriticalSectioni 
     下好硬件执行断点后,重新载入    第12课.exe 
     二.仍然是双进程变单进程,(PS:大家没有忘记吧,我让大家记住的上面的操作方法,这里我就不细写了,和上面的方法一样的) 
下断bp OpenMutexA,F9运行  CTRL+G:004010000   二进制粘贴 
60 9C 68 D8 FD 12 00 33 C0 50 50 E8 30 5A 41 7C 9D 61 E9 30 62 41 7C 
 
00401000                60              pushad 
00401001                9C              pushfd 
00401002                68 D8FD1200     push 12FDD8                               ; ASCII "4CC::DA6F99F282" 
00401007                33C0            xor eax,eax 
00401009                50              push eax 
0040100A                50              push eax 
0040100B                E8 305A417C     call kernel32.CreateMutexA 
00401010                9D              popfd 
00401011                61              popad 
00401012              - E9 3062417C     jmp kernel32.OpenMutexA 
 
    三.PATCH. *这里是关键,不太好操作* 
      切换成单进程后,直接F9运行,断在这里(如果没断下来,重复切换成单进程,下断 he GetModuleHandleA, 
一直SHIFT+F9) 
013559F6                8B4481 18       mov eax,dword ptr ds:[ecx+eax*4+18] 
013559FA                35 8AC0E665     xor eax,65E6C08A 
013559FF                C2 0800         retn 8 
01355A02                E8 05000000     call 01355A0C 
01355A07                E9 0C000000     jmp 01355A18 
01355A0C                68 78303801     push 1383078 
01355A11                FF15 70623701   call dword ptr ds:[1376270]               ; kernel32.InitializeCriticalSection 
01355A17                C3              retn 
****************大家看上面的这个位置,就是我们要Patch的位置了********** 
  013559FA                35 8AC0E665     xor eax,65E6C08A 
  013559FF                C2 0800         retn 8 
   这里就是我们要patch的位置 
********************************************************************** 
patch方法:  013559FA                35 8AC0E665     xor eax,65E6C08A->把这段代码改成 jmp 00401000 
            013559FF                C2 0800         retn 8                               
 
改完后,直接在JMUP上跟随到00401000处:Patch以下代码 
 
35 8A C0 E6 65 3D 34 01 71 6C 75 05 B8 40 27 AD 92 C2 08 00(也可以二进制粘贴) 
 
00401000                35 8AC0E665     xor eax,65E6C08A 
00401005                3D 3401716C     cmp eax,6C710134                          ; 6C71-0134是我的硬件指纹.在此处下硬件执行 
 
断点 
0040100A                75 05           jnz short 第12课.00401011 
0040100C                B8 4027AD92     mov eax,843D1A14                          ; 843D-1A14是注册用户的硬件指纹 
00401011                C2 0800         retn 8 
00401014                0000            add byte ptr ds:[eax],al 
 
下完硬件执行断点后,F4运行到断点位置,来到这里(或者双击堆栈中的EIP) 
 
013559F6                8B4481 18       mov eax,dword ptr ds:[ecx+eax*4+18] 
013559FA              - E9 01B60AFF     jmp 第12课.00401000 
013559FF                C2 0800         retn 8 
01355A02                E8 05000000     call 01355A0C 
01355A07                E9 0C000000     jmp 01355A18 
01355A0C                68 78303801     push 1383078 
01355A11                FF15 70623701   call dword ptr ds:[1376270]               ; kernel32.InitializeCriticalSection 
01355A17                C3              retn 
01355A18                68 245A3501     push 1355A24 
接下来,F8单步,看看EAX的变化,EAX就是我的硬件指纹,然后继续F8,来到: 
013559F6                8B4481 18       mov eax,dword ptr ds:[ecx+eax*4+18] 
013559FA              - E9 01B60AFF     jmp 第12课.00401000 
013559FF                C2 0800         retn 8 
01355A02                E8 05000000     call 01355A0C 
01355A07                E9 0C000000     jmp 01355A18 
 
F9运行一下,然后F8单步,来到 
013482E5                3386 60200000   xor eax,dword ptr ds:[esi+2060] 
013482EB                5E              pop esi 
013482EC                C2 0400         retn 4 
013482EF                55              push ebp 
013482F0                8BEC            mov ebp,esp 
013482F2                51              push ecx 
013482F3                53              push ebx 
一直按F9,直到弹出对话框 :哈哈  现在的硬件特征码变成了: 
Hardware Fingerprint: 843D-1A14    (注册用户的,看到了吧) 
现在填上注册用户的key看看,按确定,断在这里: 
013559F6                8B4481 18       mov eax,dword ptr ds:[ecx+eax*4+18] 
013559FA              - E9 01B60AFF     jmp 第12课.00401000 
013559FF                C2 0800         retn 8 
01355A02                E8 05000000     call 01355A0C 
01355A07                E9 0C000000     jmp 01355A18 
01355A0C                68 78303801     push 1383078 
01355A11                FF15 70623701   call dword ptr ds:[1376270]               ; kernel32.InitializeCriticalSection 
01355A17                C3              retn 
01355A18                68 245A3501     push 1355A24 
01355A1D                E8 E9F50100     call 0137500B 
 
四.成功操作.  继续按F9运行,出现  Key is valid, and has been stored.按OK,又断下,继续按F9,代码终止.关掉OD,运行程序,出现输入 
播放密码的窗口:然后输入播放密码,或者自己用OD爆破也可以,或者有能力的自己作个注册机也行,在这里我就不作详细的操作了, 
OK,到此完毕,程序运行正常,大家可以慢慢欣赏了!收工! 
附:由于工作太忙了,所以没有太多的时间,如果有时间的话,我会把脱壳的步骤再给大家发上来,您能看到这里是我最大的荣幸了,谢谢! 
 
********************本破文出自原创,如需转载,请注明出处,谢谢!********************** 
 
[ 本帖最后由 glts 于 2007-6-18 00:27 编辑 ] |   
 
评分
- 
查看全部评分
 
 
 
 
 
 |