4#include <detours/detours.h>
16 SIZE_T NumberOfBytesToWrite,
17 PSIZE_T NumberOfBytesWritten
42 PLARGE_INTEGER SectionOffset,
46 PMEM_EXTENDED_PARAMETER ExtendedParameters,
47 ULONG ExtendedParameterCount
57 PLARGE_INTEGER SectionOffset,
101 ULONG AllocationType,
102 ULONG PageProtection,
103 PMEM_EXTENDED_PARAMETER ExtendedParameters,
104 ULONG ExtendedParameterCount
109 HANDLE ProcessHandle,
112 SIZE_T NumberOfBytesToRead,
113 PSIZE_T NumberOfBytesRead
118 PHANDLE ThreadHandle,
119 ACCESS_MASK DesiredAccess,
120 POBJECT_ATTRIBUTES ObjectAttributes,
121 HANDLE ProcessHandle,
127 SIZE_T MaximumStackSize,
144 HANDLE ReserveHandle,
154 HANDLE ProcessHandle,
155 PROCESSINFOCLASS ProcessInformationClass,
156 PVOID ProcessInformation,
157 ULONG ProcessInformationLength
enum _PANO_SECTION_INHERIT PANO_SECTION_INHERIT
How a mapped view is shared with child processes. Only defined in kernel-mode headers.
struct _BOOT_ENTRY * PBOOT_ENTRY
VOID(NTAPI * PPANO_APC_ROUTINE)(_In_opt_ PVOID ApcArgument1, _In_opt_ PVOID ApcArgument2, _In_opt_ PVOID ApcArgument3)
The routine an APC queued with NtQueueApcThread runs. Not in the SDK headers.
VOID UnHook()
The UnHook function removes the hooks from the NTDLL functions.
NTSTATUS NTAPI Hooked_NtWriteVirtualMemory(HANDLE ProcessHandle, PVOID BaseAddress, PVOID Buffer, SIZE_T NumberOfBytesToWrite, PSIZE_T NumberOfBytesWritten)
The Hooked_NtWriteVirtualMemory function is a function that hooks the NtWriteVirtualMemory function.
NTSTATUS NTAPI Hooked_NtSetInformationProcess(HANDLE ProcessHandle, PROCESSINFOCLASS ProcessInformationClass, PVOID ProcessInformation, ULONG ProcessInformationLength)
Hooks NtSetInformationProcess, which sets information about a process.
NTSTATUS NTAPI Hooked_NtUnmapViewOfSectionEx(HANDLE ProcessHandle, PVOID BaseAddress, ULONG Flags)
Hooks NtUnmapViewOfSectionEx, which unmaps a view of a section from a process.
NTSTATUS NTAPI Hooked_NtReadVirtualMemory(HANDLE ProcessHandle, PVOID BaseAddress, PVOID Buffer, SIZE_T NumberOfBytesToRead, PSIZE_T NumberOfBytesRead)
Hooks NtReadVirtualMemory, which reads memory from a process.
NTSTATUS NTAPI Hooked_NtUnmapViewOfSection(HANDLE ProcessHandle, PVOID BaseAddress)
Hooks NtUnmapViewOfSection, which unmaps a view of a section from a process.
NTSTATUS NTAPI Hooked_NtCreateThreadEx(PHANDLE ThreadHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes, HANDLE ProcessHandle, PVOID StartRoutine, PVOID Argument, ULONG CreateFlags, SIZE_T ZeroBits, SIZE_T StackSize, SIZE_T MaximumStackSize, PVOID AttributeList)
Hooks NtCreateThreadEx, which creates a thread in a process.
NTSTATUS NTAPI Hooked_NtAllocateVirtualMemoryEx(HANDLE ProcessHandle, PVOID *BaseAddress, PSIZE_T RegionSize, ULONG AllocationType, ULONG PageProtection, PMEM_EXTENDED_PARAMETER ExtendedParameters, ULONG ExtendedParameterCount)
Hooks NtAllocateVirtualMemoryEx, which reserves and/or commits memory in a process.
NTSTATUS NTAPI Hooked_NtQueueApcThreadEx2(HANDLE ThreadHandle, HANDLE ReserveHandle, ULONG ApcFlags, PPANO_APC_ROUTINE ApcRoutine, PVOID ApcArgument1, PVOID ApcArgument2, PVOID ApcArgument3)
Hooks NtQueueApcThreadEx2, which queues a user-mode APC to a thread, optionally as a special user APC...
NTSTATUS NTAPI Hooked_NtModifyBootEntry(PBOOT_ENTRY BootEntry)
The Hooked_NtModifyBootEntry function is a function that hooks the NtModifyBootEntry function.
NTSTATUS NTAPI Hooked_NtAllocateVirtualMemory(HANDLE ProcessHandle, PVOID *BaseAddress, ULONG_PTR ZeroBits, PSIZE_T RegionSize, ULONG AllocationType, ULONG Protection)
Hooks NtAllocateVirtualMemory, which reserves and/or commits memory in a process.
VOID PlaceHooks()
The PlaceHooks function places the hooks on the NTDLL functions.
NTSTATUS NTAPI Hooked_NtMapViewOfSectionEx(HANDLE SectionHandle, HANDLE ProcessHandle, PVOID *BaseAddress, PLARGE_INTEGER SectionOffset, PSIZE_T ViewSize, ULONG AllocationType, ULONG PageProtection, PMEM_EXTENDED_PARAMETER ExtendedParameters, ULONG ExtendedParameterCount)
The Hooked_NtMapViewOfSectionEx function is a function that hooks the NtMapViewOfSectionEx function.
NTSTATUS NTAPI Hooked_NtMapViewOfSection(HANDLE SectionHandle, HANDLE ProcessHandle, PVOID *BaseAddress, ULONG_PTR ZeroBits, SIZE_T CommitSize, PLARGE_INTEGER SectionOffset, PSIZE_T ViewSize, PANO_SECTION_INHERIT InheritDisposition, ULONG AllocationType, ULONG Win32Protect)
Hooks NtMapViewOfSection, which maps a view of a section into a process.
NTSTATUS NTAPI Hooked_NtQueueApcThread(HANDLE ThreadHandle, PPANO_APC_ROUTINE ApcRoutine, PVOID ApcArgument1, PVOID ApcArgument2, PVOID ApcArgument3)
Hooks NtQueueApcThread, which queues a user-mode APC to a thread.
NTSTATUS NTAPI Hooked_NtProtectVirtualMemory(HANDLE ProcessHandle, PVOID *BaseAddress, PSIZE_T RegionSize, ULONG NewProtection, PULONG OldProtection)
Hooks NtProtectVirtualMemory, which changes the protection of memory in a process.