说明:今天没有事情下载了一个CrackMe练习一下,文件是VB做的,由于在学校的图书馆,没有工具,就只能用
OD了,如果有兴趣的话,用SMARTCHECK应该更容易,我自己认为用OD调试Vb程序不容易啊!!!!
00451E16 . FF15 28104000 call [<&MSVBVM60.__vbaObjSet>] ; MSVBVM60.__vbaObjSet
00451E1C . 8BF8 mov edi, eax
00451E1E . 8D55 BC lea edx, [ebp-44]
00451E21 . 52 push edx
00451E22 . 57 push edi
00451E23 . 8B0F mov ecx, [edi]
00451E25 . FF91 A0000000 call [ecx+A0]
00451E2B . 3BC6 cmp eax, esi
00451E2D . DBE2 fclex
00451E2F . 7D 12 jge short 00451E43
00451E31 . 68 A0000000 push 0A0
00451E36 . 68 F4194500 push 004519F4
00451E3B . 57 push edi
00451E3C . 50 push eax
00451E3D . FF15 20104000 call [<&MSVBVM60.__vbaHresultCheckObj>; MSVBVM60.__vbaHresultCheckObj
00451E43 > 8B55 BC mov edx, [ebp-44] ; 去取用户名
00451E46 . 8B3D 9C104000 mov edi, [<&MSVBVM60.__vbaStrMove>] ; MSVBVM60.__vbaStrMove
00451E4C . 8D4D E4 lea ecx, [ebp-1C]
00451E4F . 8975 BC mov [ebp-44], esi
00451E52 . FFD7 call edi ; <&MSVBVM60.__vbaStrMove>
00451E54 . 8D4D B8 lea ecx, [ebp-48]
00451E57 . FF15 B0104000 call [<&MSVBVM60.__vbaFreeObj>] ; MSVBVM60.__vbaFreeObj
00451E5D . 8D8D 68FFFFFF lea ecx, [ebp-98]
00451E63 . 6A 01 push 1
00451E65 . 8D55 A8 lea edx, [ebp-58]
00451E68 . 8D45 E4 lea eax, [ebp-1C]
00451E6B . 51 push ecx
00451E6C . 52 push edx
00451E6D . 8985 70FFFFFF mov [ebp-90], eax
00451E73 . C785 68FFFFFF>mov dword ptr [ebp-98], 4008
00451E7D . FF15 94104000 call [<&MSVBVM60.#617>] ; MSVBVM60.rtcLeftCharVar
00451E83 . 8B35 0C104000 mov esi, [<&MSVBVM60.__vbaStrVarMove>; MSVBVM60.__vbaStrVarMove
00451E89 . 8D45 A8 lea eax, [ebp-58]
00451E8C . 50 push eax
00451E8D . FFD6 call esi ; <&MSVBVM60.__vbaStrVarMove>
00451E8F . 8BD0 mov edx, eax
00451E91 . 8D4D D4 lea ecx, [ebp-2C]
00451E94 . FFD7 call edi
00451E96 . 8D4D A8 lea ecx, [ebp-58]
00451E99 . FF15 08104000 call [<&MSVBVM60.__vbaFreeVar>] ; MSVBVM60.__vbaFreeVar
00451E9F . 8D95 68FFFFFF lea edx, [ebp-98]
00451EA5 . 6A 01 push 1
00451EA7 . 8D45 A8 lea eax, [ebp-58]
00451EAA . 8D4D E4 lea ecx, [ebp-1C]
00451EAD . 52 push edx
00451EAE . 50 push eax
00451EAF . 898D 70FFFFFF mov [ebp-90], ecx
00451EB5 . C785 68FFFFFF>mov dword ptr [ebp-98], 4008
00451EBF . FF15 A0104000 call [<&MSVBVM60.#619>] ; MSVBVM60.rtcRightCharVar
00451EC5 . 8D4D A8 lea ecx, [ebp-58]
00451EC8 . 51 push ecx
00451EC9 . FFD6 call esi
00451ECB . 8BD0 mov edx, eax
00451ECD . 8D4D E8 lea ecx, [ebp-18]
00451ED0 . FFD7 call edi
00451ED2 . 8D4D A8 lea ecx, [ebp-58]
00451ED5 . FF15 08104000 call [<&MSVBVM60.__vbaFreeVar>] ; MSVBVM60.__vbaFreeVar
00451EDB . 8D55 E4 lea edx, [ebp-1C]
00451EDE . 8D45 A8 lea eax, [ebp-58]
00451EE1 . 8995 70FFFFFF mov [ebp-90], edx
00451EE7 . 50 push eax
00451EE8 . 8D8D 68FFFFFF lea ecx, [ebp-98]
00451EEE . 6A 03 push 3
00451EF0 . 8D55 98 lea edx, [ebp-68]
00451EF3 . 51 push ecx
00451EF4 . 52 push edx
00451EF5 . C745 B0 01000>mov dword ptr [ebp-50], 1
00451EFC . C745 A8 02000>mov dword ptr [ebp-58], 2
00451F03 . C785 68FFFFFF>mov dword ptr [ebp-98], 4008
00451F0D . FF15 3C104000 call [<&MSVBVM60.#632>] ; MSVBVM60.rtcMidCharVar
00451F13 . 8D45 98 lea eax, [ebp-68]
00451F16 . 50 push eax
00451F17 . FFD6 call esi
00451F19 . 8BD0 mov edx, eax
00451F1B . 8D4D DC lea ecx, [ebp-24]
00451F1E . FFD7 call edi
00451F20 . 8D4D 98 lea ecx, [ebp-68]
00451F23 . 8D55 A8 lea edx, [ebp-58]
00451F26 . 51 push ecx
00451F27 . 52 push edx
00451F28 . 6A 02 push 2
00451F2A . FF15 10104000 call [<&MSVBVM60.__vbaFreeVarList>] ; MSVBVM60.__vbaFreeVarList
00451F30 . 8B45 D4 mov eax, [ebp-2C]
00451F33 . 8B35 18104000 mov esi, [<&MSVBVM60.#516>] ; MSVBVM60.rtcAnsiValueBstr
00451F39 . 83C4 0C add esp, 0C
00451F3C . 50 push eax ; 用户名的第一位的ASCII码
00451F3D . FFD6 call esi ; <&MSVBVM60.#516>
00451F3F . 8B4D E8 mov ecx, [ebp-18]
00451F42 . 8945 E0 mov [ebp-20], eax
00451F45 . 51 push ecx
00451F46 . FFD6 call esi
00451F48 . 8B55 DC mov edx, [ebp-24] ; 用户名的第三位
00451F4B . 8BF0 mov esi, eax
00451F4D . 52 push edx
00451F4E . FF15 18104000 call [<&MSVBVM60.#516>] ; MSVBVM60.rtcAnsiValueBstr
00451F54 . 66:0FAF75 E0 imul si, [ebp-20] ; 用户名的第一位与第三位相乘
00451F59 . 0F80 FE020000 jo 0045225D
00451F5F . 0FBFCE movsx ecx, si
00451F62 . 898D 1CFFFFFF mov [ebp-E4], ecx ; 保存上面的乘积
00451F68 . DB85 1CFFFFFF fild dword ptr [ebp-E4] ; 加载到浮点运算寄存器中
00451F6E . 0FBFD0 movsx edx, ax ; 用户名的第三位
00451F71 . DD9D 14FFFFFF fstp qword ptr [ebp-EC] ; 保存上面的寄存器内容5300
00451F77 . 8995 10FFFFFF mov [ebp-F0], edx
00451F7D . DB85 10FFFFFF fild dword ptr [ebp-F0] ; 加载第三位到浮点运算寄存器
00451F83 . DD9D 08FFFFFF fstp qword ptr [ebp-F8]
00451F89 . DD85 14FFFFFF fld qword ptr [ebp-EC]
00451F8F . 833D 00304500>cmp dword ptr [453000], 0
00451F96 . 75 08 jnz short 00451FA0
00451F98 . DCB5 08FFFFFF fdiv qword ptr [ebp-F8] ; 上面的两个内容相除
00451F9E . EB 11 jmp short 00451FB1
00451FA0 > FFB5 0CFFFFFF push dword ptr [ebp-F4]
00451FA6 . FFB5 08FFFFFF push dword ptr [ebp-F8]
00451FAC . E8 43F1FAFF call <jmp.&MSVBVM60._adj_fdiv_m64>
00451FB1 > DD5D C8 fstp qword ptr [ebp-38] ; 保存
00451FB4 . DFE0 fstsw ax
00451FB6 . A8 0D test al, 0D
00451FB8 . 0F85 9A020000 jnz 00452258
00451FBE . 8B4D C8 mov ecx, [ebp-38]
00451FC1 . 8B45 CC mov eax, [ebp-34]
00451FC4 . 50 push eax
00451FC5 . 51 push ecx
00451FC6 . FF15 50104000 call [<&MSVBVM60.__vbaStrR8>] ; MSVBVM60.__vbaStrR8
00451FCC . 8BD0 mov edx, eax
00451FCE . 8D4D D0 lea ecx, [ebp-30]
00451FD1 . FFD7 call edi
00451FD3 . 8B13 mov edx, [ebx]
00451FD5 . 53 push ebx
00451FD6 . FF92 00030000 call [edx+300]
00451FDC . 50 push eax
00451FDD . 8D45 B8 lea eax, [ebp-48]
00451FE0 . 50 push eax
00451FE1 . FF15 28104000 call [<&MSVBVM60.__vbaObjSet>] ; MSVBVM60.__vbaObjSet
00451FE7 . 8BF0 mov esi, eax
00451FE9 . 8D55 BC lea edx, [ebp-44]
00451FEC . 52 push edx
00451FED . 56 push esi
00451FEE . 8B0E mov ecx, [esi]
00451FF0 . FF91 A0000000 call [ecx+A0]
00451FF6 . 85C0 test eax, eax
00451FF8 . DBE2 fclex
00451FFA . 7D 12 jge short 0045200E
00451FFC . 68 A0000000 push 0A0
00452001 . 68 F4194500 push 004519F4
00452006 . 56 push esi
00452007 . 50 push eax
00452008 . FF15 20104000 call [<&MSVBVM60.__vbaHresultCheckObj>; MSVBVM60.__vbaHresultCheckObj
0045200E > 8B45 D0 mov eax, [ebp-30] ; 下面开始进行比较注册码
00452011 . 8B4D BC mov ecx, [ebp-44]
00452014 . 50 push eax ; 这里是真的注册码
00452015 . 51 push ecx ; 这里是假注册码
00452016 . FF15 48104000 call [<&MSVBVM60.__vbaStrCmp>] ; MSVBVM60.__vbaStrCmp
0045201C . 8BF0 mov esi, eax
0045201E . 8D4D BC lea ecx, [ebp-44]
00452021 . F7DE neg esi
00452023 . 1BF6 sbb esi, esi
00452025 . 46 inc esi
00452026 . F7DE neg esi
00452028 . FF15 B4104000 call [<&MSVBVM60.__vbaFreeStr>] ; MSVBVM60.__vbaFreeStr
0045202E . 8D4D B8 lea ecx, [ebp-48]
00452031 . FF15 B0104000 call [<&MSVBVM60.__vbaFreeObj>] ; MSVBVM60.__vbaFreeObj
00452037 . B8 04000280 mov eax, 80020004
0045203C . BB 0A000000 mov ebx, 0A
00452041 . 66:85F6 test si, si
00452044 . 8945 80 mov [ebp-80], eax
00452047 . 899D 78FFFFFF mov [ebp-88], ebx
0045204D . 8945 90 mov [ebp-70], eax
00452050 . 895D 88 mov [ebp-78], ebx
00452053 . 74 74 je short 004520C9 ; 跳转就出错
00452055 . 8B35 90104000 mov esi, [<&MSVBVM60.__vbaVarDup>] ; MSVBVM60.__vbaVarDup
0045205B . BF 08000000 mov edi, 8
00452060 . 8D95 58FFFFFF lea edx, [ebp-A8]
00452066 . 8D4D 98 lea ecx, [ebp-68]
00452069 . C785 60FFFFFF>mov dword ptr [ebp-A0], 00451A88 ; UNICODE "Well done!"
00452073 . 89BD 58FFFFFF mov [ebp-A8], edi
00452079 . FFD6 call esi ; <&MSVBVM60.__vbaVarDup>
0045207B . 8D95 68FFFFFF lea edx, [ebp-98]
00452081 . 8D4D A8 lea ecx, [ebp-58]
00452084 . C785 70FFFFFF>mov dword ptr [ebp-90], 00451A08 ; UNICODE "Well done! Now write a tutorial and submit it on CrackMes.de!"
0045208E . 89BD 68FFFFFF mov [ebp-98], edi
00452094 . FFD6 call esi
00452096 . 8D95 78FFFFFF lea edx, [ebp-88]
0045209C . 8D45 88 lea eax, [ebp-78]
0045209F . 52 push edx
004520A0 . 8D4D 98 lea ecx, [ebp-68]
004520A3 . 50 push eax
004520A4 . 51 push ecx
004520A5 . 8D55 A8 lea edx, [ebp-58]
004520A8 . 6A 00 push 0
004520AA . 52 push edx
004520AB . FF15 2C104000 call [<&MSVBVM60.#595>] ; MSVBVM60.rtcMsgBox
004520B1 . 8D85 78FFFFFF lea eax, [ebp-88]
004520B7 . 8D4D 88 lea ecx, [ebp-78]
004520BA . 50 push eax
004520BB . 8D55 98 lea edx, [ebp-68]
004520BE . 51 push ecx
004520BF . 8D45 A8 lea eax, [ebp-58]
004520C2 . 52 push edx
004520C3 . 50 push eax
004520C4 . E9 F2000000 jmp 004521BB
004520C9 > 8B35 90104000 mov esi, [<&MSVBVM60.__vbaVarDup>] ; MSVBVM60.__vbaVarDup
004520CF . BF 08000000 mov edi, 8
004520D4 . 8D95 58FFFFFF lea edx, [ebp-A8]
004520DA . 8D4D 98 lea ecx, [ebp-68]
004520DD . C785 60FFFFFF>mov dword ptr [ebp-A0], 00451AA4 ; UNICODE "Congratulations!"
004520E7 . 89BD 58FFFFFF mov [ebp-A8], edi
004520ED . FFD6 call esi ; <&MSVBVM60.__vbaVarDup>
004520EF . 8D95 68FFFFFF lea edx, [ebp-98]
004520F5 . 8D4D A8 lea ecx, [ebp-58]
004520F8 . C785 70FFFFFF>mov dword ptr [ebp-90], 00451AA4 ; UNICODE "Congratulations!"
00452102 . 89BD 68FFFFFF mov [ebp-98], edi
00452108 . FFD6 call esi
0045210A . 8D8D 78FFFFFF lea ecx, [ebp-88]
00452110 . 8D55 88 lea edx, [ebp-78]
00452113 . 51 push ecx
00452114 . 8D45 98 lea eax, [ebp-68]
00452117 . 52 push edx
00452118 . 50 push eax
00452119 . 8D4D A8 lea ecx, [ebp-58]
0045211C . 6A 00 push 0
0045211E . 51 push ecx
0045211F . FF15 2C104000 call [<&MSVBVM60.#595>] ; MSVBVM60.rtcMsgBox
算法:(1)(用户名的第一位与第三位相乘)/(用户名的第三位)
(2)如果结果为浮点数,保留12位小数;如果结果为整数就是注册码
例子:用户名:jh0262 密码:110.416666666667
用户名:lqb 密码: 108
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
上传的附件: