【文章标题】: 文件夹看门狗2.1算法分析
【文章作者】: KuNgBiM
【作者邮箱】: kungbim@163.com
【作者主页】: http://www.crkcn.com
【软件名称】: 文件夹看门狗2.1
【软件大小】: 111KB
【下载地址】: 附件下载
【加壳方式】: N/A
【保护方式】: 序列号
【编写语言】: Microsoft Visual C++ 6.0
【使用工具】: OD
【操作平台】: 盗版XPsp2
【软件介绍】: 适于安装Windows系统的计算机中◇本机硬盘◇和◇移动存储器◇中文件夹加密。
【作者声明】: 只是感兴趣,没有其他目的。失误之处敬请诸位大侠赐教!
--------------------------------------------------------------------------------
【详细过程】
机器码:1EY9ZNEVIJKLMNOPQRST
试炼码:1234567890ABCDEFGHIJ
字符串插件找到“文件夹看门狗(未注册)”
在0040559B处设断后,F9运行,中途设置忽略异常访问断点:
添加最近异常:C0000008 (INVALID HANDLE)
继续F9直至中断于断点处:
00405599 . 8BCE mov ecx, esi
0040559B . E8 88180000 call 00406E28 ; ★算法CALL,运行中断后跟进★
004055A0 . 85C0 test eax, eax
004055A2 . 74 0C je short 004055B0
004055A4 . 8325 24744300 00 and dword ptr [437424], 0
004055AB . 6A 01 push 1
004055AD . 5F pop edi
004055AE . EB 6D jmp short 0040561D
004055B0 > 6A 01 push 1
004055B2 . 8D4D EC lea ecx, dword ptr [ebp-14]
004055B5 . 5F pop edi
004055B6 . 68 B0784300 push 004378B0 ; 文件夹看门狗(未注册)
004055BB . 893D 24744300 mov dword ptr [437424], edi
跟进0040559B:
00406E28 /$ 55 push ebp ; 算法开始
00406E29 |. 8BEC mov ebp, esp
00406E2B |. 83EC 70 sub esp, 70
00406E2E |. 8B0D 8C9E4300 mov ecx, dword ptr [439E8C] ; 取机器码,ASCII "1EY9ZNEVIJKLMNOPQRST"
00406E34 |. 53 push ebx
00406E35 |. 56 push esi
00406E36 |. 8D45 E8 lea eax, dword ptr [ebp-18]
00406E39 |. 33F6 xor esi, esi
00406E3B |. 57 push edi
00406E3C |. 2BC8 sub ecx, eax
00406E3E |> 8D4435 E8 /lea eax, dword ptr [ebp+esi-18] ; 验证机器码是否正确
00406E42 |. 46 |inc esi
00406E43 |. 83FE 14 |cmp esi, 14 ; 是否为20位
00406E46 |. 8A1401 |mov dl, byte ptr [ecx+eax]
00406E49 |. 8810 |mov byte ptr [eax], dl
00406E4B |.^ 7C F1 \jl short 00406E3E ; 循环20次
00406E4D |. 8D45 90 lea eax, dword ptr [ebp-70]
00406E50 |. 50 push eax
00406E51 |. E8 B1B9FFFF call 00402807
00406E56 |. 8D45 E8 lea eax, dword ptr [ebp-18]
00406E59 |. 6A 14 push 14
00406E5B |. 50 push eax
00406E5C |. 8D45 90 lea eax, dword ptr [ebp-70]
00406E5F |. 50 push eax
00406E60 |. E8 CAB9FFFF call 0040282F
00406E65 |. 8D45 90 lea eax, dword ptr [ebp-70]
00406E68 |. 50 push eax
00406E69 |. 8D45 FC lea eax, dword ptr [ebp-4]
00406E6C |. 50 push eax
00406E6D |. E8 00C1FFFF call 00402F72 ; ★校验码算法CALL★(MD5)
00406E72 |. 8B45 FC mov eax, dword ptr [ebp-4] ; 校验码,ASCII "e88fb8c0a16817cc610f8db7b6843212"
00406E75 |. 8B75 08 mov esi, dword ptr [ebp+8] ; 试炼码,ASCII "1234567890ABCDEFGHIJ"
00406E78 |. 83C4 18 add esp, 18
00406E7B |. 8A48 03 mov cl, byte ptr [eax+3] ; 取第[EAX+3]位校验码的ASCII值|EAX初始值为1
00406E7E |. 880D 28744300 mov byte ptr [437428], cl
00406E84 |. 8A50 07 mov dl, byte ptr [eax+7] ; 取第[EAX+7]位校验码的ASCII值
00406E87 |. 8815 29744300 mov byte ptr [437429], dl
00406E8D |. 8A58 0F mov bl, byte ptr [eax+F] ; 取第[EAX+F]位校验码的ASCII值
00406E90 |. 881D A4784300 mov byte ptr [4378A4], bl
00406E96 |. 8A40 1F mov al, byte ptr [eax+1F] ; 取第[EAX+1F]位校验码的ASCII值
00406E99 |. A2 A5784300 mov byte ptr [4378A5], al
00406E9E |. 0FBE7E 10 movsx edi, byte ptr [esi+10] ; 取第[ESI+10]位上的试炼码|ESI初始值为1
00406EA2 |. 0FB6C9 movzx ecx, cl
00406EA5 |. 3BCF cmp ecx, edi ; 试炼码第[ESI+10]位的值要等于校验码第[EAX+3]位的值
00406EA7 |. 75 26 jnz short 00406ECF ; 跳则GAME OVER
00406EA9 |. 0FBE4E 11 movsx ecx, byte ptr [esi+11] ; 取第[ESI+11]位上的试炼码
00406EAD |. 0FB6D2 movzx edx, dl
00406EB0 |. 3BD1 cmp edx, ecx ; 试炼码第[ESI+11]位的值要等于校验码第[EAX+7]位的值
00406EB2 |. 75 1B jnz short 00406ECF ; 跳则GAME OVER
00406EB4 |. 0FBE4E 12 movsx ecx, byte ptr [esi+12] ; 取第[ESI+12]位上的试炼码
00406EB8 |. 0FB6D3 movzx edx, bl
00406EBB |. 3BD1 cmp edx, ecx ; 试炼码第[ESI+12]位的值要等于校验码第[EAX+F]位的值
00406EBD |. 75 10 jnz short 00406ECF ; 跳则GAME OVER
00406EBF |. 0FBE4E 13 movsx ecx, byte ptr [esi+13] ; 取第[ESI+13]位上的试炼码
00406EC3 |. 0FB6C0 movzx eax, al
00406EC6 |. 3BC1 cmp eax, ecx ; 试炼码第[ESI+13]位的值要等于校验码第[EAX+1F]位的值
00406EC8 |. 75 05 jnz short 00406ECF ; 跳则GAME OVER
00406ECA |. 6A 01 push 1
00406ECC |. 5E pop esi
00406ECD |. EB 02 jmp short 00406ED1
00406ECF |> 33F6 xor esi, esi
00406ED1 |> 8D4D FC lea ecx, dword ptr [ebp-4]
00406ED4 |. E8 9EBA0100 call 00422977
00406ED9 |. 8BC6 mov eax, esi
00406EDB |. 5F pop edi
00406EDC |. 5E pop esi
00406EDD |. 5B pop ebx
00406EDE |. C9 leave
00406EDF \. C2 0400 retn 4 ; 返回程序
跟进00406E6D:
00402F72 /$ B8 6BA44200 mov eax, 0042A46B ; 标准的MD5加密运算
00402F77 |. E8 2CC10000 call 0040F0A8
00402F7C |. 83EC 1C sub esp, 1C
00402F7F |. 53 push ebx
00402F80 |. 56 push esi
00402F81 |. FF75 0C push dword ptr [ebp+C]
00402F84 |. 33F6 xor esi, esi
00402F86 |. 8975 E8 mov dword ptr [ebp-18], esi
00402F89 |. E8 28F9FFFF call 004028B6
00402F8E |. 6A 10 push 10
00402F90 |. 8D45 D8 lea eax, dword ptr [ebp-28]
00402F93 |. FF75 0C push dword ptr [ebp+C]
00402F96 |. 50 push eax
00402F97 |. E8 B6000000 call 00403052
00402F9C |. A1 C07C4300 mov eax, dword ptr [437CC0]
00402FA1 |. 83C4 10 add esp, 10
00402FA4 |. 8945 F0 mov dword ptr [ebp-10], eax
00402FA7 |. 6A 01 push 1
00402FA9 |. 5B pop ebx
00402FAA |. 895D FC mov dword ptr [ebp-4], ebx
00402FAD |> A1 C07C4300 /mov eax, dword ptr [437CC0]
00402FB2 |. 8945 0C |mov dword ptr [ebp+C], eax
00402FB5 |. 8A4435 D8 |mov al, byte ptr [ebp+esi-28]
00402FB9 |. C645 FC 02 |mov byte ptr [ebp-4], 2
00402FBD |. 84C0 |test al, al
00402FBF |. 75 28 |jnz short 00402FE9
00402FC1 |. 68 4C724300 |push 0043724C ; 00
00402FC6 |. 8D4D EC |lea ecx, dword ptr [ebp-14]
00402FC9 |. E8 17FA0100 |call 004229E5
00402FCE |. 50 |push eax
00402FCF |. 8D4D 0C |lea ecx, dword ptr [ebp+C]
00402FD2 |. C645 FC 03 |mov byte ptr [ebp-4], 3
00402FD6 |. E8 D5FA0100 |call 00422AB0
00402FDB |. 8D4D EC |lea ecx, dword ptr [ebp-14]
00402FDE |. C645 FC 02 |mov byte ptr [ebp-4], 2
00402FE2 |. E8 90F90100 |call 00422977
00402FE7 |. EB 20 |jmp short 00403009
00402FE9 |> 3C 0F |cmp al, 0F
00402FEB |. 0FB6C0 |movzx eax, al
00402FEE |. 50 |push eax
00402FEF |. 77 07 |ja short 00402FF8
00402FF1 |. 68 48724300 |push 00437248 ; 0%x
00402FF6 |. EB 05 |jmp short 00402FFD
00402FF8 |> 68 44724300 |push 00437244 ; %x
00402FFD |> 8D45 0C |lea eax, dword ptr [ebp+C]
00403000 |. 50 |push eax
00403001 |. E8 BBA90100 |call 0041D9C1
00403006 |. 83C4 0C |add esp, 0C
00403009 |> 8D45 0C |lea eax, dword ptr [ebp+C]
0040300C |. 8D4D F0 |lea ecx, dword ptr [ebp-10]
0040300F |. 50 |push eax
00403010 |. E8 65FD0100 |call 00422D7A
00403015 |. 8D4D 0C |lea ecx, dword ptr [ebp+C]
00403018 |. 885D FC |mov byte ptr [ebp-4], bl
0040301B |. E8 57F90100 |call 00422977
00403020 |. 46 |inc esi
00403021 |. 83FE 10 |cmp esi, 10
00403024 |.^ 7C 87 \jl short 00402FAD
00403026 |. 8B4D 08 mov ecx, dword ptr [ebp+8]
00403029 |. 8D45 F0 lea eax, dword ptr [ebp-10]
0040302C |. 50 push eax
0040302D |. E8 BAF60100 call 004226EC
00403032 |. 895D E8 mov dword ptr [ebp-18], ebx
00403035 |. 8065 FC 00 and byte ptr [ebp-4], 0
00403039 |. 8D4D F0 lea ecx, dword ptr [ebp-10]
0040303C |. E8 36F90100 call 00422977
00403041 |. 8B4D F4 mov ecx, dword ptr [ebp-C]
00403044 |. 8B45 08 mov eax, dword ptr [ebp+8]
00403047 |. 5E pop esi
00403048 |. 5B pop ebx
00403049 |. 64:890D 00000000 mov dword ptr fs:[0], ecx
00403050 |. C9 leave
00403051 \. C3 retn ; 返回结果
--------------------------------------------------------------------------------
【注册机源码】
============ 以下程序在盗版XPsp2、VB6.0下编译测试通过 ============
Private Sub Text1_Change()
Dim crc, key1, key2, key3, key4 As String
KuNgBiM = "CRACKEDBYKUNGBIM"
If Len(Text1.Text) > 20 Then
Text2.Text = "Machine code invalid!"
Else
If Len(Text1.Text) = 20 Then
Set DCTeam = New clsMD5
crc = DCTeam.Md5_String_Calc(Text1.Text)
key1 = Mid(crc, 4, 1)
key2 = Mid(crc, 8, 1)
key3 = Mid(crc, 16, 1)
key4 = Mid(crc, 32, 1)
Text2.Text = KuNgBiM & LCase(key1 & key2 & key3 & key4)
Else
End If
End If
End Sub
--------------------------------------------------------------------------------
【版权声明】: 本文原创于看雪技术论坛, 转载请注明作者并保持文章的完整, 谢谢!
2007年03月12日 AM 06:10:29
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!