EP_X0FF wrote:https://github.com/rwfpl/rewolf-wow64ext
I've had few problems on few machines. It was crashing at X64Call on few Win8 machines.
Anyway, another solution is to call NtWow64GetNativeSystemInformation.
Code: Select allNTSTATUS NTAPI
NtWow64GetNativeSystemInformation(
SYSTEM_INFORMATION_CLASS SystemInformationClass,
PVOID SystemInformation,
ULONG SystemInformationLength,
PULONG ReturnLength
);
Code: Select alltypedef NTSTATUS (NTAPI *tNtWow64GetNativeSystemInformation)
(
SYSTEM_INFORMATION_CLASS SystemInformationClass,
PVOID SystemInformation,
ULONG SystemInformationLength,
PULONG ReturnLength
);
tNtWow64GetNativeSystemInformation NtWow64GetNativeSystemInformation = (tNtWow64GetNativeSystemInformation)GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtWow64GetNativeSystemInformation");
if (NtWow64GetNativeSystemInformation != NULL)
{
NtWow64GetNativeSystemInformation(.....); //call it like NtQuerySystemInformation
}
else
{
OutputDebugStringW(L"We are not on WOW64 !!");
}
This function is exported by wow64 ntdll.dll, get it's pointer using GetProcAddress.
You have to use X64 variable to get driver base address (use ULONGLONG instead of PVOID, which has 4 byte in 32bit process)