Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
pano_events.h File Reference
#include <Windows.h>
#include <winioctl.h>

Go to the source code of this file.

Classes

struct  _PANO_TERMINATE_PROCESS
struct  _PANO_INJECTION_EXCLUSIONS
 The input of IOCTL_PANOPTES_SET_INJECTION_EXCLUSIONS. Each name is either: More...
struct  _PANO_FILE_EVENTS
struct  _PANO_EVENT_HEADER
 The header at the start of every IOCTL_PANOPTES_GET_EVENT response. More...
struct  _PANO_FILE_EVENT_DATA
 The data for file, named pipe and mailslot events. More...
struct  _PANO_FILE_MODIFIED_EVENT_DATA
 The data for PANO_EVENT_FILE_MODIFIED. More...
struct  _PANO_RENAME_EVENT_DATA
 The data for PANO_EVENT_FILE_RENAME. More...
struct  _PANO_PROCESS_EVENT_DATA
 The data for PANO_EVENT_PROCESS_CREATED and PANO_EVENT_PROCESS_TERMINATED. More...
struct  _PANO_REGISTRY_EVENT_DATA
 The data for PANO_EVENT_REGISTRY_* events. More...

Macros

#define PANOPTES_DEVICE_NAME   L"\\Device\\Panoptes"
#define PANOPTES_SYMLINK_NAME   L"\\DosDevices\\Panoptes"
#define PANOPTES_USER_DEVICE_PATH   L"\\\\.\\Panoptes"
#define IOCTL_PANOPTES_GET_EVENT   CTL_CODE(FILE_DEVICE_UNKNOWN, 0x800, METHOD_BUFFERED, FILE_READ_ACCESS)
 Waits for and returns the next event from the driver.
#define IOCTL_PANOPTES_TERMINATE_PROCESS   CTL_CODE(FILE_DEVICE_UNKNOWN, 0x900, METHOD_BUFFERED, FILE_ANY_ACCESS)
 Terminates a process. The input buffer is a PANO_TERMINATE_PROCESS.
#define IOCTL_PANOPTES_SET_INJECTION_EXCLUSIONS   CTL_CODE(FILE_DEVICE_UNKNOWN, 0x901, METHOD_BUFFERED, FILE_WRITE_ACCESS)
 Replaces the driver's list of process image names that the hook DLL is not injected into (the DontInject setting). The input buffer is a PANO_INJECTION_EXCLUSIONS. The list applies to processes that have not been injected yet; it does not unload the DLL from processes that already have it.
#define PANO_MAX_INJECTION_EXCLUSIONS   1024
 The most names a PANO_INJECTION_EXCLUSIONS may hold.
#define PANO_MAX_INJECTION_EXCLUSION_LENGTH   (0xFFFE / 2)
 The longest name, in WCHARs not counting its terminator, a PANO_INJECTION_EXCLUSIONS may hold. A UNICODE_STRING's limit, since full paths are compared as one.
#define PANO_MAX_EVENT_SIZE   (136 * 1024)
 The output buffer size the service passes with IOCTL_PANOPTES_GET_EVENT. The driver never returns an event larger than this. It is sized so that every event carrying the longest possible names fits whole (see the static_asserts at the end of this file), so names and command lines are never truncated in practice. Events are queued at their actual size, so this only sets the size of each GET_EVENT buffer.
#define PANO_MAX_UNICODE_STRING_CHARS   (0xFFFF / sizeof(WCHAR))
 The most WCHARs a UNICODE_STRING can hold (its Length is a USHORT byte count).
#define PANO_FILE_MODIFIED_INTERVAL_MS   30000
 How long a handle can keep writing before its PANO_EVENT_FILE_MODIFIED is sent without waiting for it to close.
#define PANO_FILE_EVENTS_ALL   0x3F
#define IOCTL_PANOPTES_SET_FILE_EVENTS   CTL_CODE(FILE_DEVICE_UNKNOWN, 0x902, METHOD_BUFFERED, FILE_WRITE_ACCESS)
 Sets which PANO_FILE_EVENT_GROUP bits are reported. The input buffer is a PANO_FILE_EVENTS. Every group is on until the service sends this.
#define PANO_FLAG_OPLOCKED   0x1
#define PANO_FLAG_COMPRESSED   0x2
#define PANO_FLAG_NAME_TRUNCATED   0x4
#define PANO_FLAG_DELETE_ON_CLOSE   0x8
 PANO_EVENT_FILE_DELETE: the file was opened with FILE_DELETE_ON_CLOSE rather than having its delete disposition set.
#define PANO_FLAG_REPLACE_EXISTING   0x10
 PANO_EVENT_FILE_RENAME: the rename replaced an existing file at the destination.
#define PANO_FLAG_COMMAND_LINE_TRUNCATED   0x20
 PANO_EVENT_PROCESS_CREATED: the command line was truncated to fit the event.
#define PANO_FLAG_HANDLE_STILL_OPEN   0x40
 PANO_EVENT_FILE_MODIFIED: sent while the handle is still open and writing, so the file may not be complete yet.
#define PANO_FLAG_DATA_TRUNCATED   0x80
 PANO_EVENT_REGISTRY_SET_VALUE / _REPLACE_KEY: Data holds only the first PANO_MAX_REGISTRY_DATA_SIZE bytes; DataSize is the full size.
#define PANO_FLAG_KERNEL_MODE_CALLER   0x100
 Registry events: the operation came from kernel mode (a driver or the system) rather than from a user mode program.
#define PANO_FLAG_CAPTURE_FAILED   0x200
 Registry events: a name or the data could not be read, so the event is incomplete. The registry's own copy of the caller's buffer could not be read (it was freed or changed).
#define PANO_MAX_FILE_NAME_LENGTH    ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_FILE_EVENT_DATA, FileName)) / sizeof(WCHAR))
 The maximum number of WCHARs in PANO_FILE_EVENT_DATA::FileName so that the whole response fits in PANO_MAX_EVENT_SIZE.
#define PANO_MAX_MODIFIED_FILE_NAME_LENGTH    ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_FILE_MODIFIED_EVENT_DATA, FileName)) / sizeof(WCHAR))
 The maximum number of WCHARs in PANO_FILE_MODIFIED_EVENT_DATA::FileName so that the whole response fits in PANO_MAX_EVENT_SIZE.
#define PANO_MAX_RENAME_NAMES_LENGTH    ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_RENAME_EVENT_DATA, Names)) / sizeof(WCHAR))
 The maximum combined number of WCHARs in both PANO_RENAME_EVENT_DATA names so that the whole response fits in PANO_MAX_EVENT_SIZE.
#define PANO_MAX_PROCESS_STRINGS_LENGTH    ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_PROCESS_EVENT_DATA, Strings)) / sizeof(WCHAR))
 The maximum combined number of WCHARs in the PANO_PROCESS_EVENT_DATA image name and command line so that the whole response fits in PANO_MAX_EVENT_SIZE.
#define PANO_MAX_REGISTRY_DATA_SIZE   4096
 The most bytes of a value's data a PANO_EVENT_REGISTRY_SET_VALUE carries. Enough for the paths and command lines persistence writes; larger values are cut and flagged.
#define PANO_MAX_REGISTRY_NAMES_LENGTH    ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_REGISTRY_EVENT_DATA, Strings) - PANO_MAX_REGISTRY_DATA_SIZE) / sizeof(WCHAR))
 The maximum combined number of WCHARs in both PANO_REGISTRY_EVENT_DATA names so that the whole response, with the most data, fits in PANO_MAX_EVENT_SIZE.

Typedefs

typedef struct _PANO_TERMINATE_PROCESS PANO_TERMINATE_PROCESS
typedef struct _PANO_TERMINATE_PROCESS * PPANO_TERMINATE_PROCESS
typedef struct _PANO_INJECTION_EXCLUSIONS PANO_INJECTION_EXCLUSIONS
 The input of IOCTL_PANOPTES_SET_INJECTION_EXCLUSIONS. Each name is either:
typedef struct _PANO_INJECTION_EXCLUSIONS * PPANO_INJECTION_EXCLUSIONS
typedef struct _PANO_FILE_EVENTS PANO_FILE_EVENTS
typedef struct _PANO_FILE_EVENTS * PPANO_FILE_EVENTS
typedef struct _PANO_EVENT_HEADER PANO_EVENT_HEADER
 The header at the start of every IOCTL_PANOPTES_GET_EVENT response.
typedef struct _PANO_EVENT_HEADER * PPANO_EVENT_HEADER
typedef struct _PANO_FILE_EVENT_DATA PANO_FILE_EVENT_DATA
 The data for file, named pipe and mailslot events.
typedef struct _PANO_FILE_EVENT_DATA * PPANO_FILE_EVENT_DATA
typedef struct _PANO_FILE_MODIFIED_EVENT_DATA PANO_FILE_MODIFIED_EVENT_DATA
 The data for PANO_EVENT_FILE_MODIFIED.
typedef struct _PANO_FILE_MODIFIED_EVENT_DATA * PPANO_FILE_MODIFIED_EVENT_DATA
typedef struct _PANO_RENAME_EVENT_DATA PANO_RENAME_EVENT_DATA
 The data for PANO_EVENT_FILE_RENAME.
typedef struct _PANO_RENAME_EVENT_DATA * PPANO_RENAME_EVENT_DATA
typedef struct _PANO_PROCESS_EVENT_DATA PANO_PROCESS_EVENT_DATA
 The data for PANO_EVENT_PROCESS_CREATED and PANO_EVENT_PROCESS_TERMINATED.
typedef struct _PANO_PROCESS_EVENT_DATA * PPANO_PROCESS_EVENT_DATA
typedef struct _PANO_REGISTRY_EVENT_DATA PANO_REGISTRY_EVENT_DATA
 The data for PANO_EVENT_REGISTRY_* events.
typedef struct _PANO_REGISTRY_EVENT_DATA * PPANO_REGISTRY_EVENT_DATA

Enumerations

enum  PANO_EVENT_TYPE : UINT32 {
  PANO_EVENT_FILE_CREATED = 1 , PANO_EVENT_FILE_OPENED , PANO_EVENT_FILE_OVERWRITTEN , PANO_EVENT_FILE_SUPERSEDED ,
  PANO_EVENT_FILE_WRITE , PANO_EVENT_NAMED_PIPE_CREATE , PANO_EVENT_NAMED_PIPE_OPEN , PANO_EVENT_MAILSLOT_CREATE ,
  PANO_EVENT_MAILSLOT_OPEN , PANO_EVENT_FILE_DELETE , PANO_EVENT_FILE_RENAME , PANO_EVENT_PROCESS_CREATED ,
  PANO_EVENT_PROCESS_TERMINATED , PANO_EVENT_FILE_MODIFIED , PANO_EVENT_FILE_SECURITY_CHANGED , PANO_EVENT_FILE_EA_CHANGED ,
  PANO_EVENT_REGISTRY_SET_VALUE , PANO_EVENT_REGISTRY_SAVE_KEY , PANO_EVENT_REGISTRY_SET_KEY_SECURITY , PANO_EVENT_REGISTRY_DELETE_KEY ,
  PANO_EVENT_REGISTRY_CREATE_KEY , PANO_EVENT_REGISTRY_LOAD_KEY , PANO_EVENT_REGISTRY_REPLACE_KEY , PANO_EVENT_REGISTRY_RENAME_KEY ,
  PANO_EVENT_REGISTRY_QUERY_VALUE
}
 The type of event, which determines the data that follows the header. More...
enum  PANO_FILE_EVENT_GROUP : UINT32 {
  PANO_FILE_EVENTS_CREATE = 0x1 , PANO_FILE_EVENTS_WRITE = 0x2 , PANO_FILE_EVENTS_DELETE_RENAME = 0x4 , PANO_FILE_EVENTS_PIPE_MAILSLOT = 0x8 ,
  PANO_FILE_EVENTS_SECURITY = 0x10 , PANO_FILE_EVENTS_EA = 0x20
}
 Bits of IOCTL_PANOPTES_SET_FILE_EVENTS: the groups of file system events the driver reports. A group that is off is dropped at the start of its callbacks. More...

Macro Definition Documentation

◆ IOCTL_PANOPTES_GET_EVENT

#define IOCTL_PANOPTES_GET_EVENT   CTL_CODE(FILE_DEVICE_UNKNOWN, 0x800, METHOD_BUFFERED, FILE_READ_ACCESS)

Waits for and returns the next event from the driver.

Definition at line 19 of file pano_events.h.

◆ IOCTL_PANOPTES_SET_FILE_EVENTS

#define IOCTL_PANOPTES_SET_FILE_EVENTS   CTL_CODE(FILE_DEVICE_UNKNOWN, 0x902, METHOD_BUFFERED, FILE_WRITE_ACCESS)

Sets which PANO_FILE_EVENT_GROUP bits are reported. The input buffer is a PANO_FILE_EVENTS. Every group is on until the service sends this.

Definition at line 162 of file pano_events.h.

Referenced by SetFileEventsInDriver().

◆ IOCTL_PANOPTES_SET_INJECTION_EXCLUSIONS

#define IOCTL_PANOPTES_SET_INJECTION_EXCLUSIONS   CTL_CODE(FILE_DEVICE_UNKNOWN, 0x901, METHOD_BUFFERED, FILE_WRITE_ACCESS)

Replaces the driver's list of process image names that the hook DLL is not injected into (the DontInject setting). The input buffer is a PANO_INJECTION_EXCLUSIONS. The list applies to processes that have not been injected yet; it does not unload the DLL from processes that already have it.

Definition at line 32 of file pano_events.h.

Referenced by SetInjectionExclusionsInDriver().

◆ IOCTL_PANOPTES_TERMINATE_PROCESS

#define IOCTL_PANOPTES_TERMINATE_PROCESS   CTL_CODE(FILE_DEVICE_UNKNOWN, 0x900, METHOD_BUFFERED, FILE_ANY_ACCESS)

Terminates a process. The input buffer is a PANO_TERMINATE_PROCESS.

Definition at line 22 of file pano_events.h.

Referenced by TerminateProcessByDriver().

◆ PANO_FILE_EVENTS_ALL

#define PANO_FILE_EVENTS_ALL   0x3F

Definition at line 158 of file pano_events.h.

Referenced by FilterSetFileEvents().

◆ PANO_FILE_MODIFIED_INTERVAL_MS

#define PANO_FILE_MODIFIED_INTERVAL_MS   30000

How long a handle can keep writing before its PANO_EVENT_FILE_MODIFIED is sent without waiting for it to close.

Definition at line 138 of file pano_events.h.

Referenced by PreWriteCallback().

◆ PANO_FLAG_CAPTURE_FAILED

#define PANO_FLAG_CAPTURE_FAILED   0x200

Registry events: a name or the data could not be read, so the event is incomplete. The registry's own copy of the caller's buffer could not be read (it was freed or changed).

Definition at line 207 of file pano_events.h.

◆ PANO_FLAG_COMMAND_LINE_TRUNCATED

#define PANO_FLAG_COMMAND_LINE_TRUNCATED   0x20

PANO_EVENT_PROCESS_CREATED: the command line was truncated to fit the event.

Definition at line 195 of file pano_events.h.

Referenced by PanoReportProcessEvent().

◆ PANO_FLAG_COMPRESSED

#define PANO_FLAG_COMPRESSED   0x2

Definition at line 187 of file pano_events.h.

Referenced by PostWriteCallback().

◆ PANO_FLAG_DATA_TRUNCATED

#define PANO_FLAG_DATA_TRUNCATED   0x80

PANO_EVENT_REGISTRY_SET_VALUE / _REPLACE_KEY: Data holds only the first PANO_MAX_REGISTRY_DATA_SIZE bytes; DataSize is the full size.

Definition at line 201 of file pano_events.h.

Referenced by PanoReportRegistryEvent().

◆ PANO_FLAG_DELETE_ON_CLOSE

#define PANO_FLAG_DELETE_ON_CLOSE   0x8

PANO_EVENT_FILE_DELETE: the file was opened with FILE_DELETE_ON_CLOSE rather than having its delete disposition set.

Definition at line 191 of file pano_events.h.

Referenced by PostCreateCallback().

◆ PANO_FLAG_HANDLE_STILL_OPEN

#define PANO_FLAG_HANDLE_STILL_OPEN   0x40

PANO_EVENT_FILE_MODIFIED: sent while the handle is still open and writing, so the file may not be complete yet.

Definition at line 198 of file pano_events.h.

Referenced by PreWriteCallback().

◆ PANO_FLAG_KERNEL_MODE_CALLER

#define PANO_FLAG_KERNEL_MODE_CALLER   0x100

Registry events: the operation came from kernel mode (a driver or the system) rather than from a user mode program.

Definition at line 204 of file pano_events.h.

◆ PANO_FLAG_NAME_TRUNCATED

#define PANO_FLAG_NAME_TRUNCATED   0x4

◆ PANO_FLAG_OPLOCKED

#define PANO_FLAG_OPLOCKED   0x1

Definition at line 186 of file pano_events.h.

Referenced by PostCreateCallback().

◆ PANO_FLAG_REPLACE_EXISTING

#define PANO_FLAG_REPLACE_EXISTING   0x10

PANO_EVENT_FILE_RENAME: the rename replaced an existing file at the destination.

Definition at line 193 of file pano_events.h.

Referenced by PreSetInformationCallback().

◆ PANO_MAX_EVENT_SIZE

#define PANO_MAX_EVENT_SIZE   (136 * 1024)

The output buffer size the service passes with IOCTL_PANOPTES_GET_EVENT. The driver never returns an event larger than this. It is sized so that every event carrying the longest possible names fits whole (see the static_asserts at the end of this file), so names and command lines are never truncated in practice. Events are queued at their actual size, so this only sets the size of each GET_EVENT buffer.

Definition at line 59 of file pano_events.h.

Referenced by EventQueueReceiveRequest().

◆ PANO_MAX_FILE_NAME_LENGTH

#define PANO_MAX_FILE_NAME_LENGTH    ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_FILE_EVENT_DATA, FileName)) / sizeof(WCHAR))

The maximum number of WCHARs in PANO_FILE_EVENT_DATA::FileName so that the whole response fits in PANO_MAX_EVENT_SIZE.

Definition at line 226 of file pano_events.h.

226#define PANO_MAX_FILE_NAME_LENGTH \
227 ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_FILE_EVENT_DATA, FileName)) / sizeof(WCHAR))

Referenced by PanoReportFileEvent().

◆ PANO_MAX_INJECTION_EXCLUSION_LENGTH

#define PANO_MAX_INJECTION_EXCLUSION_LENGTH   (0xFFFE / 2)

The longest name, in WCHARs not counting its terminator, a PANO_INJECTION_EXCLUSIONS may hold. A UNICODE_STRING's limit, since full paths are compared as one.

Definition at line 39 of file pano_events.h.

Referenced by InjectExclusionsSet(), and SetInjectionExclusionsInDriver().

◆ PANO_MAX_INJECTION_EXCLUSIONS

#define PANO_MAX_INJECTION_EXCLUSIONS   1024

The most names a PANO_INJECTION_EXCLUSIONS may hold.

Definition at line 35 of file pano_events.h.

Referenced by InjectExclusionsSet(), and SetInjectionExclusionsInDriver().

◆ PANO_MAX_MODIFIED_FILE_NAME_LENGTH

#define PANO_MAX_MODIFIED_FILE_NAME_LENGTH    ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_FILE_MODIFIED_EVENT_DATA, FileName)) / sizeof(WCHAR))

The maximum number of WCHARs in PANO_FILE_MODIFIED_EVENT_DATA::FileName so that the whole response fits in PANO_MAX_EVENT_SIZE.

Definition at line 250 of file pano_events.h.

250#define PANO_MAX_MODIFIED_FILE_NAME_LENGTH \
251 ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_FILE_MODIFIED_EVENT_DATA, FileName)) / sizeof(WCHAR))

Referenced by PanoReportFileModifiedEvent().

◆ PANO_MAX_PROCESS_STRINGS_LENGTH

#define PANO_MAX_PROCESS_STRINGS_LENGTH    ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_PROCESS_EVENT_DATA, Strings)) / sizeof(WCHAR))

The maximum combined number of WCHARs in the PANO_PROCESS_EVENT_DATA image name and command line so that the whole response fits in PANO_MAX_EVENT_SIZE.

Definition at line 295 of file pano_events.h.

295#define PANO_MAX_PROCESS_STRINGS_LENGTH \
296 ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_PROCESS_EVENT_DATA, Strings)) / sizeof(WCHAR))

Referenced by PanoReportProcessEvent().

◆ PANO_MAX_REGISTRY_DATA_SIZE

#define PANO_MAX_REGISTRY_DATA_SIZE   4096

The most bytes of a value's data a PANO_EVENT_REGISTRY_SET_VALUE carries. Enough for the paths and command lines persistence writes; larger values are cut and flagged.

Definition at line 300 of file pano_events.h.

Referenced by PanoReportRegistryEvent().

◆ PANO_MAX_REGISTRY_NAMES_LENGTH

#define PANO_MAX_REGISTRY_NAMES_LENGTH    ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_REGISTRY_EVENT_DATA, Strings) - PANO_MAX_REGISTRY_DATA_SIZE) / sizeof(WCHAR))

The maximum combined number of WCHARs in both PANO_REGISTRY_EVENT_DATA names so that the whole response, with the most data, fits in PANO_MAX_EVENT_SIZE.

Definition at line 329 of file pano_events.h.

329#define PANO_MAX_REGISTRY_NAMES_LENGTH \
330 ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_REGISTRY_EVENT_DATA, Strings) - PANO_MAX_REGISTRY_DATA_SIZE) / sizeof(WCHAR))

Referenced by PanoReportRegistryEvent().

◆ PANO_MAX_RENAME_NAMES_LENGTH

#define PANO_MAX_RENAME_NAMES_LENGTH    ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_RENAME_EVENT_DATA, Names)) / sizeof(WCHAR))

The maximum combined number of WCHARs in both PANO_RENAME_EVENT_DATA names so that the whole response fits in PANO_MAX_EVENT_SIZE.

Definition at line 269 of file pano_events.h.

269#define PANO_MAX_RENAME_NAMES_LENGTH \
270 ((PANO_MAX_EVENT_SIZE - sizeof(PANO_EVENT_HEADER) - FIELD_OFFSET(PANO_RENAME_EVENT_DATA, Names)) / sizeof(WCHAR))

Referenced by PanoReportRenameEvent().

◆ PANO_MAX_UNICODE_STRING_CHARS

#define PANO_MAX_UNICODE_STRING_CHARS   (0xFFFF / sizeof(WCHAR))

The most WCHARs a UNICODE_STRING can hold (its Length is a USHORT byte count).

Definition at line 62 of file pano_events.h.

◆ PANOPTES_DEVICE_NAME

#define PANOPTES_DEVICE_NAME   L"\\Device\\Panoptes"

Definition at line 14 of file pano_events.h.

Referenced by InitializeDriverLink().

◆ PANOPTES_SYMLINK_NAME

#define PANOPTES_SYMLINK_NAME   L"\\DosDevices\\Panoptes"

Definition at line 15 of file pano_events.h.

◆ PANOPTES_USER_DEVICE_PATH

#define PANOPTES_USER_DEVICE_PATH   L"\\\\.\\Panoptes"

Typedef Documentation

◆ PANO_EVENT_HEADER

The header at the start of every IOCTL_PANOPTES_GET_EVENT response.

◆ PANO_FILE_EVENT_DATA

The data for file, named pipe and mailslot events.

◆ PANO_FILE_EVENTS

◆ PANO_FILE_MODIFIED_EVENT_DATA

The data for PANO_EVENT_FILE_MODIFIED.

◆ PANO_INJECTION_EXCLUSIONS

The input of IOCTL_PANOPTES_SET_INJECTION_EXCLUSIONS. Each name is either:

  • an image file name with no \, such as L"msedge.exe", matching that file in any folder, or
  • a full NT image path starting with \, such as L"\\Device\\HarddiskVolume3\\Tools\\a.exe", matching only that file. The service converts DOS paths (C:...) to this form. Both are compared without regard to case. The buffer is exactly FIELD_OFFSET(PANO_INJECTION_EXCLUSIONS, Names) bytes plus the names; a Count of 0 clears the list

◆ PANO_PROCESS_EVENT_DATA

The data for PANO_EVENT_PROCESS_CREATED and PANO_EVENT_PROCESS_TERMINATED.

◆ PANO_REGISTRY_EVENT_DATA

The data for PANO_EVENT_REGISTRY_* events.

◆ PANO_RENAME_EVENT_DATA

The data for PANO_EVENT_FILE_RENAME.

◆ PANO_TERMINATE_PROCESS

◆ PPANO_EVENT_HEADER

◆ PPANO_FILE_EVENT_DATA

◆ PPANO_FILE_EVENTS

◆ PPANO_FILE_MODIFIED_EVENT_DATA

◆ PPANO_INJECTION_EXCLUSIONS

◆ PPANO_PROCESS_EVENT_DATA

◆ PPANO_REGISTRY_EVENT_DATA

◆ PPANO_RENAME_EVENT_DATA

◆ PPANO_TERMINATE_PROCESS

Enumeration Type Documentation

◆ PANO_EVENT_TYPE

enum PANO_EVENT_TYPE : UINT32

The type of event, which determines the data that follows the header.

Enumerator
PANO_EVENT_FILE_CREATED 
PANO_EVENT_FILE_OPENED 

No longer reported: opens of existing files are too frequent and filled the queue. Kept so the values that follow do not change.

PANO_EVENT_FILE_OVERWRITTEN 
PANO_EVENT_FILE_SUPERSEDED 
PANO_EVENT_FILE_WRITE 
PANO_EVENT_NAMED_PIPE_CREATE 

A server created a named pipe, or another instance of one (CreateNamedPipe).

PANO_EVENT_NAMED_PIPE_OPEN 

A client connected to a named pipe (CreateFile on \.\pipe...).

PANO_EVENT_MAILSLOT_CREATE 

A server created a mailslot (CreateMailslot).

PANO_EVENT_MAILSLOT_OPEN 

A client opened a mailslot to write to it (CreateFile on \.\mailslot...).

PANO_EVENT_FILE_DELETE 

A file was marked for deletion (a PANO_FILE_EVENT_DATA). The delete happens when the last handle closes and can still be cancelled before then.

PANO_EVENT_FILE_RENAME 

A file was renamed or moved (a PANO_RENAME_EVENT_DATA).

PANO_EVENT_PROCESS_CREATED 

A process was created (a PANO_PROCESS_EVENT_DATA).

PANO_EVENT_PROCESS_TERMINATED 

A process exited (a PANO_PROCESS_EVENT_DATA with only ProcessId set).

PANO_EVENT_FILE_MODIFIED 

A handle that wrote to a file was closed (a PANO_FILE_MODIFIED_EVENT_DATA). One event covers every write made through the handle. A handle still writing after PANO_FILE_MODIFIED_INTERVAL_MS is reported early with PANO_FLAG_HANDLE_STILL_OPEN, and its counts start again.

PANO_EVENT_FILE_SECURITY_CHANGED 

A file's security descriptor was changed (a PANO_FILE_EVENT_DATA). Length holds the SECURITY_INFORMATION flags saying which parts changed (owner, DACL, ...).

PANO_EVENT_FILE_EA_CHANGED 

A file's extended attributes were written (a PANO_FILE_EVENT_DATA). Length holds the size of the EA buffer that was set.

PANO_EVENT_REGISTRY_SET_VALUE 

A registry value is about to be written (a PANO_REGISTRY_EVENT_DATA). SecondName is the value name, Detail the REG_* type, DataSize the size of the data and Data the start of it. Sent before the write, so the write can still fail.

PANO_EVENT_REGISTRY_SAVE_KEY 

A registry key is about to be saved to a file, e.g. reg save HKLM\SAM (a PANO_REGISTRY_EVENT_DATA). SecondName is the file being written, Detail the REG_*_FORMAT. Sent before the save, so it can still fail.

PANO_EVENT_REGISTRY_SET_KEY_SECURITY 

A registry key's security descriptor is about to be changed (a PANO_REGISTRY_EVENT_DATA). Detail holds the SECURITY_INFORMATION flags saying which parts change (owner, DACL, ...). Sent before the change, so it can still fail.

PANO_EVENT_REGISTRY_DELETE_KEY 

A registry key is about to be deleted (a PANO_REGISTRY_EVENT_DATA with only the key name). Sent before the delete, so it can still fail.

PANO_EVENT_REGISTRY_CREATE_KEY 

A new registry key was created (a PANO_REGISTRY_EVENT_DATA with only the key name). Opening an existing key through a create call is not reported.

PANO_EVENT_REGISTRY_LOAD_KEY 

A hive file was loaded into the registry, e.g. reg load (a PANO_REGISTRY_EVENT_DATA). SecondName is the hive file, Detail the REG_* load flags.

PANO_EVENT_REGISTRY_REPLACE_KEY 

A key's hive file was replaced, taking effect at the next boot, e.g. reg replace (a PANO_REGISTRY_EVENT_DATA). SecondName is the new hive file and Data the file the old hive was saved to, as WCHARs without a terminator.

PANO_EVENT_REGISTRY_RENAME_KEY 

A registry key was renamed (a PANO_REGISTRY_EVENT_DATA). The key name is the old full name and SecondName the new full name.

PANO_EVENT_REGISTRY_QUERY_VALUE 

A value was read from a key holding credentials (under HKLM\SAM or HKLM\SECURITY) (a PANO_REGISTRY_EVENT_DATA). SecondName is the value name and Detail the KEY_VALUE_INFORMATION_CLASS. The value's data is never sent. Reads of other keys are too frequent to report.

Definition at line 65 of file pano_events.h.

65 : UINT32 {
134};
@ PANO_EVENT_REGISTRY_SET_KEY_SECURITY
A registry key's security descriptor is about to be changed (a PANO_REGISTRY_EVENT_DATA)....
@ PANO_EVENT_FILE_RENAME
A file was renamed or moved (a PANO_RENAME_EVENT_DATA).
Definition pano_events.h:85
@ PANO_EVENT_MAILSLOT_CREATE
A server created a mailslot (CreateMailslot).
Definition pano_events.h:78
@ PANO_EVENT_NAMED_PIPE_CREATE
A server created a named pipe, or another instance of one (CreateNamedPipe).
Definition pano_events.h:74
@ PANO_EVENT_FILE_MODIFIED
A handle that wrote to a file was closed (a PANO_FILE_MODIFIED_EVENT_DATA). One event covers every wr...
Definition pano_events.h:94
@ PANO_EVENT_MAILSLOT_OPEN
A client opened a mailslot to write to it (CreateFile on \.\mailslot...).
Definition pano_events.h:80
@ PANO_EVENT_REGISTRY_SAVE_KEY
A registry key is about to be saved to a file, e.g. reg save HKLM\SAM (a PANO_REGISTRY_EVENT_DATA)....
@ PANO_EVENT_FILE_SUPERSEDED
Definition pano_events.h:71
@ PANO_EVENT_REGISTRY_REPLACE_KEY
A key's hive file was replaced, taking effect at the next boot, e.g. reg replace (a PANO_REGISTRY_EVE...
@ PANO_EVENT_FILE_EA_CHANGED
A file's extended attributes were written (a PANO_FILE_EVENT_DATA). Length holds the size of the EA b...
@ PANO_EVENT_NAMED_PIPE_OPEN
A client connected to a named pipe (CreateFile on \.\pipe...).
Definition pano_events.h:76
@ PANO_EVENT_REGISTRY_RENAME_KEY
A registry key was renamed (a PANO_REGISTRY_EVENT_DATA). The key name is the old full name and Second...
@ PANO_EVENT_REGISTRY_SET_VALUE
A registry value is about to be written (a PANO_REGISTRY_EVENT_DATA). SecondName is the value name,...
@ PANO_EVENT_FILE_OVERWRITTEN
Definition pano_events.h:70
@ PANO_EVENT_REGISTRY_CREATE_KEY
A new registry key was created (a PANO_REGISTRY_EVENT_DATA with only the key name)....
@ PANO_EVENT_FILE_CREATED
Definition pano_events.h:66
@ PANO_EVENT_FILE_SECURITY_CHANGED
A file's security descriptor was changed (a PANO_FILE_EVENT_DATA). Length holds the SECURITY_INFORMAT...
Definition pano_events.h:97
@ PANO_EVENT_PROCESS_TERMINATED
A process exited (a PANO_PROCESS_EVENT_DATA with only ProcessId set).
Definition pano_events.h:89
@ PANO_EVENT_FILE_WRITE
Definition pano_events.h:72
@ PANO_EVENT_FILE_OPENED
No longer reported: opens of existing files are too frequent and filled the queue....
Definition pano_events.h:69
@ PANO_EVENT_PROCESS_CREATED
A process was created (a PANO_PROCESS_EVENT_DATA).
Definition pano_events.h:87
@ PANO_EVENT_REGISTRY_LOAD_KEY
A hive file was loaded into the registry, e.g. reg load (a PANO_REGISTRY_EVENT_DATA)....
@ PANO_EVENT_REGISTRY_DELETE_KEY
A registry key is about to be deleted (a PANO_REGISTRY_EVENT_DATA with only the key name)....
@ PANO_EVENT_REGISTRY_QUERY_VALUE
A value was read from a key holding credentials (under HKLM\SAM or HKLM\SECURITY) (a PANO_REGISTRY_EV...
@ PANO_EVENT_FILE_DELETE
A file was marked for deletion (a PANO_FILE_EVENT_DATA). The delete happens when the last handle clos...
Definition pano_events.h:83

◆ PANO_FILE_EVENT_GROUP

enum PANO_FILE_EVENT_GROUP : UINT32

Bits of IOCTL_PANOPTES_SET_FILE_EVENTS: the groups of file system events the driver reports. A group that is off is dropped at the start of its callbacks.

Enumerator
PANO_FILE_EVENTS_CREATE 

PANO_EVENT_FILE_CREATED / _OVERWRITTEN / _SUPERSEDED, and deletes through FILE_DELETE_ON_CLOSE.

PANO_FILE_EVENTS_WRITE 

PANO_EVENT_FILE_MODIFIED.

PANO_FILE_EVENTS_DELETE_RENAME 

PANO_EVENT_FILE_DELETE and PANO_EVENT_FILE_RENAME.

PANO_FILE_EVENTS_PIPE_MAILSLOT 

Named pipes and mailslots being created by a server or connected to by a client.

PANO_FILE_EVENTS_SECURITY 

PANO_EVENT_FILE_SECURITY_CHANGED.

PANO_FILE_EVENTS_EA 

PANO_EVENT_FILE_EA_CHANGED.

Definition at line 142 of file pano_events.h.

142 : UINT32 {
155 PANO_FILE_EVENTS_EA = 0x20,
156};
@ PANO_FILE_EVENTS_SECURITY
PANO_EVENT_FILE_SECURITY_CHANGED.
@ PANO_FILE_EVENTS_EA
PANO_EVENT_FILE_EA_CHANGED.
@ PANO_FILE_EVENTS_DELETE_RENAME
PANO_EVENT_FILE_DELETE and PANO_EVENT_FILE_RENAME.
@ PANO_FILE_EVENTS_WRITE
PANO_EVENT_FILE_MODIFIED.
@ PANO_FILE_EVENTS_PIPE_MAILSLOT
Named pipes and mailslots being created by a server or connected to by a client.
@ PANO_FILE_EVENTS_CREATE
PANO_EVENT_FILE_CREATED / _OVERWRITTEN / _SUPERSEDED, and deletes through FILE_DELETE_ON_CLOSE.