看了FLY的脱壳文章,就找了个DLL来炼炼手。。遇到了一些问题,希望大侠们能给予解答
OD载入DLL
设置Ollydbg忽略所有的异常选项。插件去掉Ollydbg的调试器标志。
100A1A93 Ry>/$ 55 push ebp //进入OD后停在这
100A1A94 |. 8BEC mov ebp,esp
100A1A96 |. 53 push ebx ; Rydll32.<ModuleEntryPoint>
100A1A97 |. 8B5D 08 mov ebx,dword ptr ss:[ebp+8] ; Rydll32.<ModuleEntryPoint>
100A1A9A |. 56 push esi
100A1A9B |. 8B75 0C mov esi,dword ptr ss:[ebp+C] ; Rydll32.10000000
下断:BP GetModuleHandleA+5,Shift+F9运行,注意看堆栈:
-----------------------------------------------------------------------
0006BFA8 0098BD5B 返回到 0098BD5B 来自 kernel32.GetModuleHandleA
0006BFAC 0099D6C8 ASCII "kernel32.dll"
0006BFB0 0099E67C ASCII "VirtualAlloc"
0006BFA8 0098BD78 返回到 0098BD78 来自 kernel32.GetModuleHandleA
0006BFAC 0099D6C8 ASCII "kernel32.dll"
0006BFB0 0099E670 ASCII "VirtualFree"
0006BD20 00976F17 返回到 00976F17 来自 kernel32.GetModuleHandleA
0006BD24 0006BE5C ASCII "kernel32.dll" 返回★
----------------------------------------------------------------------
00976F17 8B0D C0119A00 mov ecx,dword ptr ds:[9A11C0]//返回这里
00976F1D 89040E mov dword ptr ds:[esi+ecx],eax ; kernel32.77E40000
00976F20 A1 C0119A00 mov eax,dword ptr ds:[9A11C0]
00976F25 393C06 cmp dword ptr ds:[esi+eax],edi
00976F28 75 16 jnz short 00976F40
00976F2A 8D85 B4FEFFFF lea eax,dword ptr ss:[ebp-14C]
00976F30 50 push eax ; kernel32.77E40000
00976F31 FF15 DC809900 call dword ptr ds:[9980DC] ; kernel32.LoadLibraryA
00976F37 8B0D C0119A00 mov ecx,dword ptr ds:[9A11C0]
00976F3D 89040E mov dword ptr ds:[esi+ecx],eax ; kernel32.77E40000
00976F40 A1 C0119A00 mov eax,dword ptr ds:[9A11C0]
00976F45 393C06 cmp dword ptr ds:[esi+eax],edi
00976F48 0F84 AD000000 je 00976FFB //Magic Jump ★ 改为JMP!
00976F4E 33C9 xor ecx,ecx ; kernel32.77E5A7BF
00976F50 8B03 mov eax,dword ptr ds:[ebx]
00976F52 3938 cmp dword ptr ds:[eax],edi
00976F54 74 06 je short 00976F5C
00976F56 41 inc ecx ; kernel32.77E5A7BF
Alt+M打开内存查看窗口,看到这个DLL的给个区段
10000000 00001000 (4096.) Rydll32 10000000 PE header
10001000 00004000 (16384.) Rydll32 10000000 .text //★ 这里下 内存访问 断点
10005000 00001000 (4096.) Rydll32 10000000 .rdata data,exports
10006000 00001000 (4096.) Rydll32 10000000 .data
10007000 00001000 (4096.) Rydll32 10000000 .reloc
10008000 00077000 (487424.) Rydll32 10000000
1007F000 00030000 (196608.) Rydll32 10000000 .text1 code
100AF000 00010000 (65536.) Rydll32 10000000 .adata
100BF000 00010000 (65536.) Rydll32 10000000 .data1 imports
100CF000 00010000 (65536.) Rydll32 10000000 .reloc1 relocations
100DF000 000B0000 (720896.) Rydll32 10000000 .pdata Imag 01001002
F9运行,程序运行了,请问不是在这里下内存断点吗?
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课