Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
Functions
panoptes_trace.cpp File Reference
#include "panoptes_trace.h"

Go to the source code of this file.

Functions

 TRACELOGGING_DEFINE_PROVIDER (g_hPanoCommonProvider, "Panoptes",(0x7036af95, 0x9daf, 0x4486, 0x8d, 0x93, 0x70, 0x5, 0xd4, 0x5a, 0x6a, 0x6))
 
void TraceInit ()
 
void TraceUninit ()
 
void Log_MailSlotOpen (HANDLE ProcessId, HANDLE ThreadId, PWCH FileName)
 Log a mail slot open event.
 
void Log_MailSlotCreate (HANDLE ProcessId, HANDLE ThreadId, PWCH FileName)
 Log a mail slot create event.
 
void Log_NamedPipeCreate (HANDLE ProcessId, HANDLE ThreadId, PWCH FileName)
 Log a named pipe create event.
 
void Log_NamedPipeOpen (HANDLE ProcessId, HANDLE ThreadId, PWCH FileName)
 Log a named pipe open event.
 
void Log_FileCreated (HANDLE ProcessId, HANDLE ThreadId, PWCH FileName, BOOLEAN Oplocked)
 Log a file create event.
 
void Log_FileOpen (HANDLE ProcessId, HANDLE ThreadId, PWCH FileName, BOOLEAN Oplocked)
 Log a file open event.
 
void Log_FileOverwritten (HANDLE ProcessId, HANDLE ThreadId, PWCH FileName)
 Log a file overwrite event.
 
void Log_FileRead (HANDLE ProcessId, HANDLE ThreadId, PWCH FileName, LARGE_INTEGER FileOffset, ULONG ReadLength, BOOLEAN Compressed)
 Log a file read event.
 
void Log_FileWrite (HANDLE ProcessId, HANDLE ThreadId, PWCH FileName, LARGE_INTEGER FileOffset, ULONG ReadLength, BOOLEAN Compressed)
 Log a file write event.
 
void Log_FileSuperseded (HANDLE ProcessId, HANDLE ThreadId, PWCH FileName)
 Log a file superseded event.
 

Function Documentation

◆ Log_FileCreated()

void Log_FileCreated ( HANDLE  ProcessId,
HANDLE  ThreadId,
PWCH  FileName,
BOOLEAN  Oplocked 
)

Log a file create event.

Parameters
ProcessIdThe ID of the process that created the file
ThreadIdThe ID of the thread that created the file
FileNameThe name of the file
OplockedWhether the file is oplocked

Definition at line 94 of file panoptes_trace.cpp.

100{
101 TraceLoggingWrite(g_hPanoCommonProvider, "FileCreated",
102 TraceLoggingValue(ProcessId, "SourceProcessId"),
103 TraceLoggingValue(ThreadId, "SourceThreadId"),
104 TraceLoggingWideString(FileName, "FileName"),
105 TraceLoggingBool(Oplocked, "Oplocked"));
106}

Referenced by FileCreationStatus(), and main().

◆ Log_FileOpen()

void Log_FileOpen ( HANDLE  ProcessId,
HANDLE  ThreadId,
PWCH  FileName,
BOOLEAN  Oplocked 
)

Log a file open event.

Parameters
ProcessIdThe ID of the process that opened the file
ThreadIdThe ID of the thread that opened the file
FileNameThe name of the file
OplockedWhether the file is oplocked

Definition at line 113 of file panoptes_trace.cpp.

119{
120 TraceLoggingWrite(g_hPanoCommonProvider, "FileOpened",
121 TraceLoggingValue(ProcessId, "SourceProcessId"),
122 TraceLoggingValue(ThreadId, "SourceThreadId"),
123 TraceLoggingWideString(FileName, "FileName"),
124 TraceLoggingBool(Oplocked, "Oplocked"));
125}

Referenced by FileCreationStatus().

◆ Log_FileOverwritten()

void Log_FileOverwritten ( HANDLE  ProcessId,
HANDLE  ThreadId,
PWCH  FileName 
)

Log a file overwrite event.

Parameters
ProcessIdThe ID of the process that overwrote the file
ThreadIdThe ID of the thread that overwrote the file
FileNameThe name of the file

Definition at line 131 of file panoptes_trace.cpp.

136{
137 TraceLoggingWrite(g_hPanoCommonProvider, "FileOverwritten",
138 TraceLoggingValue(ProcessId, "SourceProcessId"),
139 TraceLoggingValue(ThreadId, "SourceThreadId"),
140 TraceLoggingWideString(FileName, "FileName"));
141}

Referenced by FileCreationStatus().

◆ Log_FileRead()

void Log_FileRead ( HANDLE  ProcessId,
HANDLE  ThreadId,
PWCH  FileName,
LARGE_INTEGER  FileOffset,
ULONG  ReadLength,
BOOLEAN  Compressed 
)

Log a file read event.

Parameters
ProcessIdThe ID of the process that read the file
ThreadIdThe ID of the thread that read the file
FileNameThe name of the file
FileOffsetThe offset of the file
ReadLengthThe length of the read
CompressedWhether the file is compressed

Definition at line 150 of file panoptes_trace.cpp.

158{
159 TraceLoggingWrite(g_hPanoCommonProvider, "FileRead",
160 TraceLoggingValue(ProcessId, "SourceProcessId"),
161 TraceLoggingValue(ThreadId, "SourceThreadId"),
162 TraceLoggingWideString(FileName, "FileName"),
163 TraceLoggingULong(ReadLength, "ReadLength"),
164 TraceLoggingValue(FileOffset.QuadPart, "FileOffset"),
165 TraceLoggingBoolean(Compressed, "CompressedFile"));
166}

Referenced by FileReadStatus().

◆ Log_FileSuperseded()

void Log_FileSuperseded ( HANDLE  ProcessId,
HANDLE  ThreadId,
PWCH  FileName 
)

Log a file superseded event.

Parameters
ProcessIdThe ID of the process that superseded the file
ThreadIdThe ID of the thread that superseded the file
FileNameThe name of the file

Definition at line 197 of file panoptes_trace.cpp.

202{
203 TraceLoggingWrite(g_hPanoCommonProvider, "FileSuperseded",
204 TraceLoggingValue(ProcessId, "SourceProcessId"),
205 TraceLoggingValue(ThreadId, "SourceThreadId"),
206 TraceLoggingWideString(FileName, "FileName"));
207}

Referenced by FileCreationStatus().

◆ Log_FileWrite()

void Log_FileWrite ( HANDLE  ProcessId,
HANDLE  ThreadId,
PWCH  FileName,
LARGE_INTEGER  FileOffset,
ULONG  ReadLength,
BOOLEAN  Compressed 
)

Log a file write event.

Parameters
ProcessIdThe ID of the process that wrote the file
ThreadIdThe ID of the thread that wrote the file
FileNameThe name of the file
FileOffsetThe offset of the file
ReadLengthThe length of the write
CompressedWhether the file is compressed

Definition at line 175 of file panoptes_trace.cpp.

183{
184 TraceLoggingWrite(g_hPanoCommonProvider, "FileWrite",
185 TraceLoggingValue(ProcessId, "SourceProcessId"),
186 TraceLoggingValue(ThreadId, "SourceThreadId"),
187 TraceLoggingWideString(FileName, "FileName"),
188 TraceLoggingULong(ReadLength, "WriteLength"),
189 TraceLoggingValue(FileOffset.QuadPart, "FileOffset"),
190 TraceLoggingBoolean(Compressed, "CompressedFile"));
191}

Referenced by FileWriteStatus().

◆ Log_MailSlotCreate()

void Log_MailSlotCreate ( HANDLE  ProcessId,
HANDLE  ThreadId,
PWCH  FileName 
)

Log a mail slot create event.

Parameters
ProcessIdThe ID of the process that created the mail slot
ThreadIdThe ID of the thread that created the mail slot
FileNameThe name of the mail slot

Definition at line 40 of file panoptes_trace.cpp.

45{
46 TraceLoggingWrite(g_hPanoCommonProvider, "MailSlotCreate",
47 TraceLoggingValue(ProcessId, "SourceProcessId"),
48 TraceLoggingValue(ThreadId, "SourceThreadId"),
49 TraceLoggingWideString(FileName, "MailSlotName"));
50}

Referenced by MailSlotStatus().

◆ Log_MailSlotOpen()

void Log_MailSlotOpen ( HANDLE  ProcessId,
HANDLE  ThreadId,
PWCH  FileName 
)

Log a mail slot open event.

Parameters
ProcessIdThe ID of the process that opened the mail slot
ThreadIdThe ID of the thread that opened the mail slot
FileNameThe name of the mail slot

Definition at line 24 of file panoptes_trace.cpp.

29{
30 TraceLoggingWrite(g_hPanoCommonProvider, "MailSlotOpen",
31 TraceLoggingValue(ProcessId, "SourceProcessId"),
32 TraceLoggingValue(ThreadId, "SourceThreadId"),
33 TraceLoggingWideString(FileName, "MailSlotName"));
34}

Referenced by MailSlotStatus().

◆ Log_NamedPipeCreate()

void Log_NamedPipeCreate ( HANDLE  ProcessId,
HANDLE  ThreadId,
PWCH  FileName 
)

Log a named pipe create event.

Parameters
ProcessIdThe ID of the process that created the named pipe
ThreadIdThe ID of the thread that created the named pipe
FileNameThe name of the named pipe

Definition at line 58 of file panoptes_trace.cpp.

63{
64 TraceLoggingWrite(g_hPanoCommonProvider, "NamedPipeCreate",
65 TraceLoggingValue(ProcessId, "SourceProcessId"),
66 TraceLoggingValue(ThreadId, "SourceThreadId"),
67 TraceLoggingWideString(FileName, "NamedPipeName"));
68}

Referenced by NamedPipeStatus().

◆ Log_NamedPipeOpen()

void Log_NamedPipeOpen ( HANDLE  ProcessId,
HANDLE  ThreadId,
PWCH  FileName 
)

Log a named pipe open event.

Parameters
ProcessIdThe ID of the process that opened the named pipe
ThreadIdThe ID of the thread that opened the named pipe
FileNameThe name of the named pipe

Definition at line 74 of file panoptes_trace.cpp.

79{
80 TraceLoggingWrite(g_hPanoCommonProvider, "NamedPipeOpen",
81 TraceLoggingValue(ProcessId, "SourceProcessId"),
82 TraceLoggingValue(ThreadId, "SourceThreadId"),
83 TraceLoggingWideString(FileName, "NamedPipeName"));
84}

Referenced by NamedPipeStatus().

◆ TraceInit()

void TraceInit ( )

Definition at line 8 of file panoptes_trace.cpp.

9{
10 TraceLoggingRegister(g_hPanoCommonProvider);
11}

Referenced by DriverEntry(), and main().

◆ TRACELOGGING_DEFINE_PROVIDER()

TRACELOGGING_DEFINE_PROVIDER ( g_hPanoCommonProvider  ,
"Panoptes"  ,
(0x7036af95, 0x9daf, 0x4486, 0x8d, 0x93, 0x70, 0x5, 0xd4, 0x5a, 0x6a, 0x6)   
)

◆ TraceUninit()

void TraceUninit ( )

Definition at line 13 of file panoptes_trace.cpp.

14{
15 TraceLoggingUnregister(g_hPanoCommonProvider);
16}

Referenced by UnloadPanoptes().