![]() |
|
|
#25 |
|
Архивный участник
Join Date: Nov 2004
Posts: 1,405
|
seems to me them chinese did it again... lol
with a l2hook.dll ![]() struct caller_stub { BYTE instr_PUSHA; /* Save all registers */ BYTE instr_PUSH; /* Push the address of the "L2hook.dll" string */ DWORD operand_PUSH; /* To be filled later */ BYTE instr_MOV_EAX; /* Mov the address of the loadlibraryA proc */ DWORD operand_MOV_EAX; /* To be filled later */ WORD instr_CALL_EAX; /* Call the library */ BYTE instr_POPA; /* Restore the registers */ BYTE instr_PUSH2; /* Push the new eip */ DWORD operand_PUSH2; BYTE instr_RET; /* Return to the program - to the new eip */ BYTE data[11]; /* To store the dll name */ caller_stub(): instr_PUSHA(0x60), instr_PUSH(0x68), instr_MOV_EAX(0xB8), instr_CALL_EAX(0xD0FF), instr_POPA(0x61), instr_PUSH2(0x68), operand_PUSH2(0x00063DA60), // Not right instr_RET(0xc3) { /* L2hook.dll - name of the file we load */data[0] = 'L'; data[1] = '2'; data[2] = 'h'; data[3] = 'o'; data[4] = 'o'; data[5] = 'k'; data[6] = '.'; data[7] = 'd'; data[8] = 'l'; data[9] = 'l'; data[10]= 0; } }; 我有几个问题,请知道的指点一下: 1. operand_PUSH2(0x00063DA60), // Not right 这个返回地址到底应该是多少,怎样åŽ »找? 2. operand_PUSH 指向的是DLL路径字符串的地址, stub_struct.operand_PUSH = (DWORD)memory + sizeof(caller_stub) - 12; 照理讲应该是 - 11才对阿, 为什么是12 3 WriteProcessMemory(pi.hProcess, (LPVOID)LOADER_CallerAddr, &offs, 4, &nbytes) LOADER_CallerAddr是怎么确定的. 代码的意思应该是先jump到 stub_struct. 那么把这个offs写入这个地址, 在LOADER_CallerAddr之前是一个Jump指令? 能给我解释一下,十分感谢. 如果怕麻烦,告诉我看那些资料,也同样 感谢 |
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|