首先
1.我要脱的程序PEID查壳后:Themida|WinLicense 1.8.2.0 Plus -> Oreans Technologies *
用Fly老大的userdb.txt是Themida|WinLicense 1.8.2.0+
2.程序包里其他exe程序脱壳后是VC8 -> Microsoft Corporation,由此我判断我要脱的程序也是VC8
随便找个VC8的程序,参考入口代码:
0040FDA7 > $ E8 E8020000 call 00410094
0040FDAC .^ E9 35FDFFFF jmp 0040FAE6
00410094:
00410094 /$ 55 push ebp
00410095 |. 8BEC mov ebp, esp
00410097 |. 83EC 10 sub esp, 10
0041009A |. A1 10504100 mov eax, dword ptr [415010]
0041009F |. 8365 F8 00 and dword ptr [ebp-8], 0
004100A3 |. 8365 FC 00 and dword ptr [ebp-4], 0
004100A7 |. 53 push ebx
004100A8 |. 57 push edi
004100A9 |. BF 4EE640BB mov edi, BB40E64E
004100AE |. 3BC7 cmp eax, edi
004100B0 |. BB 0000FFFF mov ebx, FFFF0000
004100B5 |. 74 0D je short 004100C4
004100B7 |. 85C3 test ebx, eax
004100B9 |. 74 09 je short 004100C4
004100BB |. F7D0 not eax
004100BD |. A3 14504100 mov dword ptr [415014], eax
004100C2 |. EB 60 jmp short 00410124
004100C4 |> 56 push esi
004100C5 |. 8D45 F8 lea eax, dword ptr [ebp-8]
004100C8 |. 50 push eax ; /pFileTime
004100C9 |. FF15 A4114000 call dword ptr [<&KERNEL32.GetSystemT>; \GetSystemTimeAsFileTime
004100CF |. 8B75 FC mov esi, dword ptr [ebp-4]
004100D2 |. 3375 F8 xor esi, dword ptr [ebp-8]
004100D5 |. FF15 A8114000 call dword ptr [<&KERNEL32.GetCurrent>; [GetCurrentProcessId
004100DB |. 33F0 xor esi, eax
004100DD |. FF15 AC114000 call dword ptr [<&KERNEL32.GetCurrent>; [GetCurrentThreadId
004100E3 |. 33F0 xor esi, eax
004100E5 |. FF15 B0114000 call dword ptr [<&KERNEL32.GetTickCou>; [GetTickCount
004100EB |. 33F0 xor esi, eax
004100ED |. 8D45 F0 lea eax, dword ptr [ebp-10]
004100F0 |. 50 push eax ; /pPerformanceCount
004100F1 |. FF15 B8114000 call dword ptr [<&KERNEL32.QueryPerfo>; \QueryPerformanceCounter
0040FAE6:
0040FAE6 > /6A 58 push 58
0040FAE8 . |68 30304100 push 00413030
0040FAED . |E8 FA040000 call 0040FFEC
0040FAF2 . |33DB xor ebx, ebx
0040FAF4 . |895D E4 mov dword ptr [ebp-1C], ebx
0040FAF7 . |895D FC mov dword ptr [ebp-4], ebx
0040FAFA . |8D45 98 lea eax, dword ptr [ebp-68]
0040FAFD . |50 push eax ; /pStartupinfo
0040FAFE . |FF15 BC114000 call dword ptr [<&KERNEL32.GetStartup>; \GetStartupInfoA
0040FB04 . |C745 FC FEFFF>mov dword ptr [ebp-4], -2
0040FB0B . |C745 FC 01000>mov dword ptr [ebp-4], 1
0040FB12 . |64:A1 1800000>mov eax, dword ptr fs:[18]
0040FB18 . |8B70 04 mov esi, dword ptr [eax+4]
0040FB1B . |BF 0C724100 mov edi, 0041720C
0040FB20 > |6A 00 push 0
0040FB22 . |56 push esi
0040FB23 . |57 push edi
0040FB24 . |FF15 C0114000 call dword ptr [<&KERNEL32.Interlocke>; kernel32.InterlockedCompareExchange
0040FB2A . |85C0 test eax, eax
然后
1.OD设置HIDE完毕载入程序,来到:
00552014 > B8 00000000 mov eax, 0
00552019 60 pushad
0055201A 0BC0 or eax, eax
0055201C 74 68 je short 00552086
0055201E E8 00000000 call 00552023
00552023 58 pop eax
00552024 05 53000000 add eax, 53
00552029 8038 E9 cmp byte ptr [eax], 0E9
0055202C 75 13 jnz short 00552041
0055202E 61 popad
0055202F EB 45 jmp short 00552076
00552031 DB2D 37205500 fld tbyte ptr [552037]
00552037 FFFF ??? ; Unknown command
00552039 FFFF ??? ; Unknown command
0055203B FFFF ??? ; Unknown command
0055203D FFFF ??? ; Unknown command
0055203F 3D 40E80000 cmp eax, 0E840
00552044 0000 add byte ptr [eax], al
2.接着载入okdodo 2007/03 ->1.8.2.0+版本脚本 或 fxyang -> Themida & WinLicen 1.9.1 - 1.9.5 系列脱壳脚本都到达004C06CD:
004C06CD /. 55 push ebp
004C06CE |. 8BEC mov ebp, esp
004C06D0 |. 83EC 10 sub esp, 10
004C06D3 |. A1 245C5200 mov eax, dword ptr [525C24]
004C06D8 |. 8365 F8 00 and dword ptr [ebp-8], 0
004C06DC |. 8365 FC 00 and dword ptr [ebp-4], 0
004C06E0 |. 53 push ebx
004C06E1 |. 57 push edi
004C06E2 |. BF 4EE640BB mov edi, BB40E64E
004C06E7 |. 3BC7 cmp eax, edi
004C06E9 |. BB 0000FFFF mov ebx, FFFF0000
004C06EE |. 74 0D je short 004C06FD
004C06F0 |. 85C3 test ebx, eax
004C06F2 |. 74 09 je short 004C06FD
004C06F4 |. F7D0 not eax
004C06F6 |. A3 285C5200 mov dword ptr [525C28], eax
004C06FB |. EB 60 jmp short 004C075D
004C06FD |> 56 push esi
004C06FE |. 8D45 F8 lea eax, dword ptr [ebp-8]
004C0701 |. 50 push eax
004C0702 |. 90 nop
004C0703 |. E8 7C035702 call 02A30A84
004C0708 |. 8B75 FC mov esi, dword ptr [ebp-4]
004C070B |. 3375 F8 xor esi, dword ptr [ebp-8]
004C070E |. E8 F8005D02 call 02A9080B
004C0713 |. 90 nop
004C0714 |. 33F0 xor esi, eax
004C0716 |. E8 48015D02 call 02A90863
004C071B |? 90 nop
004C071C |. 33F0 xor esi, eax
004C071E |. 90 nop
004C071F |. E8 D4FC6002 call 02AD03F8
004C0724 |. 33F0 xor esi, eax
004C0726 |. 8D45 F0 lea eax, dword ptr [ebp-10]
通过比较,发现结构类似VC8入口CALL段.
3.接着把次函数跑完,来到006D58F0:
006D58F0 68 76CC4E0A push 0A4ECC76
006D58F5 ^ E9 B2FFF4FF jmp 006258AC
通过比较,发现结构类似VC8入口.
4.接着进入JMP段,发现代码结构完全不同!
006258AC 60 pushad
006258AD 9C pushfd
006258AE FC cld
006258AF E8 00000000 call 006258B4
006258B4 5F pop edi
006258B5 81EF 5085430A sub edi, 0A438550
006258BB 8BC7 mov eax, edi
006258BD 81C7 6482430A add edi, 0A438264
006258C3 3B47 2C cmp eax, dword ptr [edi+2C]
006258C6 75 02 jnz short 006258CA
006258C8 EB 13 jmp short 006258DD
006258CA 8947 2C mov dword ptr [edi+2C], eax
006258CD B9 A8000000 mov ecx, 0A8
006258D2 EB 05 jmp short 006258D9
006258D4 01448F 40 add dword ptr [edi+ecx*4+40], eax
006258D8 49 dec ecx
006258D9 0BC9 or ecx, ecx
006258DB ^ 75 F7 jnz short 006258D4
006258DD 8B7424 24 mov esi, dword ptr [esp+24]
006258E1 8BDE mov ebx, esi
006258E3 03F0 add esi, eax
最后
想请教高手脱Themida壳的大体思路,和这个壳我该怎么深入!
希 望 高 手 能 赐 教,小 弟 感 激 不 禁
[培训]科锐逆向工程师培训第53期2025年7月8日开班!