简单来说,就是一子线程不断的遍历本机的进程列表,我要阻断它的遍历,过滤掉我不想让它知道的进程,如OD.EXE,就得给它下个钩子。找到了它遍历的代码位置,但这个位置是每次运行时不同的。如何确定知道它的运行时位置呢?
0F75E494 81EC 54010000 sub esp,0x154
0F75E49A A1 20E97D0F mov eax,dword ptr ds:[0xF7DE920]
0F75E49F 56 push esi
0F75E4A0 57 push edi
0F75E4A1 33FF xor edi,edi
0F75E4A3 57 push edi
0F75E4A4 6A 02 push 0x2
0F75E4A6 8945 F0 mov dword ptr ss:[ebp-0x10],eax
0F75E4A9 E8 6A260500 call 0F7B0B18 ; jmp 到 kernel32.CreateToolhelp32Snapshot
0F75E4AE 8BF0 mov esi,eax
0F75E4B0 83FE FF cmp esi,-0x1
0F75E4B3 75 08 jnz short 0F75E4BD
0F75E4B5 33C0 xor eax,eax
0F75E4B7 40 inc eax
0F75E4B8 E9 85000000 jmp 0F75E542
0F75E4BD 8D85 C8FEFFFF lea eax,dword ptr ss:[ebp-0x138]
0F75E4C3 50 push eax
0F75E4C4 56 push esi
0F75E4C5 C785 C8FEFFFF 28010000 mov dword ptr ss:[ebp-0x138],0x128
0F75E4CF E8 3E260500 call 0F7B0B12 ; jmp 到 kernel32.Process32First
0F75E4D4 85C0 test eax,eax
0F75E4D6 75 05 jnz short 0F75E4DD
0F75E4D8 6A 02 push 0x2
0F75E4DA 5F pop edi
0F75E4DB EB 5C jmp short 0F75E539
0F75E4DD 8D85 ECFEFFFF lea eax,dword ptr ss:[ebp-0x114]
0F75E4E3 8985 C4FEFFFF mov dword ptr ss:[ebp-0x13C],eax
0F75E4E9 8B85 D0FEFFFF mov eax,dword ptr ss:[ebp-0x130]
0F75E4EF 8985 C0FEFFFF mov dword ptr ss:[ebp-0x140],eax
0F75E4F5 8D85 C0FEFFFF lea eax,dword ptr ss:[ebp-0x140]
0F75E4FB 50 push eax
0F75E4FC 8D8D A0FEFFFF lea ecx,dword ptr ss:[ebp-0x160]
0F75E502 E8 F7EFFFFF call 0F75D4FE
0F75E507 897D FC mov dword ptr ss:[ebp-0x4],edi
0F75E50A 8B4D 08 mov ecx,dword ptr ss:[ebp+0x8]
0F75E50D 8D85 A0FEFFFF lea eax,dword ptr ss:[ebp-0x160]
0F75E513 50 push eax
0F75E514 E8 31FFFFFF call 0F75E44A
0F75E519 834D FC FF or dword ptr ss:[ebp-0x4],-0x1
0F75E51D 8D8D A0FEFFFF lea ecx,dword ptr ss:[ebp-0x160]
0F75E523 E8 FA7DFFFF call 0F756322
0F75E528 8D85 C8FEFFFF lea eax,dword ptr ss:[ebp-0x138]
0F75E52E 50 push eax
0F75E52F 56 push esi
0F75E530 E8 D7250500 call 0F7B0B0C ; jmp 到 kernel32.Process32Next
0F75E535 85C0 test eax,eax
0F75E537 ^ 75 B0 jnz short 0F75E4E9
0F75E539 56 push esi
0F75E53A FF15 48817B0F call dword ptr ds:[0xF7B8148] ; kernel32.CloseHandle
0F75E540 8BC7 mov eax,edi
0F75E542 8B4D F4 mov ecx,dword ptr ss:[ebp-0xC]
0F75E545 5F pop edi
0F75E546 64:890D 00000000 mov dword ptr fs:[0],ecx
0F75E54D 8B4D F0 mov ecx,dword ptr ss:[ebp-0x10]
0F75E550 5E pop esi
0F75E551 E8 E8080400 call 0F79EE3E
0F75E556 C9 leave
0F75E557 C3 retn
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!