好友
阅读权限100
听众
最后登录1970-1-1
|
A-new
发表于 2008-9-21 22:12
沙发,站位 [s:40] ……
载入OD 0040955C > 60 pushad 0040955D EB 04 jmp short 00409563 0040955F 625CE9 F1 bound ebx, qword ptr [ecx+ebp*8-F] 00409563 87EB xchg ebx, ebp 00409565 EB 03 jmp short 0040956A 00409567 ^ E0 BB loopdne short 00409524 00409569 B8 87EB83EC mov eax, EC83EB87
这里 0040B141 83C1 FF add ecx, -1 0040B144 ^ 75 A1 jnz short 0040B0E7 0040B146 EB 47 jmp short 0040B18F F4
和这里 0040B1E2 /75 20 jnz short 0040B204 0040B1E4 |8178 04 726F634>cmp dword ptr [eax+4], 41636F72 0040B1EB |75 17 jnz short 0040B204 0040B1ED |8178 08 6464726>cmp dword ptr [eax+8], 65726464 0040B1F4 |75 0E jnz short 0040B204 0040B1F6 |66:8178 0C 7373 cmp word ptr [eax+C], 7373 0040B1FC |75 06 jnz short 0040B204 0040B1FE |8078 0E 00 cmp byte ptr [eax+E], 0 0040B202 |74 03 je short 0040B207 0040B204 \41 inc ecx 0040B205 ^ EB D0 jmp short 0040B1D7 0040B207 8B46 24 mov eax, dword ptr [esi+24] F4,不然要按N久F8
直到这里,除了上面注意的两除外,一直F8,见call就F7,(下面没有特殊说明,一直F8) 0040B26A 55 push ebp ; kernel32.7C800000 0040B26B FFD6 call esi 0040B26D FFD0 call eax 0040B26F 890424 mov dword ptr [esp], eax 0040B272 E8 0C000000 call 0040B283 F7 0040B277 43 inc ebx 0040B278 6C ins byte ptr es:[edi], dx
到这里0040B283 55 push ebp ; kernel32.7C800000 0040B284 FFD6 call esi 0040B286 FFD0 call eax 0040B288 6A 00 push 0 0040B28A E8 0B000000 call 0040B29A F7 0040B28F 45 inc ebp
来到这里,这里比较重要0040B29A 55 push ebp ; kernel32.7C800000 0040B29B FFD6 call esi 0040B29D FFD0 call eax 0040B29F 55 push ebp 0040B2A0 FFD6 call esi 0040B2A2 8BF8 mov edi, eax F2下断点,然后F9,然后在取消断点,继续单步
到这里之前见call就F70040B2DC 55 push ebp ; kernel32.7C800000 0040B2DD FFD6 call esi 0040B2DF FFD0 call eax 0040B2E1 85C0 test eax, eaxF2下断点,然后F9,然后在取消断点,继续单步0040B2E3 ^ 74 D4 je short 0040B2B9
同上0040B31A 55 push ebp ; kernel32.7C800000 0040B31B FFD6 call esi 0040B31D FFD0 call eax 0040B31F 85C0 test eax, eax F2下断点,然后F9,然后在取消断点,继续单步 0040B321 ^ 75 D4 jnz short 0040B2F7
继续同上0040B364 55 push ebp ; kernel32.7C800000 0040B365 FFD6 call esi 0040B367 FFD0 call eax 0040B369 58 pop eax F2下断点,然后F9,然后在取消断点,继续单步0040B36A EB 04 jmp short 0040B370
见call就F7,这里注意一下0040B4CF 85C9 test ecx, ecx 0040B4D1 ^ 0F85 60FFFFFF jnz 0040B437 0040B4D7 57 push edi F2下断点,然后F9,然后在取消断点,继续单步
这种call就不要跟进了0040B5C7 50 push eax 0040B5C8 FFD7 call edi 这种call 0040B5CA 83EC 04 sub esp, 4 0040B5CD 50 push eax 0040B5CE 33DB xor ebx, ebx 0040B5D0 8B45 00 mov eax, dword ptr [ebp] 0040B5D3 8B8418 00004000 mov eax, dword ptr [eax+ebx+400000] 0040B5DA A9 00000080 test eax, 80000000 0040B5DF 74 07 je short 0040B5E8 0040B5E1 25 FFFF0000 and eax, 0FFFF 0040B5E6 EB 09 jmp short 0040B5F1 0040B5E8 85C0 test eax, eax 0040B5EA 74 1D je short 0040B609 0040B5EC 05 02004000 add eax, 00400002 0040B5F1 894424 04 mov dword ptr [esp+4], eax 0040B5F5 FFD6 call esi 0040B5F7 83EC 08 sub esp, 8 0040B5FA 8B4D 10 mov ecx, dword ptr [ebp+10] 0040B5FD 898419 00004000 mov dword ptr [ecx+ebx+400000], eax 0040B604 83C3 04 add ebx, 4 0040B607 ^ EB C7 jmp short 0040B5D0 0040B609 83C4 08 add esp, 8 0040B60C 83C5 14 add ebp, 14 0040B60F 837D 10 00 cmp dword ptr [ebp+10], 0 0040B613 ^ 75 A9 jnz short 0040B5BE 0040B615 E8 01000000 call 0040B61B这个Call跟进哦
00400160FF13calldword ptr [ebx]; UnPackMe.004001E8 这种call也不要跟进
直到这里
004001C995xchgeax, ebp
004001CA8B07mov eax, dword ptr [edi]
004001CC40inc eax
004001CD^ 78 F3 jsshort 004001C2
004001CF75 03 jnz short 004001D4
004001D1FF63 0C jmp dword ptr [ebx+C]
004001D450pusheax
004001D555pushebp
004001D6FF53 14 calldword ptr [ebx+14]
004001D9ABstosdword ptr es:[edi]
004001DA^ EB EE jmp short 004001CA
004001DC33C9xor ecx, ecx
这段代码一直在红色部分循环,
004001D1FF63 0C jmp dword ptr [ebx+C]
这里是个大跳转,F2下断,F9运行,单步一下,哈哈,就到传说中的OEP了
0040170055pushebp;传说中的OEP
004017018BECmov ebp, esp
004017036A FF push-1
0040170568 00254000 push00402500
0040170A68 86184000 push00401886 ; jmp 到 msvcrt._except_handler3
0040170F64:A1 00000000mov eax, dword ptr fs:[0]
0040171550pusheax
0040171664:8925 0000000>mov dword ptr fs:[0], esp
dump,记下OEP 1700,打开修表工具,OEP处填1700
接下来是找输入表,在OD中随便找一个API函数,右键-数据窗口跟随-内存地址,为了容易看,数据窗口设置一下(右键-长型-地址)
是不是看到函数了,上下翻翻,找到起始位置00401FFC 到 004021E4
Ok,在RAV处填 1FFC , SIZE:1E8,获取,Cut无效滴,修复,嘎嘎,大功告成!
UnPacked.rar
UnPacked.rar |
|