首页
社区
课程
招聘
[求助]脱UltraProtect 1.x遇难,请指点
发表于: 2005-6-13 20:54 3758

[求助]脱UltraProtect 1.x遇难,请指点

2005-6-13 20:54
3758
壳是UltraProtect 1.x -> RISCO Software Inc

按二哥的脱文所写

OD除了内存异常不要忽略外,其他异常全部忽略,载入程序。

006D5000 >  60            pushad                <====OD载入停在此处,按F9
006D5001    50            push eax
006D5002    E8 01000000   call 1.006D5008
006D5007    EA 83C40458 8>jmp far F38B:5804C483
006D500E    F9            stc
006D500F    4F            dec edi
006D5010    E8 01000000   call 1.006D5016
006D5015  - 7F 83         jg short 1.006D4F9A
006D5017    C40485 FEEB01>les eax,fword ptr ds:[eax*4+>

006E674D    CD 01         int 1                        <====程序停在这里,唯一一次异常
006E674F    40            inc eax
006E6750    40            inc eax
006E6751    0BC0          or eax,eax
006E6753    75 05         jnz short 1.006E675A
006E6755    90            nop
006E6756    90            nop
006E6757    90            nop
006E6758    90            nop
006E6759    61            popad

按ALT+M打开内存映射
地址       大小    ? 物主   区段       包含             类型   访问  初始访问  映射为
00400000   00001000   1                PE header        Imag   R     RWE
00401000   001A7000   1     CODE       code             Imag   R     RWE
005A8000   00007000   1     DATA       code,data        Imag   R     RWE
005AF000   00012000   1     BSS        code             Imag   R     RWE
005C1000   00004000   1     .idata     code             Imag   R     RWE
005C5000   00001000   1     .tls       code             Imag   R     RWE
005C6000   00001000   1     .rdata     code             Imag   R     RWE
005C7000   00019000   1     .reloc     code             Imag   R     RWE
005E0000   000F5000   1     .rsrc      code,resources   Imag   R     RWE
006D5000   0001E000   1     .perplex   code,imports     Imag   R     RWE

然后下内存访问断点,按SHIFT+F9,来到下面

00406E3A    C3            retn
00406E3B    90            nop
00406E3C    53            push ebx        <====来到这里
00406E3D    8BD8          mov ebx,eax
00406E3F    33C0          xor eax,eax
00406E41    A3 C4805A00   mov dword ptr ds:[5A80C4],ea>
00406E46    6A 00         push 0
00406E48    E8 2BFFFFFF   call 1.00406D78              ; jmp to kernel32.GetModuleHandleA
00406E4D    A3 68F65A00   mov dword ptr ds:[5AF668],ea>
00406E52    A1 68F65A00   mov eax,dword ptr ds:[5AF668>
00406E57    A3 D0805A00   mov dword ptr ds:[5A80D0],ea>
00406E5C    33C0          xor eax,eax
00406E5E    A3 D4805A00   mov dword ptr ds:[5A80D4],ea>
00406E63    33C0          xor eax,eax
00406E65    A3 D8805A00   mov dword ptr ds:[5A80D8],ea>
00406E6A    E8 C1FFFFFF   call 1.00406E30
00406E6F    BA CC805A00   mov edx,1.005A80CC
00406E74    8BC3          mov eax,ebx
00406E76    E8 31D8FFFF   call 1.004046AC
00406E7B    5B            pop ebx
00406E7C    C3            retn

在00406E3C处脱壳,用ImportREC修复后有1处指针为假,用第三级追踪得到真的指针,可是修复后程序运行不了。

二哥的脱文中说可以来到OEP处的啊,可是OEP处应该是PUSH EBP啊,是不是代码被删了一点啊,或者说这个根本就不是OEP。

小弟我又按照pendan2001兄写的贴子中的方法脱壳

006E674D    CD 01         int 1                        <====程序停在这里后查看堆栈
006E674F    40            inc eax
006E6750    40            inc eax
006E6751    0BC0          or eax,eax
006E6753    75 05         jnz short 1.006E675A
006E6755    90            nop
006E6756    90            nop
006E6757    90            nop

堆栈内容是
0012FF78   0012FFE0  指针到下一个 SEH 记录
0012FF7C   006E6731  SE 句柄

因为006E6731就在附近,所以我就向下看,可以看到POPAD,在POPAD处下断,按Shift+F9 2次来到断点处

006E6759    61            popad
006E675A    33C0          xor eax,eax
006E675C    64:8F00       pop dword ptr fs:[eax]
006E675F    58            pop eax
006E6760    60            pushad
006E6761    E8 00000000   call 1.006E6766
006E6766    5E            pop esi
006E6767    83EE 06       sub esi,6
006E676A    B9 57000000   mov ecx,57
006E676F    29CE          sub esi,ecx
006E6771    BA 17607879   mov edx,79786017
006E6776    C1E9 02       shr ecx,2
006E6779    83E9 02       sub ecx,2
006E677C    83F9 00       cmp ecx,0
006E677F    7C 1A         jl short 1.006E679B
006E6781    8B048E        mov eax,dword ptr ds:[esi+ec>
006E6784    8B5C8E 04     mov ebx,dword ptr ds:[esi+ec>
006E6788    03C3          add eax,ebx
006E678A    C1C8 08       ror eax,8
006E678D    03C2          add eax,edx
006E678F    81C2 A6576D3C add edx,3C6D57A6
006E6795    89048E        mov dword ptr ds:[esi+ecx*4]>
006E6798    49            dec ecx
006E6799  ^ EB E1         jmp short 1.006E677C
006E679B    61            popad                        <====在这里下断,Shift+F9后程序停在这里
006E679C    61            popad
006E679D    C3            retn

然后用F8走,RETN后Ctrl+T设置暂停运行跟踪条件将命令是一个复选框打勾,填入  PUSH EBP ,确定。
Ctrl+F11跟踪进入

0040464C    55             push ebp                <====程序停在这里,不知道这个是不是OEP
0040464D    8BEC           mov ebp,esp
0040464F    53             push ebx
00404650    56             push esi
00404651    57             push edi
00404652    A1 40F65A00    mov eax,dword ptr ds:[5AF640>
00404657    85C0           test eax,eax
00404659    74 4B          je short 1.004046A6
0040465B    8B30           mov esi,dword ptr ds:[eax]
0040465D    E8 CC192D00    call 1.006D602E
00404662    33D2           xor edx,edx
00404664    55             push ebp
00404665    68 92464000    push 1.00404692
0040466A    64:FF32        push dword ptr fs:[edx]
0040466D    64:8922        mov dword ptr fs:[edx],esp
00404670    3BF3           cmp esi,ebx
00404672    7E 14          jle short 1.00404688
00404674    8B04DF         mov eax,dword ptr ds:[edi+eb>
00404677    43             inc ebx
00404678    891D 44F65A00  mov dword ptr ds:[5AF644],eb>
0040467E    85C0           test eax,eax
00404680    74 02          je short 1.00404684
00404682    FFD0           call eax
00404684    3BF3           cmp esi,ebx
00404686  ^ 7F EC          jg short 1.00404674
00404688    33C0           xor eax,eax
0040468A    5A             pop edx
0040468B    59             pop ecx
0040468C    59             pop ecx
0040468D    64:8910        mov dword ptr fs:[eax],edx
00404690    EB 14          jmp short 1.004046A6
00404692  ^ E9 1DFAFFFF    jmp 1.004040B4
00404697    E8 50FFFFFF    call 1.004045EC
0040469C    E8 27FDFFFF    call 1.004043C8
004046A1    E8 76FDFFFF    call 1.0040441C
004046A6    5F             pop edi
004046A7    5E             pop esi
004046A8    5B             pop ebx
004046A9    5D             pop ebp
004046AA    C3             retn

在0040464C处脱壳的话用 ImportREC 没办法修复。
小弟愚昧请各位大侠指点!!!谢谢

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 898
活跃值: (4039)
能力值: ( LV9,RANK:3410 )
在线值:
发帖
回帖
粉丝
2
记住:发贴前先搜索看雪论坛精华合集
2005-6-13 21:10
0
游客
登录 | 注册 方可回帖
返回
//