脱壳的目标就是EZIP程序本身。
用TRW载入程序 按两下F10后来到外壳部分代码段:
017F:004582DC INT3017F:004582DD MOV EBP,ESP /TRW的光条停在这里017F:004582DF SUB EBP,0428017F:004582E5 PUSH EBX017F:004582E6 PUSH ESI017F:004582E7 PUSH EDI017F:004582E8 LEA EAX,[EBP+FFFFFC94]017F:004582EE PUSH EAX017F:004582EF CALL 004550F0017F:004582F4 POP ECX017F:004582F5 TEST EAX,EAX017F:004582F7 JNZ 0045868A
这个东西的壳相当简单 比我所见过的任何壳都简单许多 一直按F10单步跟踪就到达了这里:
017F:00458539 PUSH EAX017F:0045853A PUSH DWORD [EBP+FFFFFDEC]017F:00458540 LEA EAX,[EBP+FFFFFC3C]017F:00458546 PUSH EAX017F:00458547 LEA EAX,[EBP+FFFFFC94]017F:0045854D PUSH EAX017F:0045854E CALL 00455005017F:00458553 ADD ESP,BYTE +10017F:00458556 AND DWORD[EBP+FFFFFC34]017F:0045855D JMP SHORT 0045856C /跳到脱壳代码段017F:0045855F MOV EAX,[EBP+FFFFFC34] /标志位-EAX017F:00458565 INC EAX /循环一次后减一017F:00458566 MOV [EBP+FFFFFC34],EAX /压入地址 EBP+FFFFFC34 中017F:0045856C MOV EAX,[EBP+FFFFFBE4] /从这里开始程序开始进行循环 并在内存中脱壳017F:00458572 MOVZX EAX,WORD [EAX+06] /取值017F:00458576 CMP [EBP+FFFFFC34],EAX /对比循环标志017F:0045857C JNC NEAR 0045861F /跳出到45861F的话则循环结束017F:00458582 MOV EAX,[EBP+FFFFFDEC]017F:00458588 MOV EAX,[EAX+0C]017F:0045858B ADD EAX,[EBP+FFFFFBE0]
若没有在 0045857C 处跳出,你就会按F10跟到这里:
017F:004585F5 LEA EAX,[EBP+FFFFFC3C]017F:004585FB PUSH EAX017F:004585FC LEA EAX,[EBP+FFFFFC94]017F:00458602 PUSH EAX017F:00458603 CALL 00455050017F:00458608 ADD ESP,BYTE +18017F:0045860B MOV EAX,[EBP+FFFFFDEC]017F:00458611 ADD EAX,BYTE +28017F:00458614 MOV [EBP+FFFFFDEC],EAX017F:0045861A JMP 0045855F /跳到上面继续进行循环脱壳017F:0045861F PUSH DWORD [EBP+FFFFFDE8]
因此我们知道了这个壳的第一个关键处 就是45857C 只要这个时候下 BPX XXXXXXX (45857C中JNC语句后面的地址) 然后按一下F5 程序就会自动停到循环后的第一个语句处 这时按F10继续跟踪会很快来到这里:
017F:00458662 POP ECX017F:00458663 POP ECX017F:00458664 MOV EAX,[EBP+FFFFFC2C]017F:0045866A MOV EAX,[EAX+10]017F:0045866D MOV ECX,[EBP+FFFFFC2C]017F:00458673 ADD EAX,[ECX+1C]017F:00458676 MOV [EBP+FFFFFC38],EAX017F:0045867C MOV EAX,[EBP+FFFFFC38]017F:00458682 POP EDI017F:00458683 POP ESI017F:00458684 POP EBX017F:00458685 MOV ESP,EBP017F:00458687 POP EBP017F:00458688 JMP EAX /这个就是跳到程序的OEP的JMP017F:0045868A POP EDI
从这个JMP跳出来 哦~~~ 整个世界清净了 重要找到了OEP ^_^ 赶快下命令 MAKEPE ———— 脱壳成功 程序没有对 输入表加密 脱壳后可以夸平台运行了 呵呵 脱壳后的程序370多K 看来这个东西的压缩比还是很高的阿