用OD载入加壳程序的入口代码:
00401000 幻> /EB 06 jmp short 幻影_Pha.00401008
00401002 |68 2EA80000 push 0A82E
00401007 |C3 retn
00401008 \9C pushfd
00401009 60 pushad
0040100A E8 02000000 call 幻影_Pha.00401011
0040100F 33C0 xor eax,eax
00401011 8BC4 mov eax,esp
00401013 83C0 04 add eax,4
00401016 93 xchg eax,ebx
00401017 8BE3 mov esp,ebx
00401019 8B5B FC mov ebx,dword ptr ds:[ebx-4]
0040101C 81EB 3F904000 sub ebx,幻影_Pha.0040903F
00401022 61 popad
00401023 9D popfd
00401024 - E9 7D2A3600 jmp 幻影_Pha.00763AA6
00401029 0000 add byte ptr ds:[eax],al
BP VirtualFree 下这个断点
两次F9以后,返回到用户代码:
00767929 61 popad 这里是eip
0076792A C3 retn
retn以后代码:
00763AFE /EB 03 jmp short 幻影_Pha.00763B03
jmp以后的代码:
00763B03 /EB 1B jmp short 幻影_Pha.00763B20
00763B05 |8B85 95450000 mov eax,dword ptr ss:[ebp+4595]
00763B0B |FF7437 04 push dword ptr ds:[edi+esi+4]
00763B0F |010424 add dword ptr ss:[esp],eax
00763B12 |FF3437 push dword ptr ds:[edi+esi]
00763B15 |010424 add dword ptr ss:[esp],eax
00763B18 |FFD3 call ebx
00763B1A |83C4 08 add esp,8
00763B1D |83C7 08 add edi,8
00763B20 \833C37 00 cmp dword ptr ds:[edi+esi],0
00763B24 ^ 75 DF jnz short 幻影_Pha.00763B05
00763B26 83BD 5E530000 00 cmp dword ptr ss:[ebp+535E],0
00763B2D 74 0E je short 幻影_Pha.00763B3D
00763B2F 83BD 62530000 00 cmp dword ptr ss:[ebp+5362],0
00763B36 74 05 je short 幻影_Pha.00763B3D
00763B38 E8 ED0B0000 call 幻影_Pha.0076472A
00763B3D 8D7437 04 lea esi,dword ptr ds:[edi+esi+4]
00763B41 E8 600B0000 call 幻影_Pha.007646A6
00763B46 8B85 E74B0000 mov eax,dword ptr ss:[ebp+4BE7]
00763B4C 0BC0 or eax,eax
00763B4E 74 0B je short 幻影_Pha.00763B5B
00763B50 0385 95450000 add eax,dword ptr ss:[ebp+4595]
00763B56 E8 BC030000 call 幻影_Pha.00763F17
00763B5B 83BD E54D0000 01 cmp dword ptr ss:[ebp+4DE5],1
00763B62 75 13 jnz short 幻影_Pha.00763B77
00763B64 89B5 E94D0000 mov dword ptr ss:[ebp+4DE9],esi
00763B6A EB 03 jmp short 幻影_Pha.00763B6F
00763B6C 83C6 04 add esi,4
00763B6F 837E FC FF cmp dword ptr ds:[esi-4],-1
00763B73 ^ 75 F7 jnz short 幻影_Pha.00763B6C
00763B75 EB 03 jmp short 幻影_Pha.00763B7A
00763B77 83C6 08 add esi,8
00763B7A 8B06 mov eax,dword ptr ds:[esi]
00763B7C 8985 B1450000 mov dword ptr ss:[ebp+45B1],eax
00763B82 83C6 04 add esi,4
00763B85 E8 B53E0000 call 幻影_Pha.00767A3F
00763B8A 83C6 04 add esi,4
00763B8D 53 push ebx
00763B8E 6A 40 push 40
00763B90 68 00100000 push 1000
00763B95 68 BB090000 push 9BB
00763B9A 6A 00 push 0
00763B9C FF95 F2030000 call dword ptr ss:[ebp+3F2]
00763BA2 8985 7A530000 mov dword ptr ss:[ebp+537A],eax
00763BA8 5B pop ebx
00763BA9 FFB5 7A530000 push dword ptr ss:[ebp+537A]
00763BAF 56 push esi
00763BB0 FFD3 call ebx
00763BB2 83C4 08 add esp,8
00763BB5 E8 713D0000 call 幻影_Pha.0076792B 这个call里面有反调试F7进入
进入以后的代码:
0076792B 60 pushad
0076792C 83BD 76490000 01 cmp dword ptr ss:[ebp+4976],1
00767933 74 09 je short 幻影_Pha.0076793E 这个JE不能让他跳,不然就出现检测到调试器了,改标志位z=0,跳过
00767935 83BD 7A490000 01 cmp dword ptr ss:[ebp+497A],1
0076793C 75 41 jnz short 幻影_Pha.0076797F
0076793E 81BD D5450000 0D68BC>cmp dword ptr ss:[ebp+45D5],ABBC680D
00767948 75 17 jnz short 幻影_Pha.00767961
0076794A FFB5 D5450000 push dword ptr ss:[ebp+45D5]
00767950 FFB5 B9450000 push dword ptr ss:[ebp+45B9]
00767956 E8 AF020000 call 幻影_Pha.00767C0A
0076795B 8985 D5450000 mov dword ptr ss:[ebp+45D5],eax
00767961 6A 30 push 30
00767963 8D85 F0450000 lea eax,dword ptr ss:[ebp+45F0]
00767969 50 push eax
0076796A 8D85 894A0000 lea eax,dword ptr ss:[ebp+4A89]
00767970 50 push eax
00767971 6A 00 push 0
00767973 FF95 D5450000 call dword ptr ss:[ebp+45D5]
00767979 61 popad
0076797A 58 pop eax
0076797B 61 popad
0076797C C3 retn
0076797D EB 48 jmp short 幻影_Pha.007679C7
0076797F 83BD 7E490000 01 cmp dword ptr ss:[ebp+497E],1
00767986 75 3F jnz short 幻影_Pha.007679C7
00767988 81BD D5450000 0D68BC>cmp dword ptr ss:[ebp+45D5],ABBC680D
00767992 75 17 jnz short 幻影_Pha.007679AB
00767994 FFB5 D5450000 push dword ptr ss:[ebp+45D5]
0076799A FFB5 B9450000 push dword ptr ss:[ebp+45B9]
007679A0 E8 65020000 call 幻影_Pha.00767C0A
007679A5 8985 D5450000 mov dword ptr ss:[ebp+45D5],eax
007679AB 6A 30 push 30
007679AD 8D85 F0450000 lea eax,dword ptr ss:[ebp+45F0]
007679B3 50 push eax
007679B4 8D85 374B0000 lea eax,dword ptr ss:[ebp+4B37]
007679BA 50 push eax
007679BB 6A 00 push 0
007679BD FF95 D5450000 call dword ptr ss:[ebp+45D5]
007679C3 61 popad
007679C4 58 pop eax
007679C5 61 popad
007679C6 C3 retn
007679C7 61 popad
007679C8 C3 retn
007679C9 60 pushad
返回以后一路走下来我们来到这里了:
00763CBB 83BD F34B0000 00 cmp dword ptr ss:[ebp+4BF3],0
00763CC2 76 11 jbe short 幻影_Pha.00763CD5
00763CC4 83BD 0B4C0000 00 cmp dword ptr ss:[ebp+4C0B],0
00763CCB 75 08 jnz short 幻影_Pha.00763CD5
00763CCD 03F9 add edi,ecx
00763CCF 2BBD 95450000 sub edi,dword ptr ss:[ebp+4595]
00763CD5 03BD 95450000 add edi,dword ptr ss:[ebp+4595]
00763CDB C700 FFFFFFFF mov dword ptr ds:[eax],-1
00763CE1 83C0 04 add eax,4
00763CE4 8985 76530000 mov dword ptr ss:[ebp+5376],eax
00763CEA 803E 01 cmp byte ptr ds:[esi],1
00763CED ^ 0F85 4BFFFFFF jnz 幻影_Pha.00763C3E
00763CF3 E8 C3340000 call 幻影_Pha.007671BB
00763CF8 68 00400000 push 4000
00763CFD 68 BB090000 push 9BB
00763D02 FFB5 7A530000 push dword ptr ss:[ebp+537A]
00763D08 FF95 FA030000 call dword ptr ss:[ebp+3FA]
00763D0E E8 CF220000 call 幻影_Pha.00765FE2
00763D13 E8 0D340000 call 幻影_Pha.00767125
00763D18 E8 DE0B0000 call 幻影_Pha.007648FB
00763D1D E8 840A0000 call 幻影_Pha.007647A6
00763D22 83BD 1F4C0000 00 cmp dword ptr ss:[ebp+4C1F],0
00763D29 74 07 je short 幻影_Pha.00763D32
00763D2B E9 0F100000 jmp 幻影_Pha.00764D3F
00763D30 EB 01 jmp short 幻影_Pha.00763D33
00763D32 61 popad
00763D33 - E9 FB6ACDFF jmp 幻影_Pha.0043A833
这个jmp跳转很大,应该就是OEP吧.但是~!!!!跳过去以后令我很费解.
jmp以后:
0043A833 /E9 D3281C00 jmp 幻影_Pha.005FD10B
0043A838 |CC int3
0043A839 |CC int3
0043A83A |CC int3
0043A83B |CC int3
0043A83C |CC int3
0043A83D |CC int3
0043A83E |CC int3
0043A83F |CC int3
0043A840 |CC int3
0043A841 |CC int3
0043A842 |CC int3
0043A843 |CC int3
0043A844 |CC int3
0043A845 |CC int3
0043A846 |CC int3
0043A847 |CC int3
0043A848 |CC int3
0043A849 |CC int3
0043A84A |CC int3
0043A84B |CC int3
0043A84C |CC int3
jmp以后是这样的:
005FD10B 68 AACC413B push 3B41CCAA
005FD110 E8 54FCFFFF call 幻影_Pha.005FCD69 执行这个call以后程序就跑飞了.
005FD115 2B2C74 sub ebp,dword ptr ss:[esp+esi*2]
005FD118 B5 8C mov ch,8C
005FD11A 81F5 A1980BE5 xor ebp,E50B98A1
005FD120 E8 FEFB0100 call 幻影_Pha.0061CD23
005FD125 9C pushfd
005FD126 8F4424 04 pop dword ptr ss:[esp+4]
005FD12A 66:0FBAE4 0F bt sp,0F
005FD12F 84F6 test dh,dh
005FD131 35 AB154DD6 xor eax,D64D15AB
005FD136 E9 E2A30000 jmp 幻影_Pha.0060751D
005FD13B 65:CE into
005FD13D 137CE1 1E adc edi,dword ptr ds:[ecx+1E]
005FD141 73 34 jnb short 幻影_Pha.005FD177
005FD143 0D 82DB38F5 or eax,F538DB82
005FD148 D2E3 shl bl,cl
005FD14A C3 retn
005FD14B 1D 751A614F sbb eax,4F611A75
进入 call 幻影_Pha.005FCD69 以后代码:
005FCD69 E8 12D4FFFF call 幻影_Pha.005FA180
005FCD6E 2C E3 sub al,0E3
005FCD70 9C pushfd
005FCD71 F8 clc
005FCD72 C0C8 07 ror al,7
005FCD75 E8 DFF9FFFF call 幻影_Pha.005FC759
005FCD7A 46 inc esi
005FCD7B 66:893424 mov word ptr ss:[esp],si
005FCD7F 00C3 add bl,al
005FCD81 F9 stc
005FCD82 F5 cmc
005FCD83 66:98 cbw
005FCD85 ^ E9 CBE2FFFF jmp 幻影_Pha.005FB055
从这里以后我就跟踪不下去了,程序总是跑飞了.希望大侠帮帮小弟吧...
这个壳已经困扰我很久了,真诚的希望有人能够帮我一下..
并且用lordpe DUMP的时候出现错误"无法粘贴PE头".
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课