能力值:
( LV2,RANK:10 )
|
-
-
19 楼
我也是个初学者,学习中,努力看了几天,解不开算法,在复杂了,只能暴力破解,郁闷,这是也谈一下过程.
首先是找关键地址,拦截各种函数都没有效,最后对callwindowproc下断条件断点,拦截wm_gettext消息,
可以得到取取处理用户名和注册码的位置,分别是
004509F0 . 8B45 CC mov eax, dword ptr ss:[ebp-34] //用户名传eax
00450A59 . 8B45 BC mov eax, dword ptr ss:[ebp-44] //注册码传eax
对用户名的处理如下
004509D5 . 8D45 C8 lea eax, dword ptr ss:[ebp-38]
004509D8 . BA 700C4500 mov edx, 千帆.00450C70 ; sunzones
004509DD . E8 D234FBFF call 千帆.00403EB4//通过字符串sunzones处理产生一个4k的表格
004509E2 . C745 D8 00000>mov dword ptr ss:[ebp-28], 0
004509E9 . C745 DC 00000>mov dword ptr ss:[ebp-24], 0
004509F0 . 8B45 CC mov eax, dword ptr ss:[ebp-34]
004509F3 . E8 E436FBFF call 千帆.004040DC
004509F8 . 8BD8 mov ebx, eax
004509FA . 85DB test ebx, ebx
004509FC . 7E 20 jle short 千帆.00450A1E
004509FE . B9 01000000 mov ecx, 1
00450A03 > 8B45 CC mov eax, dword ptr ss:[ebp-34]
00450A06 . 0FB64408 FF movzx eax, byte ptr ds:[eax+ecx-1]
00450A0B . F7E9 imul ecx
00450A0D . 99 cdq
00450A0E . 0345 D8 add eax, dword ptr ss:[ebp-28]
00450A11 . 1355 DC adc edx, dword ptr ss:[ebp-24]
00450A14 . 8945 D8 mov dword ptr ss:[ebp-28], eax
00450A17 . 8955 DC mov dword ptr ss:[ebp-24], edx
00450A1A . 41 inc ecx
00450A1B . 4B dec ebx
00450A1C .^ 75 E5 jnz short 千帆.00450A03//对输入的用户第一次处理存入[ebp-28]和[ebp-24]
00450A1E > 8B45 C8 mov eax, dword ptr ss:[ebp-38]
00450A21 . E8 2AFBFFFF call 千帆.00450550
00450A26 . FF75 DC push dword ptr ss:[ebp-24] ; /Arg2
00450A29 . FF75 D8 push dword ptr ss:[ebp-28] ; |Arg1
00450A2C . E8 E3F9FFFF call 千帆.00450414 ; \千帆.00450414
00450A31 . FF75 DC push dword ptr ss:[ebp-24] ; /Arg2
00450A34 . FF75 D8 push dword ptr ss:[ebp-28] ; |Arg1
00450A37 . E8 D8F9FFFF call 千帆.00450414 ; \千帆.00450414
//以上根据产生的4k的表格和[ebp-28]和[ebp-24]产生两个值放入eax,edx
00450A3C . 8905 245C4500 mov dword ptr ds:[455C24], eax
00450A42 . 8915 285C4500 mov dword ptr ds:[455C28], edx
//两个值存入455c24和455c28
对注册码的处理如下
00450A59 . 8B45 BC mov eax, dword ptr ss:[ebp-44]
00450A5C . E8 7B36FBFF call 千帆.004040DC
00450A61 . 83F8 13 cmp eax, 13//长度必需为19位
00450A64 . 0F85 AD010000 jnz 千帆.00450C17
00450A6A . 8D55 D4 lea edx, dword ptr ss:[ebp-2C]
00450A6D . 8B45 FC mov eax, dword ptr ss:[ebp-4]
00450A70 . 8B80 FC020000 mov eax, dword ptr ds:[eax+2FC]
00450A76 . E8 9DECFDFF call 千帆.0042F718
00450A7B . 8D45 D0 lea eax, dword ptr ss:[ebp-30]
00450A7E . E8 9933FBFF call 千帆.00403E1C
00450A83 . BB 01000000 mov ebx, 1
00450A88 > 8D45 B8 lea eax, dword ptr ss:[ebp-48]
00450A8B . 8B55 D4 mov edx, dword ptr ss:[ebp-2C]
00450A8E . 8A541A FF mov dl, byte ptr ds:[edx+ebx-1]
00450A92 . E8 6D35FBFF call 千帆.00404004
00450A97 . 8B55 B8 mov edx, dword ptr ss:[ebp-48]
00450A9A . 8D45 D0 lea eax, dword ptr ss:[ebp-30]
00450A9D . E8 4236FBFF call 千帆.004040E4
00450AA2 . 43 inc ebx
00450AA3 . 83FB 05 cmp ebx, 5
00450AA6 .^ 75 E0 jnz short 千帆.00450A88
00450AA8 . BB 06000000 mov ebx, 6
00450AAD > 8D45 B4 lea eax, dword ptr ss:[ebp-4C]
00450AB0 . 8B55 D4 mov edx, dword ptr ss:[ebp-2C]
00450AB3 . 8A541A FF mov dl, byte ptr ds:[edx+ebx-1]
00450AB7 . E8 4835FBFF call 千帆.00404004
00450ABC . 8B55 B4 mov edx, dword ptr ss:[ebp-4C]
00450ABF . 8D45 D0 lea eax, dword ptr ss:[ebp-30]
00450AC2 . E8 1D36FBFF call 千帆.004040E4
00450AC7 . 43 inc ebx
00450AC8 . 83FB 0A cmp ebx, 0A
00450ACB .^ 75 E0 jnz short 千帆.00450AAD
00450ACD . BB 0B000000 mov ebx, 0B
00450AD2 > 8D45 B0 lea eax, dword ptr ss:[ebp-50]
00450AD5 . 8B55 D4 mov edx, dword ptr ss:[ebp-2C]
00450AD8 . 8A541A FF mov dl, byte ptr ds:[edx+ebx-1]
00450ADC . E8 2335FBFF call 千帆.00404004
00450AE1 . 8B55 B0 mov edx, dword ptr ss:[ebp-50]
00450AE4 . 8D45 D0 lea eax, dword ptr ss:[ebp-30]
00450AE7 . E8 F835FBFF call 千帆.004040E4
00450AEC . 43 inc ebx
00450AED . 83FB 0F cmp ebx, 0F
00450AF0 .^ 75 E0 jnz short 千帆.00450AD2
00450AF2 . BB 10000000 mov ebx, 10
00450AF7 > 8D45 AC lea eax, dword ptr ss:[ebp-54]
00450AFA . 8B55 D4 mov edx, dword ptr ss:[ebp-2C]
00450AFD . 8A541A FF mov dl, byte ptr ds:[edx+ebx-1]
00450B01 . E8 FE34FBFF call 千帆.00404004
00450B06 . 8B55 AC mov edx, dword ptr ss:[ebp-54]
00450B09 . 8D45 D0 lea eax, dword ptr ss:[ebp-30]
00450B0C . E8 D335FBFF call 千帆.004040E4
00450B11 . 43 inc ebx
00450B12 . 83FB 14 cmp ebx, 14
00450B15 .^ 75 E0 jnz short 千帆.00450AF7
00450B17 . 33C0 xor eax, eax
00450B19 . 55 push ebp
00450B1A . 68 F80B4500 push 千帆.00450BF8
00450B1F . 64:FF30 push dword ptr fs:[eax]
00450B22 . 64:8920 mov dword ptr fs:[eax], esp
00450B25 . 8D45 A8 lea eax, dword ptr ss:[ebp-58]
00450B28 . 8B4D D0 mov ecx, dword ptr ss:[ebp-30]
00450B2B . BA 840C4500 mov edx, 千帆.00450C84 ; $
00450B30 . E8 F335FBFF call 千帆.00404128
00450B35 . 8B45 A8 mov eax, dword ptr ss:[ebp-58]
00450B38 . E8 7374FBFF call 千帆.00407FB0
00450B3D . 8945 F0 mov dword ptr ss:[ebp-10], eax
00450B40 . 8955 F4 mov dword ptr ss:[ebp-C], edx
//以上对注册码处理,注册码为xxxx?xxxx?xxxx?xxxx的形式,?可以是任何字符,xxxx必须是0-9a-f,这样
//可以刚好把16个x字符转成两个十六进制数放入eax和edx
00450B43 . B8 700C4500 mov eax, 千帆.00450C70 ; sunzones
00450B48 . E8 03FAFFFF call 千帆.00450550 //产生4k表格
00450B4D . FF75 F4 push dword ptr ss:[ebp-C] ; /Arg2
00450B50 . FF75 F0 push dword ptr ss:[ebp-10] ; |Arg1
00450B53 . E8 20F8FFFF call 千帆.00450378 ; \千帆.00450378
//两个值和表格中数据计算出两个值在eax和edx中
00450B58 . 8945 E8 mov dword ptr ss:[ebp-18], eax
00450B5B . 8955 EC mov dword ptr ss:[ebp-14], edx
00450B5E . 33C0 xor eax, eax
00450B60 . 55 push ebp
00450B61 . 68 D10B4500 push 千帆.00450BD1
00450B66 . 64:FF30 push dword ptr fs:[eax]
00450B69 . 64:8920 mov dword ptr fs:[eax], esp
00450B6C . 8B45 E8 mov eax, dword ptr ss:[ebp-18]
00450B6F . 8B55 EC mov edx, dword ptr ss:[ebp-14]
00450B72 . 2B05 245C4500 sub eax, dword ptr ds:[455C24]
00450B78 . 1B15 285C4500 sbb edx, dword ptr ds:[455C28]//以上把用户算出的值个注册码算出的值相减
00450B7E . 8945 E0 mov dword ptr ss:[ebp-20], eax
00450B81 . 8955 E4 mov dword ptr ss:[ebp-1C], edx
00450B84 . DF6D E0 fild qword ptr ss:[ebp-20]//减出的数当成浮点数
00450B87 . D83D 880C4500 fdivr dword ptr ds:[450C88]
//用1.0除以前一浮点数,如果前一浮点数为0,则产生除零异常,参考00450b61,这样新建一个seh链,异常了就跳向
//00450bd1
00450B8D . DD5D C0 fstp qword ptr ss:[ebp-40]
00450B90 . 9B wait
00450B91 . DD45 C0 fld qword ptr ss:[ebp-40]
00450B94 . 83C4 F4 add esp, -0C
00450B97 . DB3C24 fstp tbyte ptr ss:[esp] ; |
00450B9A . 9B wait ; |
00450B9B 8D45 A4 lea eax, dword ptr ss:[ebp-5C] ; |
//此时注册成功
00450BD1 .^\E9 9629FBFF jmp 千帆.0040356C
00450BD6 . 8B45 FC mov eax, dword ptr ss:[ebp-4]
00450BD9 . 8B80 14030000 mov eax, dword ptr ds:[eax+314]
00450BDF . BA C00C4500 mov edx, 千帆.00450CC0 ; 提 示: 输入的注册码正确
00450BE4 . E8 5FEBFDFF call 千帆.0042F748
00450BE9 . E8 E62CFBFF call 千帆.004038D4
之所难以破解的原因因为4k的表太复杂,只能高手来了,脉络清楚了,爆破就容易,不再赘叙
|