![]() |
Panoptes 1.0.0
Endpoint Detection and Response
|
#include "hook_test_harness.hpp"Go to the source code of this file.
Macros | |
| #define | TEST_NT_SUCCESS(status) |
| #define | TEST_VIEW_UNMAP 2 |
| SECTION_INHERIT::ViewUnmap: the view is not mapped into child processes. | |
Typedefs | |
| typedef NTSTATUS(NTAPI * | NtMapViewOfSection_t) (HANDLE SectionHandle, HANDLE ProcessHandle, PVOID *BaseAddress, ULONG_PTR ZeroBits, SIZE_T CommitSize, PLARGE_INTEGER SectionOffset, PSIZE_T ViewSize, DWORD InheritDisposition, ULONG AllocationType, ULONG Win32Protect) |
| typedef NTSTATUS(NTAPI * | NtMapViewOfSectionEx_t) (HANDLE SectionHandle, HANDLE ProcessHandle, PVOID *BaseAddress, PLARGE_INTEGER SectionOffset, PSIZE_T ViewSize, ULONG AllocationType, ULONG PageProtection, PMEM_EXTENDED_PARAMETER ExtendedParameters, ULONG ExtendedParameterCount) |
| typedef NTSTATUS(NTAPI * | NtUnmapViewOfSection_t) (HANDLE ProcessHandle, PVOID BaseAddress) |
| typedef NTSTATUS(NTAPI * | NtUnmapViewOfSectionEx_t) (HANDLE ProcessHandle, PVOID BaseAddress, ULONG Flags) |
Functions | |
| HANDLE | CreatePageSection (DWORD protection) |
| Creates a one-page, pagefile-backed section with the given maximum protection. | |
| HANDLE | CreateImageSection () |
| Creates an image section from System32. | |
| PVOID | MapView (HANDLE section, HANDLE process, ULONG protection) |
| Maps a view of a section through NtMapViewOfSection. Returns NULL if the call fails. | |
| PVOID | MapViewEx (HANDLE section, HANDLE process, ULONG protection) |
| Maps a view of a section through NtMapViewOfSectionEx. Returns NULL if the call fails. | |
| NTSTATUS | UnmapView (HANDLE process, PVOID address) |
| NTSTATUS | UnmapViewEx (HANDLE process, PVOID address) |
| #define TEST_NT_SUCCESS | ( | status | ) |
Definition at line 7 of file hook_test_sections.hpp.
Referenced by MapView(), and MapViewEx().
| #define TEST_VIEW_UNMAP 2 |
SECTION_INHERIT::ViewUnmap: the view is not mapped into child processes.
Definition at line 10 of file hook_test_sections.hpp.
Referenced by MapView().
| typedef NTSTATUS(NTAPI * NtMapViewOfSection_t) (HANDLE SectionHandle, HANDLE ProcessHandle, PVOID *BaseAddress, ULONG_PTR ZeroBits, SIZE_T CommitSize, PLARGE_INTEGER SectionOffset, PSIZE_T ViewSize, DWORD InheritDisposition, ULONG AllocationType, ULONG Win32Protect) |
Definition at line 12 of file hook_test_sections.hpp.
| typedef NTSTATUS(NTAPI * NtMapViewOfSectionEx_t) (HANDLE SectionHandle, HANDLE ProcessHandle, PVOID *BaseAddress, PLARGE_INTEGER SectionOffset, PSIZE_T ViewSize, ULONG AllocationType, ULONG PageProtection, PMEM_EXTENDED_PARAMETER ExtendedParameters, ULONG ExtendedParameterCount) |
Definition at line 15 of file hook_test_sections.hpp.
| typedef NTSTATUS(NTAPI * NtUnmapViewOfSection_t) (HANDLE ProcessHandle, PVOID BaseAddress) |
Definition at line 18 of file hook_test_sections.hpp.
| typedef NTSTATUS(NTAPI * NtUnmapViewOfSectionEx_t) (HANDLE ProcessHandle, PVOID BaseAddress, ULONG Flags) |
Definition at line 19 of file hook_test_sections.hpp.
|
inline |
Creates an image section from System32.
Definition at line 29 of file hook_test_sections.hpp.
References MAX_PATH.
|
inline |
Creates a one-page, pagefile-backed section with the given maximum protection.
Definition at line 22 of file hook_test_sections.hpp.
|
inline |
Maps a view of a section through NtMapViewOfSection. Returns NULL if the call fails.
Definition at line 44 of file hook_test_sections.hpp.
References NtdllFunction(), TEST_NT_SUCCESS, and TEST_VIEW_UNMAP.
|
inline |
Maps a view of a section through NtMapViewOfSectionEx. Returns NULL if the call fails.
Definition at line 53 of file hook_test_sections.hpp.
References NtdllFunction(), and TEST_NT_SUCCESS.
|
inline |
Definition at line 65 of file hook_test_sections.hpp.
References NtdllFunction().
|
inline |
Definition at line 69 of file hook_test_sections.hpp.
References NtdllFunction().