Vou postar uma função de dll injection
var
Aboult : Cardinal;
aboultx : Cardinal;
aboultdll : String;
dll : Pointer;
begin
aboultdll := 'localdadll';
Aboult := 3052 ;
aboultx:= OpenProcess(PROCESS_ALL_ACCESS, false, Aboult);
dll := VirtualAllocEx(aboultx, 0, length(aboultdll), MEM_COMMIT,PAGE_EXECUTE_READWRITE);
WriteProcessMemory(aboultx, dll, PChar(aboultdll), length(aboultdll), bw);
CreateRemoteThread(aboultx, nil, 0, GetProcAddress(GetModuleHandle('kernel32.dll'),'Lo adLibraryA'), dll, 0, aboultx);
No exemplo acima ele ja loada a dll no processo
A parte em negrito deve ser editada com o local da dll
Creditos: Google
var
Aboult : Cardinal;
aboultx : Cardinal;
aboultdll : String;
dll : Pointer;
begin
aboultdll := 'localdadll';
Aboult := 3052 ;
aboultx:= OpenProcess(PROCESS_ALL_ACCESS, false, Aboult);
dll := VirtualAllocEx(aboultx, 0, length(aboultdll), MEM_COMMIT,PAGE_EXECUTE_READWRITE);
WriteProcessMemory(aboultx, dll, PChar(aboultdll), length(aboultdll), bw);
CreateRemoteThread(aboultx, nil, 0, GetProcAddress(GetModuleHandle('kernel32.dll'),'Lo adLibraryA'), dll, 0, aboultx);
No exemplo acima ele ja loada a dll no processo
A parte em negrito deve ser editada com o local da dll
Creditos: Google