Files
2024-08-17 13:32:58 -07:00

34 lines
779 B
C

#include <Windows.h>
#include <stdio.h>
// Define NTDLL function prototypes
typedef struct _UNICODE_STRING {
USHORT Length;
USHORT MaximumLength;
PWSTR Buffer;
} UNICODE_STRING, *PUNICODE_STRING;
typedef struct _OBJECT_ATTRIBUTES {
ULONG Length;
HANDLE RootDirectory;
PUNICODE_STRING ObjectName;
ULONG Attributes;
PVOID SecurityDescriptor;
PVOID SecurityQualityOfService;
} OBJECT_ATTRIBUTES;
typedef struct _CLIENT_ID {
HANDLE UniqueProcess;
HANDLE UniqueThread;
} CLIENT_ID;
<MAIN>
{
NTSTATUS status;
PVOID address = NULL;
SIZE_T size = 4096;
NtAllocateVirtualMemory(GetCurrentProcess(), &address, 0, &size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
return 0;
}