用PEID检测是Armadillo 1.xx - 2.xx -> Silicon Realms Toolworks
用arm查是
F:\TDDOWNLOAD\mlex_cgitem6000M\MLEx.exe
目标为Armadillo保护
!- 保护系统级别为 (Basic)
!-<所使用的保护模式>
标准保护 或 最小保护模式
!- <备份密钥设置>
没有发现注册密钥
!- <目标程序压缩设置>
最好 / 最慢的压缩方式
!<其它保护设置>
关闭监视进程
版本号 3.05 06Jun2003
<- 共消耗时间 00时00分00秒969毫秒 ->
在网上查找相关教程,参考三人行Armadillo脱壳教程,二次断点法,里面是脱一款桌面秀软件(XDeskWeather 3.6)的。
问题1:
如何判断要脱壳程序是单进程还是双进程的,这里说是进程还是线程?
运行我的程序mlex.exe后,在winxp系统任务管理器中查看只有一个进程。
用OD载入mlex.exe后,忽略所有异常,F9运行,能够运行程序,在OD里查看进程(线程?),发现线程有2个,对于这点我非常迷惑。
问题2:
按教程步骤开始
OD载入,隐藏OD,忽略所有异常,开始如下
005AB379 > 55 push ebp
005AB37A 8BEC mov ebp,esp
005AB37C 6A FF push -1
005AB37E 68 78025D00 push MLEx.005D0278
005AB383 68 60AD5A00 push MLEx.005AAD60
005AB388 64:A1 00000000 mov eax,dword ptr fs:[0]
005AB38E 50 push eax
005AB38F 64:8925 0000000>mov dword ptr fs:[0],esp
005AB396 83EC 58 sub esp,58
005AB399 53 push ebx
005AB39A 56 push esi
005AB39B 57 push edi
005AB39C 8965 E8 mov dword ptr ss:[ebp-18],esp
005AB39F FF15 4CD15C00 call dword ptr ds:[<&KERNEL32.GetVersion>; kernel32.GetVersion
005AB3A5 33D2 xor edx,edx
下断he GetModuleHandleA,F9运行,按了6次,堆栈显示
0012C280 00CB5331 /CALL 到 GetModuleHandleA 来自 00CB532B
0012C284 0012C3BC \pModule = "kernel32.dll"
0012C288 00000002
0012C28C 00D52580
此时按alt+F9跳出
00CB5331 8B0D 60D8CD00 mov ecx,dword ptr ds:[CDD860]
00CB5337 89040E mov dword ptr ds:[esi+ecx],eax
00CB533A A1 60D8CD00 mov eax,dword ptr ds:[CDD860]
00CB533F 393C06 cmp dword ptr ds:[esi+eax],edi
00CB5342 75 16 jnz short 00CB535A
00CB5344 8D85 B4FEFFFF lea eax,dword ptr ss:[ebp-14C]
00CB534A 50 push eax
00CB534B FF15 B850CD00 call dword ptr ds:[CD50B8] ; kernel32.LoadLibraryA
00CB5351 8B0D 60D8CD00 mov ecx,dword ptr ds:[CDD860]
00CB5357 89040E mov dword ptr ds:[esi+ecx],eax
00CB535A A1 60D8CD00 mov eax,dword ptr ds:[CDD860]
00CB535F 393C06 cmp dword ptr ds:[esi+eax],edi
00CB5362 0F84 AD000000 je 00CB5415
00CB5368 33C9 xor ecx,ecx
00CB536A 8B03 mov eax,dword ptr ds:[ebx]
00CB536C 3938 cmp dword ptr ds:[eax],edi
00CB536E 74 06 je short 00CB5376
00CB5370 41 inc ecx
00CB5371 83C0 0C add eax,0C
00CB5374 ^ EB F6 jmp short 00CB536C
00CB5376 8BC1 mov eax,ecx
00CB5378 C1E0 02 shl eax,2
00CB537B 50 push eax
根据教程所说,此行00CB5362 0F84 AD000000 je 00CB5415 就是Magic Jump,je 00CB5415改jmp00CB5415,清楚硬件断点,下断bp GetCurrentThreadId,F9(按了3次),观察堆栈
0012F5A8 00CCCF2D /CALL 到 GetCurrentThreadId 来自 00CCCF27
0012F5AC 0012FF2C
0012F5B0 00000000
0012F5B4 7FFD4000
0012F5B8 005A24E9 返回到 MLEx.005A24E9 来自 00CCCEBA
0012F5BC 005D0718 MLEx.005D0718
这时教程说取消断点,我在硬件断点里并未找到断点,和第一次的断点不一样,第一次是有硬件断点的,我删除了,第二次的找不到,我也就没法删除断点,然后按alt+F9跳出 如下
00CCCF2D A3 F018CE00 mov dword ptr ds:[CE18F0],eax
00CCCF32 E8 2487FEFF call 00CB565B
00CCCF37 6A 00 push 0
00CCCF39 E8 4BD9FEFF call 00CBA889
00CCCF3E 59 pop ecx
00CCCF3F E8 7D39FFFF call 00CC08C1
00CCCF44 8BF8 mov edi,eax
00CCCF46 A1 E018CE00 mov eax,dword ptr ds:[CE18E0]
00CCCF4B 8B48 74 mov ecx,dword ptr ds:[eax+74]
00CCCF4E 3348 5C xor ecx,dword ptr ds:[eax+5C]
00CCCF51 3308 xor ecx,dword ptr ds:[eax]
00CCCF53 03F9 add edi,ecx
00CCCF55 8B0E mov ecx,dword ptr ds:[esi]
00CCCF57 85C9 test ecx,ecx
00CCCF59 75 2E jnz short 00CCCF89
00CCCF5B 8B78 5C mov edi,dword ptr ds:[eax+5C]
00CCCF5E E8 5E39FFFF call 00CC08C1
00CCCF63 8B0D E018CE00 mov ecx,dword ptr ds:[CE18E0] ; MLEx.005CD258
00CCCF69 FF76 14 push dword ptr ds:[esi+14]
00CCCF6C 8B51 74 mov edx,dword ptr ds:[ecx+74]
00CCCF6F FF76 10 push dword ptr ds:[esi+10]
00CCCF72 33D7 xor edx,edi
00CCCF74 3311 xor edx,dword ptr ds:[ecx]
00CCCF76 FF76 0C push dword ptr ds:[esi+C]
00CCCF79 03C2 add eax,edx
00CCCF7B 8B51 78 mov edx,dword ptr ds:[ecx+78]
00CCCF7E 3351 14 xor edx,dword ptr ds:[ecx+14]
00CCCF81 33D7 xor edx,edi
00CCCF83 2BC2 sub eax,edx
00CCCF85 FFD0 call eax
00CCCF87 EB 25 jmp short 00CCCFAE
00CCCF89 83F9 01 cmp ecx,1
00CCCF8C 75 22 jnz short 00CCCFB0
00CCCF8E FF76 04 push dword ptr ds:[esi+4]
00CCCF91 FF76 08 push dword ptr ds:[esi+8]
00CCCF94 6A 00 push 0
00CCCF96 E8 2639FFFF call 00CC08C1
00CCCF9B 50 push eax
00CCCF9C A1 E018CE00 mov eax,dword ptr ds:[CE18E0]
00CCCFA1 8B48 78 mov ecx,dword ptr ds:[eax+78]
00CCCFA4 3348 5C xor ecx,dword ptr ds:[eax+5C]
00CCCFA7 3348 14 xor ecx,dword ptr ds:[eax+14]
00CCCFAA 2BF9 sub edi,ecx
00CCCFAC FFD7 call edi
00CCCFAE 8BD8 mov ebx,eax
00CCCFB0 5F pop edi
单步运行F8到00CCCFAC FFD7 call edi处,按照教程说的此处应该就是OEP,F7进入,显示如下:
004014A0 /EB 10 jmp short MLEx.004014B2
004014A2 |66:623A bound di,dword ptr ds:[edx]
004014A5 |43 inc ebx
004014A6 |2B2B sub ebp,dword ptr ds:[ebx]
004014A8 |48 dec eax
004014A9 |4F dec edi
004014AA |4F dec edi
004014AB |4B dec ebx
004014AC |90 nop
004014AD -|E9 98405100 jmp 0091554A
004014B2 \A1 8B405100 mov eax,dword ptr ds:[51408B]
004014B7 C1E0 02 shl eax,2
004014BA A3 8F405100 mov dword ptr ds:[51408F],eax
004014BF 52 push edx
004014C0 6A 00 push 0
004014C2 E8 DF201100 call MLEx.005135A6 ; jmp to kernel32.GetModuleHandleA
004014C7 8BD0 mov edx,eax
004014C9 E8 BE441000 call MLEx.0050598C
004014CE 5A pop edx
004014CF E8 1C441000 call MLEx.005058F0
004014D4 E8 F3441000 call MLEx.005059CC
004014D9 6A 00 push 0
004014DB E8 8C5A1000 call MLEx.00506F6C
004014E0 59 pop ecx
004014E1 68 34405100 push MLEx.00514034
这里是不是真正的OEP,我觉得应该不是,没见过是JMP开头的OEP啊,是我哪个地方弄错了呢》?请高手指点我一下,我之所以按照这个教程来做,是因为用OD打开教程里的桌面秀软件(XDeskWeather 3.6)跟我的程序对比,非常的相似,前面的步骤都能对应上,就是最后到达OEP点的时候,进入后却不一样,桌面秀软件(XDeskWeather 3.6)却能够进入OEP,我的程序却跟他不一样,请高手帮我看看这个程序有什么诡异之处么?
附件是那个程序。
[培训]科锐软件逆向54期预科班、正式班开始火爆招生报名啦!!!