This project provides a lightweight API to invoke NT functions directly from ntdll.dll
without relying on LoadLibrary
or GetProcAddress
. It allows seamless interaction with system-level functions such as NtAllocateVirtualMemory
.
To use the API, follow these steps:
typedef NTSTATUS( __stdcall* NtAllocateVirtualMemory_t )(
HANDLE, PVOID*, ULONG_PTR, PSIZE_T, ULONG, ULONG
);
NtApiExecutor ntdll( L"ntdll.dll", "NtAllocateVirtualMemory" );
const auto NtAllocateVirtualMemory = ntdll.resolveFunction<NtAllocateVirtualMemory_t>();
PVOID memory = nullptr;
SIZE_T size = 1024;
NtAllocateVirtualMemory( GetCurrentProcess(), &memory, 0, &size,
MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE );
[+] Memory allocated at: 0000014ECA570000
git clone https://github.com/Z1KOx/NtExecutorAPI.git