如题,本人菜鸟,望给个具体方法,谢谢- -

解决方案 »

  1.   

    直接注入
    procedure Inject(ProcessHandle: longword; EntryPoint: pointer); 
    var 
    Module, NewModule: Pointer; 
    Size, BytesWritten, TID: longword; 
    Begin 
    //这里得到的值为一个返回指针型变量,指向内容包括进程映像的基址 
    Module := Pointer(GetModuleHandle(nil)); 
    / /得到内存映像的长度 
    Size:=PImageOptionalHeader 
    (Pointer(integer(Module)+PImageDosHeader(Module)._lfanew+SizeOf(dword)+SizeOf(TImageFileHeader))).SizeOfImage; 
    //在Exp进程的内存范围内分配一个足够长度的内存 
    VirtualFreeEx(ProcessHandle, Module, 0, MEM_RELEASE); 
    //确定起始基址和内存映像基址的位置 
    NewModule := VirtualAllocEx(ProcessHandle, Module, Size, MEM_COMMIT or MEM_RESERVE, PAGE_EXECUTE_READWRITE); 
    //开始写内存 
    WriteProcessMemory(ProcessHandle, NewModule, Module, Size, BytesWritten); 
    //创建远程线程 
    CreateRemoteThread(ProcessHandle, nil, 0, EntryPoint, Module, 0, TID); 
    end;