Hey guys, could you help me out here.
The following procedure is crashing my PC, meaning its is crashing all the processes it is injected into.
The following procedure is crashing my PC, meaning its is crashing all the processes it is injected into.
Code: Select all
I think it's the offsets, $68 and $C3, they are from the 32bit version, which works fine, but I could I convert them to 64bit Offsets. I hope I am clear enough. Comment if you need to see more code. ThanksProcedure SetHook();
var
Bytes: SIZE_T;
begin
PtrZwq := GetProcAddress(GetModuleHandle('ntdll.dll'),
'ZwQuerySystemInformation');
ReadProcessMemory(INVALID_HANDLE_VALUE, PtrZwq, @OldZwq, SizeOf(OldCode), Bytes);
JmpZwq.PuhsOp := $68;
JmpZwq.PushArg := @NewZwQuerySystemInformation;
JmpZwq.RetOp := $C3;
ShowMessage('Puhs Value = '+IntToStr(JmpZwq.PuhsOp));
ShowMessage('Ret Value = '+IntToStr(JmpZwq.RetOp));
WriteProcessMemory(INVALID_HANDLE_VALUE, PtrZwq, @JmpZwq, SizeOf(far_jmp), Bytes);
end;