Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
process_images.h
Go to the documentation of this file.
1#pragma once
2#include <Windows.h>
3#include <string>
4
5// Image paths of processes, remembered from the driver's process events.
6//
7// Hook events reach the service about a second after they happen, often after the process
8// that raised them has exited, so asking Windows for the image by PID at that point fails (or,
9// once the PID is reused, names the wrong program). The driver's ProcessCreated arrives first,
10// so the service records each image there and looks it up by PID and event time instead.
11// Entries are kept for a while after the process exits, for events still on their way.
12
17void RecordProcessStart(DWORD processId, const std::string& image, const FILETIME& time);
18
20void RecordProcessExit(DWORD processId);
21
25std::string LookupProcessImage(DWORD processId, const FILETIME& time);
26
29std::string ResolveProcessImage(DWORD processId, const FILETIME& time);
void RecordProcessExit(DWORD processId)
Records a process exit (ProcessTerminated). Its entry is forgotten a minute later.
void RecordProcessStart(DWORD processId, const std::string &image, const FILETIME &time)
Records a process start (ProcessCreated).
std::string LookupProcessImage(DWORD processId, const FILETIME &time)
The image of the process that had processId at the given time, from the recorded starts....
std::string ResolveProcessImage(DWORD processId, const FILETIME &time)
LookupProcessImage, falling back to asking Windows (QueryFullProcessImageName) for processes the serv...