![]() |
Panoptes 1.0.0
Endpoint Detection and Response
|
Go to the source code of this file.
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_NtModifyBootEntry (PBOOT_ENTRY BootEntry) |
| The Hooked_NtModifyBootEntry function is a function that hooks the NtModifyBootEntry function. | |
| 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_NtUnmapViewOfSection (HANDLE ProcessHandle, PVOID BaseAddress) |
| Hooks NtUnmapViewOfSection, which unmaps a view of a section from 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_NtProtectVirtualMemory (HANDLE ProcessHandle, PVOID *BaseAddress, PSIZE_T RegionSize, ULONG NewProtection, PULONG OldProtection) |
| Hooks NtProtectVirtualMemory, which changes the protection of memory in a process. | |
| 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. | |
| 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_NtReadVirtualMemory (HANDLE ProcessHandle, PVOID BaseAddress, PVOID Buffer, SIZE_T NumberOfBytesToRead, PSIZE_T NumberOfBytesRead) |
| Hooks NtReadVirtualMemory, which reads memory 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_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_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. QueueUserAPC and QueueUserAPC2 go through it. | |
| NTSTATUS NTAPI | Hooked_NtSetInformationProcess (HANDLE ProcessHandle, PROCESSINFOCLASS ProcessInformationClass, PVOID ProcessInformation, ULONG ProcessInformationLength) |
| Hooks NtSetInformationProcess, which sets information about a process. | |
| VOID | PlaceHooks () |
| The PlaceHooks function places the hooks on the NTDLL functions. | |
| VOID | UnHook () |
| The UnHook function removes the hooks from the NTDLL functions. | |
| 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.
Hooks NtAllocateVirtualMemory, which reserves and/or commits memory in a process.
| ProcessHandle | The handle to the process. |
| BaseAddress | The base address of the region. |
| ZeroBits | The number of high-order address bits that must be zero. |
| RegionSize | The size of the region. |
| AllocationType | MEM_* allocation flags. |
| Protection | The page protection. |
Definition at line 570 of file hook.cpp.
References Log_ExecutableAllocated(), and pOriginal_NtAllocateVirtualMemory.
| 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.
Hooks NtAllocateVirtualMemoryEx, which reserves and/or commits memory in a process.
| ProcessHandle | The handle to the process. |
| BaseAddress | The base address of the region. |
| RegionSize | The size of the region. |
| AllocationType | MEM_* allocation flags. |
| PageProtection | The page protection. |
| ExtendedParameters | The extended parameters. |
| ExtendedParameterCount | The number of extended parameters. |
Definition at line 605 of file hook.cpp.
References Log_ExecutableAllocated(), and pOriginal_NtAllocateVirtualMemoryEx.
| 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.
Hooks NtCreateThreadEx, which creates a thread in a process.
| ThreadHandle | Receives the handle to the new thread. |
| DesiredAccess | The access requested for the thread handle. |
| ObjectAttributes | The attributes of the thread object. |
| ProcessHandle | The handle to the process the thread is created in. |
| StartRoutine | The address the thread starts executing at. |
| Argument | The argument passed to StartRoutine. |
| CreateFlags | THREAD_CREATE_FLAGS_* values. |
| ZeroBits | The number of high-order address bits of the stack that must be zero. |
| StackSize | The initial committed stack size. |
| MaximumStackSize | The maximum stack size. |
| AttributeList | The PS_ATTRIBUTE_LIST for the thread. |
Definition at line 675 of file hook.cpp.
References Log_RemoteThreadCreated(), and pOriginal_NtCreateThreadEx.
| 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.
Hooks NtMapViewOfSection, which maps a view of a section into a process.
| SectionHandle | The handle to the section. |
| ProcessHandle | The handle to the process the view is mapped into. |
| BaseAddress | The base address of the view. |
| ZeroBits | The number of high-order address bits that must be zero. |
| CommitSize | The number of bytes to commit initially. |
| SectionOffset | The offset of the view within the section. |
| ViewSize | The size of the view. |
| InheritDisposition | How the view is shared with child processes. |
| AllocationType | The allocation type. |
| Win32Protect | The page protection. |
Definition at line 429 of file hook.cpp.
References Log_RemoteViewMapped(), and pOriginal_NtMapViewOfSection.
| 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.
| SectionHandle | The handle to the section. |
| ProcessHandle | The handle to the process. |
| BaseAddress | The base address of the memory to map. |
| SectionOffset | The offset of the section. |
| ViewSize | The size of the view. |
| AllocationType | The type of allocation. |
| PageProtection | The protection of the page. |
| ExtendedParameters | The extended parameters. |
| ExtendedParameterCount | The number of extended parameters. |
| NTSTATUS NTAPI Hooked_NtModifyBootEntry | ( | PBOOT_ENTRY | BootEntry | ) |
The Hooked_NtModifyBootEntry function is a function that hooks the NtModifyBootEntry function.
| BootEntry | The boot entry to modify. |
| 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.
Hooks NtProtectVirtualMemory, which changes the protection of memory in a process.
| ProcessHandle | The handle to the process. |
| BaseAddress | The base address of the region. |
| RegionSize | The size of the region. |
| NewProtection | The new page protection. |
| OldProtection | Receives the previous page protection. |
Definition at line 393 of file hook.cpp.
References Log_PEMadeExecutable(), and pOriginal_NtProtectVirtualMemory.
| 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.
Hooks NtQueueApcThread, which queues a user-mode APC to a thread.
| ThreadHandle | The handle to the thread the APC is queued to. |
| ApcRoutine | The routine the APC runs. |
| ApcArgument1 | The first argument passed to ApcRoutine. |
| ApcArgument2 | The second argument passed to ApcRoutine. |
| ApcArgument3 | The third argument passed to ApcRoutine. |
Definition at line 714 of file hook.cpp.
References Log_ApcQueued(), and pOriginal_NtQueueApcThread.
| 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. QueueUserAPC and QueueUserAPC2 go through it.
Hooks NtQueueApcThreadEx2, which queues a user-mode APC to a thread, optionally as a special user APC. QueueUserAPC and QueueUserAPC2 go through it.
| ThreadHandle | The handle to the thread the APC is queued to. |
| ReserveHandle | An optional APC reserve object. |
| ApcFlags | QUEUE_USER_APC_FLAGS_* values, e.g. 0x1 for a special user APC. |
| ApcRoutine | The routine the APC runs. For QueueUserAPC this is ntdll's dispatcher, which calls the caller's routine (passed in ApcArgument1). |
| ApcArgument1 | The first argument passed to ApcRoutine. |
| ApcArgument2 | The second argument passed to ApcRoutine. |
| ApcArgument3 | The third argument passed to ApcRoutine. |
Definition at line 747 of file hook.cpp.
References Log_ApcQueued(), and pOriginal_NtQueueApcThreadEx2.
| NTSTATUS NTAPI Hooked_NtReadVirtualMemory | ( | HANDLE | ProcessHandle, |
| PVOID | BaseAddress, | ||
| PVOID | Buffer, | ||
| SIZE_T | NumberOfBytesToRead, | ||
| PSIZE_T | NumberOfBytesRead ) |
Hooks NtReadVirtualMemory, which reads memory from a process.
Hooks NtReadVirtualMemory, which reads memory from a process.
| ProcessHandle | The handle to the process. |
| BaseAddress | The base address of the memory to read. |
| Buffer | Receives the memory read. |
| NumberOfBytesToRead | The number of bytes to read. |
| NumberOfBytesRead | Receives the number of bytes read. |
Definition at line 638 of file hook.cpp.
References Log_PEBRead(), and pOriginal_NtReadVirtualMemory.
| NTSTATUS NTAPI Hooked_NtSetInformationProcess | ( | HANDLE | ProcessHandle, |
| PROCESSINFOCLASS | ProcessInformationClass, | ||
| PVOID | ProcessInformation, | ||
| ULONG | ProcessInformationLength ) |
Hooks NtSetInformationProcess, which sets information about a process.
Hooks NtSetInformationProcess, which sets information about a process.
| ProcessHandle | The handle to the process. |
| ProcessInformationClass | The kind of information being set. |
| ProcessInformation | The information to set. |
| ProcessInformationLength | The size of ProcessInformation in bytes. |
Definition at line 783 of file hook.cpp.
References Log_ProtectionSetAttempt(), PANO_PROCESS_PROTECTION_INFORMATION, and pOriginal_NtSetInformationProcess.
| NTSTATUS NTAPI Hooked_NtUnmapViewOfSection | ( | HANDLE | ProcessHandle, |
| PVOID | BaseAddress ) |
Hooks NtUnmapViewOfSection, which unmaps a view of a section from a process.
Hooks NtUnmapViewOfSection, which unmaps a view of a section from a process.
| ProcessHandle | The handle to the process the view is unmapped from. |
| BaseAddress | The base address of the view. |
Definition at line 508 of file hook.cpp.
References Log_ExecutableUnmapped(), and pOriginal_NtUnmapViewOfSection.
| NTSTATUS NTAPI Hooked_NtUnmapViewOfSectionEx | ( | HANDLE | ProcessHandle, |
| PVOID | BaseAddress, | ||
| ULONG | Flags ) |
Hooks NtUnmapViewOfSectionEx, which unmaps a view of a section from a process.
Hooks NtUnmapViewOfSectionEx, which unmaps a view of a section from a process.
| ProcessHandle | The handle to the process the view is unmapped from. |
| BaseAddress | The base address of the view. |
| Flags | MEM_UNMAP_* flags. |
Definition at line 537 of file hook.cpp.
References Log_ExecutableUnmapped(), and pOriginal_NtUnmapViewOfSectionEx.
| 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.
| ProcessHandle | The handle to the process. |
| BaseAddress | The base address of the memory to write to. |
| Buffer | The buffer to write to the memory. |
| NumberOfBytesToWrite | The number of bytes to write to the memory. |
| ProcessHandle | The handle to the process. |
| BaseAddress | The base address of the memory to write to. |
| Buffer | The buffer to write to the memory. |
| NumberOfBytesToWrite | The number of bytes to write to the memory. |
| NumberOfBytesWritten | The number of bytes written to the memory. |
Definition at line 339 of file hook.cpp.
References Log_EntryPointWritten(), Log_PEBWritten(), Log_PEWritten(), and pOriginal_NtWriteVirtualMemory.
| VOID PlaceHooks | ( | ) |
The PlaceHooks function places the hooks on the NTDLL functions.
The PlaceHooks function places the hooks on the NTDLL functions.
Definition at line 1019 of file hook.cpp.
Referenced by DllMain().
| VOID UnHook | ( | ) |
The UnHook function removes the hooks from the NTDLL functions.
The UnHook function removes the hooks from the NTDLL functions.
Definition at line 1052 of file hook.cpp.
Referenced by DllMain().