吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 3856|回复: 6
收起左侧

[原创] 森林教学之天草初级班第7课密码分析(适合新手)

  [复制链接]
xhs123456xhs 发表于 2014-3-19 22:13
【文章标题】: URLegal v3.3
【文章作者】: 森林阴霾
【作者邮箱】: 496624130@qq.com
【软件大小】: 152KB
【下载地址】: 链接:http://pan.baidu.com/s/1gdBo9f9 密码:y111
【保护方式】: 注册码
【使用工具】: PEiD OllyDbg
【操作平台】: XP-SP2
【作者声明】: 只是感兴趣,没有其他目的。失误之处敬请诸位大侠赐教!
本教程特别写给新手,深入分析,高手请跳过。
因为天草教学中,三人行大大经常说“大家自己跟下CALL,分析下密码。”有朋友问我,就顺便写篇教程吧。让大家知道一下分析的大概思路,这里是最简单的明码比较哦。
-------------------------------------------------------------------------------------------------------------------------------------
【教程内容】
OD打开软件,首先搜索关键字“Name / Code mis-match.Try again.”双击进去,找到断首F2下断,停在当前下面代码上。
004025C6  /.  55             push ebp
004025C7  |.  8BEC           mov ebp,esp
004025C9  |.  6A FF          push -1
004025CB  |.  68 AA754100    push Urlegal.004175AA                    ;  SE 句柄安装
004025D0  |.  64:A1 00000000 mov eax,dword ptr fs:[0]
004025D6  |.  50             push eax
004025D7  |.  64:8925 000000>mov dword ptr fs:[0],esp
004025DE  |.  81EC 80000000  sub esp,80
004025E4  |.  898D 7CFFFFFF  mov dword ptr ss:[ebp-84],ecx
004025EA  |.  6A 00          push 0                                   ; /Arg1 = 00000000
004025EC  |.  8D4D 8C        lea ecx,dword ptr ss:[ebp-74]            ; |
004025EF  |.  E8 8C120000    call Urlegal.00403880                    ; \Urlegal.00403880
004025F4  |.  C745 FC 000000>mov dword ptr ss:[ebp-4],0
004025FB  |.  8D4D 8C        lea ecx,dword ptr ss:[ebp-74]
004025FE  |.  E8 09430100    call <jmp.&MFC42.#2514>                  ;  调用输入窗口
00402603  |.  83F8 01        cmp eax,1
00402606  |.  0F85 D5000000  jnz Urlegal.004026E1
0040260C  |.  E8 7FEEFFFF    call Urlegal.00401490
00402611  |.  8945 84        mov dword ptr ss:[ebp-7C],eax
00402614  |.  51             push ecx
00402615  |.  8BCC           mov ecx,esp
00402617  |.  8965 80        mov dword ptr ss:[ebp-80],esp
0040261A  |.  8D45 F0        lea eax,dword ptr ss:[ebp-10]
0040261D  |.  50             push eax
0040261E  |.  E8 71450100    call <jmp.&MFC42.#535>
00402623  |.  8985 78FFFFFF  mov dword ptr ss:[ebp-88],eax            ; |
00402629  |.  8D4D 88        lea ecx,dword ptr ss:[ebp-78]            ; |
0040262C  |.  51             push ecx                                 ; |Arg1
0040262D  |.  8B4D 84        mov ecx,dword ptr ss:[ebp-7C]            ; |
00402630  |.  81C1 D0000000  add ecx,0D0                              ; |
00402636  |.  E8 AE310000    call Urlegal.004057E9                    ; \提用户名
0040263B  |.  8985 74FFFFFF  mov dword ptr ss:[ebp-8C],eax            ;  堆栈出现真码
00402641  |.  C645 FC 01     mov byte ptr ss:[ebp-4],1
00402645  |.  8D4D 88        lea ecx,dword ptr ss:[ebp-78]
00402648  |.  E8 C3050000    call Urlegal.00402C10
0040264D  |.  85C0           test eax,eax
0040264F  |.  75 76          jnz short Urlegal.004026C7
00402651  |.  8D55 EC        lea edx,dword ptr ss:[ebp-14]
00402654  |.  52             push edx                                 ; /Arg2
00402655  |.  8D45 88        lea eax,dword ptr ss:[ebp-78]            ; |
00402658  |.  50             push eax                                 ; |Arg1
00402659  |.  E8 02060000    call Urlegal.00402C60                    ; \关键call
0040265E  |.  25 FF000000    and eax,0FF
00402663  |.  85C0           test eax,eax
00402665  |.  74 60          je short Urlegal.004026C7                ;  关键跳
00402667  |.  8D4D F0        lea ecx,dword ptr ss:[ebp-10]
0040266A  |.  E8 E1050000    call Urlegal.00402C50
0040266F  |.  50             push eax                                 ; /Arg3
00402670  |.  68 04E24100    push Urlegal.0041E204                    ; |name
00402675  |.  68 0CE24100    push Urlegal.0041E20C                    ; |user
0040267A  |.  8B4D 84        mov ecx,dword ptr ss:[ebp-7C]            ; |
0040267D  |.  81C1 C4000000  add ecx,0C4                              ; |
00402683  |.  E8 AD450000    call Urlegal.00406C35                    ; \Urlegal.00406C35
00402688  |.  8D4D EC        lea ecx,dword ptr ss:[ebp-14]
0040268B  |.  E8 C0050000    call Urlegal.00402C50
00402690  |.  50             push eax                                 ; /Arg3
00402691  |.  68 14E24100    push Urlegal.0041E214                    ; |code
00402696  |.  68 1CE24100    push Urlegal.0041E21C                    ; |user
0040269B  |.  8B4D 84        mov ecx,dword ptr ss:[ebp-7C]            ; |
0040269E  |.  81C1 C4000000  add ecx,0C4                              ; |
004026A4  |.  E8 8C450000    call Urlegal.00406C35                    ; \Urlegal.00406C35
004026A9  |.  8B4D 84        mov ecx,dword ptr ss:[ebp-7C]
004026AC  |.  81C1 D0000000  add ecx,0D0
004026B2  |.  E8 72170000    call Urlegal.00403E29
004026B7  |.  6A 00          push 0
004026B9  |.  6A 00          push 0
004026BB  |.  68 24E24100    push Urlegal.0041E224                    ;  thank you for registering!
004026C0  |.  E8 B1440100    call <jmp.&MFC42.#1200>
004026C5  |.  EB 0E          jmp short Urlegal.004026D5
004026C7  |>  6A 00          push 0
004026C9  |.  6A 00          push 0
004026CB  |.  68 40E24100    push Urlegal.0041E240                    ;  name / code mis-match. try again.
004026D0  |.  E8 A1440100    call <jmp.&MFC42.#1200>
004026D5  |>  C645 FC 00     mov byte ptr ss:[ebp-4],0
004026D9  |.  8D4D 88        lea ecx,dword ptr ss:[ebp-78]
004026DC  |.  E8 DF420100    call <jmp.&MFC42.#800>
004026E1  |>  C745 FC FFFFFF>mov dword ptr ss:[ebp-4],-1
004026E8  |.  8D4D 8C        lea ecx,dword ptr ss:[ebp-74]
004026EB  |.  E8 C0040000    call Urlegal.00402BB0
004026F0  |.  8B4D F4        mov ecx,dword ptr ss:[ebp-C]
004026F3  |.  64:890D 000000>mov dword ptr fs:[0],ecx
004026FA  |.  8BE5           mov esp,ebp
004026FC  |.  5D             pop ebp
004026FD  \.  C3             retn
------------------------------------------------------------------------------------------------------
00402659  |.  E8 02060000    call Urlegal.00402C60                    ; \关键call
进去后
00402C60  /$  55             push ebp
00402C61  |.  8BEC           mov ebp,esp
00402C63  |.  8B4D 0C        mov ecx,dword ptr ss:[ebp+C]
00402C66  |.  E8 E5FFFFFF    call Urlegal.00402C50                    ;  提假码
00402C6B  |.  50             push eax                                 ; /Arg1
00402C6C  |.  8B4D 08        mov ecx,dword ptr ss:[ebp+8]             ; |
00402C6F  |.  E8 0C000000    call Urlegal.00402C80                    ; \Urlegal.00402C80
00402C74  |.  F7D8           neg eax
00402C76  |.  1BC0           sbb eax,eax
00402C78  |.  40             inc eax
00402C79  |.  5D             pop ebp
00402C7A  \.  C2 0800        retn 8
------------------------------------------------------------------------------------------------------
00402C6F  |.  E8 0C000000    call Urlegal.00402C80                    ; \Urlegal.00402C80
进去后
00402C80  /$  55             push ebp
00402C81  |.  8BEC           mov ebp,esp
00402C83  |.  51             push ecx
00402C84  |.  894D FC        mov dword ptr ss:[ebp-4],ecx
00402C87  |.  8B45 08        mov eax,dword ptr ss:[ebp+8]             ;  将假码放入EAX
00402C8A  |.  50             push eax                                 ; /拿出真码
00402C8B  |.  8B4D FC        mov ecx,dword ptr ss:[ebp-4]             ; |
00402C8E  |.  8B11           mov edx,dword ptr ds:[ecx]               ; |真码放入EDX
00402C90  |.  52             push edx                                 ; |拿出假码
00402C91  |.  E8 0A000000    call Urlegal.00402CA0                    ; \比较CALL
00402C96  |.  83C4 08        add esp,8
00402C99  |.  8BE5           mov esp,ebp
00402C9B  |.  5D             pop ebp
00402C9C  \.  C2 0400        retn 4
------------------------------------------------------------------------------------------------------
00402C91  |.  E8 0A000000    call Urlegal.00402CA0                    ; \比较CALL
进去后
00402CA0  /$  55             push ebp
00402CA1  |.  8BEC           mov ebp,esp                              ;  这里不知道为什么,这程序又要提
00402CA3  |.  8B45 0C        mov eax,dword ptr ss:[ebp+C]             ;  再给一次假码
00402CA6  |.  50             push eax                                 ; /s2
00402CA7  |.  8B4D 08        mov ecx,dword ptr ss:[ebp+8]             ; |再提一次真码
00402CAA  |.  51             push ecx                                 ; |s1
00402CAB  |.  FF15 6C964100  call dword ptr ds:[<&MSVCRT._mbscmp>]    ; \_mbscmp
00402CB1  |.  83C4 08        add esp,8
00402CB4  |.  5D             pop ebp
00402CB5  \.  C3             retn
------------------------------------------------------------------------------------------------------
00402CAB  |.  FF15 6C964100  call dword ptr ds:[<&MSVCRT._mbscmp>]    ; \_mbscmp
进去后
77C01881 >  8BFF             mov edi,edi
77C01883    55               push ebp
77C01884    8BEC             mov ebp,esp
77C01886    56               push esi
77C01887    E8 99860000      call msvcrt.77C09F25
77C0188C    8B70 60          mov esi,dword ptr ds:[eax+60]
77C0188F    3B35 4425C377    cmp esi,dword ptr ds:[77C32544]
77C01895    74 07            je short msvcrt.77C0189E
77C01897    E8 91EDFFFF      call msvcrt.77C0062D
77C0189C    8BF0             mov esi,eax
77C0189E    837E 08 00       cmp dword ptr ds:[esi+8],0
77C018A2    75 2F            jnz short msvcrt.77C018D3
77C018A4    8B75 0C          mov esi,dword ptr ss:[ebp+C]
77C018A7    8B45 08          mov eax,dword ptr ss:[ebp+8]
77C018AA    8A10             mov dl,byte ptr ds:[eax]
77C018AC    8ACA             mov cl,dl
77C018AE    3A16             cmp dl,byte ptr ds:[esi]
77C018B0    75 1A            jnz short msvcrt.77C018CC
77C018B2    84C9             test cl,cl
77C018B4    74 12            je short msvcrt.77C018C8
77C018B6    8A50 01          mov dl,byte ptr ds:[eax+1]
77C018B9    8ACA             mov cl,dl
77C018BB    3A56 01          cmp dl,byte ptr ds:[esi+1]
77C018BE    75 0C            jnz short msvcrt.77C018CC
77C018C0    40               inc eax
77C018C1    40               inc eax
77C018C2    46               inc esi
77C018C3    46               inc esi
77C018C4    84C9             test cl,cl
77C018C6  ^ 75 E2            jnz short msvcrt.77C018AA
77C018C8    33C0             xor eax,eax
77C018CA    EB 68            jmp short msvcrt.77C01934
77C018CC    1BC0             sbb eax,eax
77C018CE    83D8 FF          sbb eax,-1
77C018D1    EB 61            jmp short msvcrt.77C01934
77C018D3    57               push edi
77C018D4    8B7D 0C          mov edi,dword ptr ss:[ebp+C]             ; 假码给EDI
77C018D7    53               push ebx
77C018D8    8B45 08          mov eax,dword ptr ss:[ebp+8]             ; 真码给EAX
77C018DB    66:0FB600        movzx ax,byte ptr ds:[eax]               ; 取真码第一位AX(经过循环后一直给到32位)
77C018DF    FF45 08          inc dword ptr ss:[ebp+8]
77C018E2    0FB6C8           movzx ecx,al                             ; 真码第一位给ECX(经过循环后一直给到32位)
77C018E5    F64431 1D 04     test byte ptr ds:[ecx+esi+1D],4
77C018EA    74 18            je short msvcrt.77C01904
77C018EC    8B4D 08          mov ecx,dword ptr ss:[ebp+8]
77C018EF    8A09             mov cl,byte ptr ds:[ecx]
77C018F1    84C9             test cl,cl
77C018F3    75 04            jnz short msvcrt.77C018F9
77C018F5    33C0             xor eax,eax
77C018F7    EB 0B            jmp short msvcrt.77C01904
77C018F9    33D2             xor edx,edx
77C018FB    FF45 08          inc dword ptr ss:[ebp+8]
77C018FE    8AF0             mov dh,al
77C01900    8AD1             mov dl,cl
77C01902    8BC2             mov eax,edx
77C01904    66:0FB60F        movzx cx,byte ptr ds:[edi]               ; 假码第一位给cx(经过循环后一直给到32位)
77C01908    0FB6D1           movzx edx,cl                             ; 假码第一位给EDX(经过循环后一直给到32位)
77C0190B    47               inc edi
77C0190C    F64432 1D 04     test byte ptr ds:[edx+esi+1D],4
77C01911    74 13            je short msvcrt.77C01926
77C01913    8A17             mov dl,byte ptr ds:[edi]
77C01915    84D2             test dl,dl
77C01917    75 04            jnz short msvcrt.77C0191D
77C01919    33C9             xor ecx,ecx
77C0191B    EB 09            jmp short msvcrt.77C01926
77C0191D    33DB             xor ebx,ebx
77C0191F    8AF9             mov bh,cl
77C01921    47               inc edi
77C01922    8ADA             mov bl,dl
77C01924    8BCB             mov ecx,ebx
77C01926    66:3BC8          cmp cx,ax                                ; 比较真码与假码第一位(经过循环后一直比较到32位)
77C01929    75 0C            jnz short msvcrt.77C01937                ; 不对就下出去
77C0192B    66:85C0          test ax,ax
77C0192E  ^ 75 A8            jnz short msvcrt.77C018D8                ; 循环比较1-32位真假码
77C01930    33C0             xor eax,eax                              ; 关键赋值语句
77C01932    5B               pop ebx
77C01933    5F               pop edi
77C01934    5E               pop esi
77C01935    5D               pop ebp
77C01936    C3               retn

最重要的是最后的循环,这个循环保证能将32位真码和假码比较完,然后最重要的“xor eax,eax”赋值语句能加上。


最后注册码大家应该知道怎么找了吧?


免费评分

参与人数 1热心值 +1 收起 理由
2390058 + 1 我很赞同!

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

 楼主| xhs123456xhs 发表于 2014-3-19 22:22

不好意思,第一次发密码分析帖子,不知道那个排版按键是哪一个,知道的朋友麻烦告诉我下。
 楼主| xhs123456xhs 发表于 2014-3-19 22:20
如果大家觉得不错,我会陆续更新出天草后面每一课程序的密码分析。
唐伯虎 发表于 2014-3-19 22:21
2390058 发表于 2014-3-19 23:08
支持下大大。。。。厉害
sugie0708 发表于 2014-3-19 23:26
厉害,真牛。。。
胖子阿桂 发表于 2014-3-20 11:18
看了还是不懂   看来还是基础不够啊   继续学习
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-4-30 00:35

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表