Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
inject_exclusions.h File Reference
#include <ntifs.h>

Go to the source code of this file.

Functions

void InjectExclusionsInit ()
 Initializes the (empty) list of image names the hook DLL is not injected into. Call before the device is created, since IOCTL_PANOPTES_SET_INJECTION_EXCLUSIONS replaces it.
void InjectExclusionsCleanup ()
 Frees the list. Call once the device and the image load callback are gone.
NTSTATUS InjectExclusionsSet (_In_reads_bytes_(Length) PVOID Buffer, _In_ ULONG Length)
 Replaces the list with the names in a PANO_INJECTION_EXCLUSIONS.
BOOLEAN IsInjectionExcluded (_In_ PCUNICODE_STRING ProcessImagePath)
 Checks whether a process's image is in the list. PASSIVE_LEVEL only.

Function Documentation

◆ InjectExclusionsCleanup()

void InjectExclusionsCleanup ( )

Frees the list. Call once the device and the image load callback are gone.

Definition at line 22 of file inject_exclusions.cpp.

23{
24 if (g_List != NULL) {
25 ExFreePoolWithTag(g_List, INJECT_EXCLUSIONS_TAG);
26 g_List = NULL;
27 }
28}
#define INJECT_EXCLUSIONS_TAG

References INJECT_EXCLUSIONS_TAG.

Referenced by UnloadPanoptes().

◆ InjectExclusionsInit()

void InjectExclusionsInit ( )

Initializes the (empty) list of image names the hook DLL is not injected into. Call before the device is created, since IOCTL_PANOPTES_SET_INJECTION_EXCLUSIONS replaces it.

Definition at line 16 of file inject_exclusions.cpp.

17{
18 ExInitializePushLock(&g_ListLock);
19 g_List = NULL;
20}

Referenced by DriverEntry().

◆ InjectExclusionsSet()

NTSTATUS InjectExclusionsSet ( _In_reads_bytes_(Length) PVOID Buffer,
_In_ ULONG Length )

Replaces the list with the names in a PANO_INJECTION_EXCLUSIONS.

Parameters
BufferThe IOCTL_PANOPTES_SET_INJECTION_EXCLUSIONS input buffer
LengthThe size of Buffer in bytes
Returns
STATUS_INVALID_PARAMETER if the buffer is malformed, in which case the list is unchanged

◆ IsInjectionExcluded()

BOOLEAN IsInjectionExcluded ( _In_ PCUNICODE_STRING ProcessImagePath)

Checks whether a process's image is in the list. PASSIVE_LEVEL only.

Parameters
ProcessImagePathThe process's NT image path, e.g. from SeLocateProcessImageName. Full-path entries are compared with the whole path and file-name entries with the part after the last \, both without regard to case. Entries may use * (any characters, \ included) and ?

Referenced by LoadImageNotifyRoutine().