|
|
|
[注意]关于如何脱壳 (新手会遇到的问题),欢迎能者指导!
脱ASPACK没这么麻烦吧,还是工具的问题。解决了就好。 |
|
[注意]关于如何脱壳 (新手会遇到的问题),欢迎能者指导!
恢复原来的olldbg.INI文件吧 |
|
|
|
[求助]5KB的程序都搞不定
能运行就说明你用的脱壳机把OEP部分处理好了。 |
|
[求助]老鸟教我脱一下
粗略分析了注册码,列如下地址供参考: 我采用带壳跟踪法跟注册码,这样也不用脱壳了。貌似有网络验证的。 说实话,E语言跟着真累,大量的垃圾指令,不停的调用,和VB差不多,执行效率比VB略好点。 005C8140 E8 BCF5FFFF call unpacked.005C7701 005C8145 83C4 18 add esp,18 005C8148 8945 E4 mov dword ptr ss:[ebp-1C],eax ;“注册码”字样出现 005C814B 8B5D FC mov ebx,dword ptr ss:[ebp-4] 005C814E 85DB test ebx,ebx 005C8150 74 09 je short unpacked.005C815B 005C8152 53 push ebx 005C8153 E8 AABC0900 call unpacked.00663E02 005C8158 83C4 04 add esp,4 005C815B 8B5D F8 mov ebx,dword ptr ss:[ebp-8] 005C815E 85DB test ebx,ebx 005C8160 74 09 je short unpacked.005C816B 01669700 8B91 14020000 mov edx,dword ptr ds:[ecx+214] ds:[016FEDBC]=00000008 edx=0012F430 注册码位数 01669706 8B81 14020000 mov eax,dword ptr ds:[ecx+214] 0166970C C1EA 03 shr edx,3 0166970F 85C0 test eax,eax 01669711 75 04 jnz short krnln.01669717 注册码不为空,跳 01669713 33C0 xor eax,eax 01669715 EB 06 jmp short krnln.0166971D 01669717 8B81 0C020000 mov eax,dword ptr ds:[ecx+20C] 0166971D 33C9 xor ecx,ecx 0166971F 56 push esi 01669720 85D2 test edx,edx 01669722 7E 15 jle short krnln.01669739 01669724 8B7424 08 mov esi,dword ptr ss:[esp+8] 01669728 3B30 cmp esi,dword ptr ds:[eax] 0166972A 72 05 jb short krnln.01669731 0166972C 3B70 04 cmp esi,dword ptr ds:[eax+4] 0166972F 72 0E jb short krnln.0166973F 01669731 83C0 08 add eax,8 01669734 41 inc ecx 01669735 3BCA cmp ecx,edx 01669737 ^ 7C EF jl short krnln.01669728 01669739 33C0 xor eax,eax 0166973B 5E pop esi 0166973C C2 0400 retn 4 0063154B 8945 F0 mov dword ptr ss:[ebp-10],eax eax=017A0028, (ASCII "12345678") 堆栈 ss:[0012F474]=017A41D0 输入的注册码进来了 0063154E 8B5D F4 mov ebx,dword ptr ss:[ebp-C] 00631551 85DB test ebx,ebx 00631553 74 09 je short unpacked.0063155E 00631555 53 push ebx 00631556 E8 A7280300 call unpacked.00663E02 00631858 8945 FC mov dword ptr ss:[ebp-4],eax 0063185B 837D FC 00 cmp dword ptr ss:[ebp-4],0 0063185F 0F85 07000000 jnz unpacked.0063186C 00631865 C745 FC 15CD5B07 mov dword ptr ss:[ebp-4],75BCD15 0063186C DB45 FC fild dword ptr ss:[ebp-4] 堆栈 ss:[0012F3F0]=50549680 (十进制 1347720832.) 0063186F DD5D F4 fstp qword ptr ss:[ebp-C] 00631872 DD45 F4 fld qword ptr ss:[ebp-C] 00631875 DC0D E6C34000 fmul qword ptr ds:[40C3E6] 0063187B DD5D EC fstp qword ptr ss:[ebp-14] 0063187E 68 01060080 push 80000601 00631883 FF75 F0 push dword ptr ss:[ebp-10] 00631886 FF75 EC push dword ptr ss:[ebp-14] 00631889 68 01000000 push 1 0063188E BB 5C000000 mov ebx,5C 00631893 E8 76250300 call unpacked.00663E0E 00631898 83C4 10 add esp,10 0063189B 68 01060080 push 80000601 006318A0 52 push edx 006318A1 50 push eax 006318A2 68 01000000 push 1 006318A7 BB 68010000 mov ebx,168 006318AC E8 5D250300 call unpacked.00663E0E 006318B1 83C4 10 add esp,10 006318B4 8945 E0 mov dword ptr ss:[ebp-20],eax 006318B7 8B45 E0 mov eax,dword ptr ss:[ebp-20] 006318BA E9 00000000 jmp unpacked.006318BF 006318BF 8BE5 mov esp,ebp 006318C1 5D pop ebp 006318C2 C3 retn 006318B7 8B45 E0 mov eax,dword ptr ss:[ebp-20] 堆栈 ss:[0012F3D4]=017A6240, (ASCII "12129487488") eax=017A6240, (ASCII "12129487488") 机器码进来了 006318BA E9 00000000 jmp unpacked.006318BF 006318BF 8BE5 mov esp,ebp 006318C1 5D pop ebp 006318C2 C3 retn 006316A4 8D45 D8 lea eax,dword ptr ss:[ebp-28] 堆栈地址=0012F438 eax=017A5E01, (ASCII "44B42011833F1925DB6B3CD00C795350FAAEA7A5D3F98C8B83D0E64BB49DE38F2E1CC90AEFC65A13EBD59CC91E966021E55249928A4940C391ECAC469554AE834B91FC7A7DC3FB21B6291A5AD392D23B5A59925ED85F0F0DA72328B07A5F935095092890B93B35599DADEF7D736DFE2") 这里注册码运算了,后面还有部分运算来计算,好麻烦 006316A7 50 push eax 006316A8 E8 16020000 call unpacked.006318C3 006316AD 8945 D0 mov dword ptr ss:[ebp-30],eax 006316B0 8955 D4 mov dword ptr ss:[ebp-2C],edx 006316B3 8B5D D8 mov ebx,dword ptr ss:[ebp-28] 006316B6 85DB test ebx,ebx 006316B8 74 09 je short unpacked.006316C3 006316BA 53 push ebx 006316BB E8 42270300 call unpacked.00663E02 006316C0 83C4 04 add esp,4 006316C3 C745 CC 00000000 mov dword ptr ss:[ebp-34],0 0063178C 33C9 xor ecx,ecx 0063178E 41 inc ecx 0063178F 51 push ecx 00631790 50 push eax 00631791 3BC8 cmp ecx,eax 00631793 0F8F 4C000000 jg unpacked.006317E5 00631799 B8 C77F4C00 mov eax,unpacked.004C7FC7 ; ASCII "{ 213, 230 }" 0063179E 8945 E4 mov dword ptr ss:[ebp-1C],eax 006317A1 8D45 E4 lea eax,dword ptr ss:[ebp-1C] 006317A4 50 push eax 006317A5 E8 792D0000 call unpacked.00634523 006317AA 8945 E0 mov dword ptr ss:[ebp-20],eax 006317AD 8B5D E4 mov ebx,dword ptr ss:[ebp-1C] 006317B0 85DB test ebx,ebx 006317B2 74 09 je short unpacked.006317BD 006317B4 53 push ebx 006317B5 E8 48260300 call unpacked.00663E02 006317BA 83C4 04 add esp,4 006317BD 8D45 E0 lea eax,dword ptr ss:[ebp-20] 006317C0 50 push eax 006317C1 E8 AF300000 call unpacked.00634875 到这里就出注册失败了 |
|
|
|
|
|
|
|
[求助]老鸟教我脱一下
这个附加数据就是壳代码,没必要多研究了,到IAT替换前程序就已经把脱好的附加数据直接定位到内存了。 跳过了MAGIC JMP,拿到了OEP和修复的IAT数据,当然就开始动手DUMP和IAT修复了。 顺道说一下,这例中附加数据最简单的拿法是在系统TEMP目录里找那个EPE文件就是了。 |
|
[求助]蜀门加的是什么壳??
自己更新下PEID代码特征库查吧。不自己动手,是消化不了学到的知识的。 |
|
[求助]我需要邀请码
没学习的成果和知识,转正了也是白搭。 |
|
[分享]我要转正了
转正只要把KX攒够就好了,重在交流和学习。 |
|
[求助]老鸟教我脱一下
文件运行后自动升级了。汗。 升级完成后再看壳。外壳还是ASPACK的,不过内壳变了,成了EncryptPE了,我对yoda's Protector没什么研究,不知道是不是这种壳。粗略分析了一下,有IAT替换操作,看来脱内壳要修复IAT了。如下是分析代码的粗略过程。 载入后,F7一直跟下去,很快就有发现了 0066E205 FF55 04 call dword ptr ss:[ebp+4] ; KERNEL32.GetTempPathA 这里开始取系统的TEMP目录了 0066E208 83F8 04 cmp eax,4 0066E20B 0F8C 07010000 jl unpacked.0066E318 0066E211 01E8 add eax,ebp 0066E213 83C0 23 add eax,23 0066E216 8A10 mov dl,byte ptr ds:[eax] 0066E218 80FA 5C cmp dl,5C 0066E21B 74 04 je short unpacked.0066E221 0066E21D 40 inc eax 0066E21E C600 5C mov byte ptr ds:[eax],5C 0066E221 31C9 xor ecx,ecx 0066E223 8A9429 29010000 mov dl,byte ptr ds:[ecx+ebp+129] 0066E22A 885401 01 mov byte ptr ds:[ecx+eax+1],dl 0066E22E 80FA 00 cmp dl,0 0066E236 8B85 49010000 mov eax,dword ptr ss:[ebp+149] 这里开始计算定位数据了,取文件名。 ss:[0066E153]=0007A200 eax=0066E03D (unpacked.0066E03D), ASCII "\V220080618.EPE" 0066E25C 50 push eax ; unpacked.0066E02E overlay部分生成的文件的绝对路径拿到了 eax=0066E02E (unpacked.0066E02E), ASCII "C:\WINDOWS\TEMP\V220080618.EPE" 0066E25D FF55 08 call dword ptr ss:[ebp+8] 开始从文件中读取数据,调用CreateFileA函数 ss:[0066E012]=7C801A24 (KERNEL32.CreateFileA) 0066E260 83F8 FF cmp eax,-1 0066E263 74 67 je short unpacked.0066E2CC 0066E265 50 push eax 0066E266 6A 00 push 0 0066E268 8B8D 49010000 mov ecx,dword ptr ss:[ebp+149] 0066E26E 51 push ecx 0066E26F 6A 00 push 0 0066E271 6A 04 push 4 0066E273 6A 00 push 0 0066E275 50 push eax 0066E276 FF55 0C call dword ptr ss:[ebp+C] ; KERNEL32.CreateFileMappingA 堆栈操作,保存现场,执行文件映射地址的准备CreateFileMappingA 0066E279 83F8 00 cmp eax,0 0066E27C 74 4B je short unpacked.0066E2C9 0066E27E 50 push eax 0066E27F 8B8D 49010000 mov ecx,dword ptr ss:[ebp+149] 0066E285 51 push ecx 0066E286 6A 00 push 0 0066E288 6A 00 push 0 0066E28A 68 1F000F00 push 0F001F 0066E28F 50 push eax 0066E290 FF55 10 call dword ptr ss:[ebp+10] 文件映射完成,映射的文件头地址已经得出 eax=00830000, (ASCII "MZP") 0066E293 83F8 00 cmp eax,0 0066E296 74 2E je short unpacked.0066E2C6 0066E2B5 8A16 mov dl,byte ptr ds:[esi] 0066E2B7 32D6 xor dl,dh 0066E2B9 8810 mov byte ptr ds:[eax],dl 0066E2BB 46 inc esi 0066E2BC 40 inc eax 0066E2BD 49 dec ecx 0066E2BE 83F9 00 cmp ecx,0 0066E2C1 ^ 75 F2 jnz short unpacked.0066E2B5 这个循环是检验映射地址内的PE文件头标志“MZP” 0066E2CC 89E8 mov eax,ebp 0066E2CE 83C0 24 add eax,24 0066E2D1 50 push eax 0066E2D2 FF55 1C call dword ptr ss:[ebp+1C] ; KERNEL32.LoadLibraryA 0066E2D5 83F8 00 cmp eax,0 开始装配PE文件头和映射代码了这里看EAX eax=71120000 (V2200806.71120000), ASCII "MZP" 0066E2D8 74 3E je short unpacked.0066E318 0066E2DA 89C3 mov ebx,eax 0066E2DC 89E8 mov eax,ebp 0066E2DE 05 3A010000 add eax,13A 0066E2E3 50 push eax ; unpacked.0066E144 eax=0066E144 (unpacked.0066E144), ASCII "EncryptPE_Init" 0066E2E4 53 push ebx EBX 71120000 ASCII "MZP" 0066E2E5 FF542F 04 call dword ptr ds:[edi+ebp+4] 0066E2E9 83F8 00 cmp eax,0 0066E2EC 74 2A je short unpacked.0066E318 这里就是送参数入栈,准备替换API地址了。注意EAX是准备替换的虚拟函数名,EBX是文件头基址 整理一下: 0066E2CC 89E8 mov eax,ebp 0066E2CE 83C0 24 add eax,24 0066E2D1 50 push eax 0066E2D2 FF55 1C call dword ptr ss:[ebp+1C] 0066E2D5 83F8 00 cmp eax,0 0066E2D8 74 3E je short unpacked.0066E318 0066E2DA 89C3 mov ebx,eax 0066E2DC 89E8 mov eax,ebp 0066E2DE 05 3A010000 add eax,13A 0066E2E3 50 push eax 0066E2E4 53 push ebx 0066E2E5 FF542F 04 call dword ptr ds:[edi+ebp+4] 0066E2E9 83F8 00 cmp eax,0 0066E2EC 74 2A je short unpacked.0066E318 0066E2EE 8945 00 mov dword ptr ss:[ebp],eax 0066E2F1 89EB mov ebx,ebp 0066E2F3 81C3 52010000 add ebx,152 0066E2F9 8B8D 4D010000 mov ecx,dword ptr ss:[ebp+14D] 0066E2FF 01CB add ebx,ecx 0066E301 8B8D 49010000 mov ecx,dword ptr ss:[ebp+149] 0066E307 01CB add ebx,ecx 0066E309 53 push ebx 0066E30A EB 0A jmp short unpacked.0066E316 0066E30C B3 FF mov bl,0FF 0066E30E DAAE A0FCFA0E fisubr dword ptr ds:[esi+EFAFCA0> 0066E314 6207 bound eax,qword ptr ds:[edi] 0066E316 FFD0 call eax ; V2200806.EncryptPE_Init 0066E318 6A 00 push 0 0066E31A FF55 20 call dword ptr ss:[ebp+20] 0066E2EE 8945 00 mov dword ptr ss:[ebp],eax eax=7120A1CC (V2200806.EncryptPE_Init) ss:[0066E00A]=7C800000 (KERNEL32.7C800000) 这里开始替换函数了。原理是在系统的TEMP目录中生成一个V220080618.EPE文件,也就是程序中overlay的内容,以其内容作为虚拟文件头,通过内存映射的方法连接到代码的顶端,用这段代码中的函数地址替换系统的API函数地址。所以 0066E2D8 74 3E je short unpacked.0066E318 可能就是MAGIC JMP了,想要拿到能修复的IAT数据必须JMP跳过去 0066E2EC 74 2A je short unpacked.0066E318 这里一样也不能忽视 0066E2F1 89EB mov ebx,ebp 0066E2F3 81C3 52010000 add ebx,152 0066E2F9 8B8D 4D010000 mov ecx,dword ptr ss:[ebp+14D] 0066E2FF 01CB add ebx,ecx 0066E301 8B8D 49010000 mov ecx,dword ptr ss:[ebp+149] 0066E307 01CB add ebx,ecx 0066E309 53 push ebx 0066E30A EB 0A jmp short unpacked.0066E316 0066E30C B3 FF mov bl,0FF 0066E30E DAAE A0FCFA0E fisubr dword ptr ds:[esi+EFAFCA0> 0066E314 6207 bound eax,qword ptr ds:[edi] 0066E316 FFD0 call eax 0066E318 6A 00 push 0 0066E31A FF55 20 call dword ptr ss:[ebp+20] 0066E31D CC int3 思路是阻止壳替换API函数地址,拿到修复的IAT数据。 根据ESP定律,断在了 006E86F3 - E9 A7B1D1FF jmp unpacked.0040389F 这里就是跳转到OEP入口了,所以OEP是40389F。原来程序是VC++的,还真幸运,OEP没有被偷代码。 0040389F 55 push ebp 004038A0 8BEC mov ebp,esp 004038A2 6A FF push -1 004038A4 68 F8724000 push unpacked.004072F8 004038A9 68 04554000 push unpacked.00405504 004038AE 64:A1 00000000 mov eax,dword ptr fs:[0] 004038B4 50 push eax 004038B5 64:8925 00000000 mov dword ptr fs:[0],esp 004038BC 83EC 58 sub esp,58 004038BF 53 push ebx 004038C0 56 push esi 004038C1 57 push edi 004038C2 8965 E8 mov dword ptr ss:[ebp-18],esp 004038C5 90 nop 004038C6 E8 3B522E00 call unpacked.006E8B06 |
|
|
|
[建议]奇怪的现象!!!
谢谢老大指明了方向。感谢! |
|
[求助]老鸟教我脱一下
感觉象是ASPACK的外壳, ASPROTECT的内壳,跟到这里的ASPROTECT特征太明显了。 用ESP定律把ASPACK脱了(注意有附加数据overlay),再脱ASPROTECT吧。但脱了ASPACK提示有木马,汗! 0071EB54 68 01EC7100 push baobaoqu.0071EC01 0071EB59 E8 01000000 call baobaoqu.0071EB5F 0071EB5E C3 retn 0071EB5F C3 retn 0071EB60 BA ECC67D72 mov edx,727DC6EC 0071EB65 E4 29 in al,29 0071EB67 E4 68 in al,68 0071EB69 0F1533 unpckhps xmm6,dqword ptr ds:[ebx> 0071EB6C CF iretd 0071EB6D 7B C0 jpo short baobaoqu.0071EB2F 0071EB6F F1 int1 0071EB70 A5 movs dword ptr es:[edi],dword pt> 0071EB71 97 xchg eax,edi 0071EB72 826CF7 03 01 sub byte ptr ds:[edi+esi*8+3],1 0071EB77 68 F766AB7A push 7AAB66F7 0071EB7C 7F 6D jg short baobaoqu.0071EBEB 0071EB7E C540 D8 lds eax,fword ptr ds:[eax-28] 0071EB81 2986 E5EC6B01 sub dword ptr ds:[esi+16BECE5],e> 0071EB87 8F ??? ; 未知命令 0071EB88 33DB xor ebx,ebx |
|
|
|
[求助]遇到没地方输注册码的软件怎么破?
模拟一个KEY文件,再下文件断点。分析KEY文件的比对过程,注意过程中的EAX和ECX值。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值