![]() |
Panoptes 1.0.0
Endpoint Detection and Response
|
#include <winsock2.h>#include <ws2tcpip.h>#include <iphlpapi.h>#include <winternl.h>#include "detector.h"#include "panoptes.pb.h"#include "containers.h"#include "driver.h"#include "error_message.h"#include "grpc.hpp"#include "utils.h"#include "Configuration.hpp"#include <vector>Go to the source code of this file.
Macros | |
| #define | PANO_PROCESS_BREAK_ON_TERMINATION 29 |
Typedefs | |
| typedef NTSTATUS(NTAPI * | NtQueryInformationProcess_t) (HANDLE, ULONG, PVOID, ULONG, PULONG) |
Functions | |
| bool | IsDetectorPeer (const std::string &peer, int serverPort, std::string &why) |
| Whether a gRPC peer is PanoptesDetector.exe from the service's folder. The server listens on localhost without credentials, so this keeps other local processes from reading the event stream or asking the service to kill processes. | |
| std::string | RespondToDetection (const Detection &detection, const Configuration &configuration) |
| Carries out a detection's action and describes what was done, for the log. Kill and quarantine only happen with EnforceDetectionActions; they are refused for system processes, the service and its children, critical processes, and a process ID reused since the match. | |
| #define PANO_PROCESS_BREAK_ON_TERMINATION 29 |
Definition at line 127 of file detector.cpp.
| typedef NTSTATUS(NTAPI * NtQueryInformationProcess_t) (HANDLE, ULONG, PVOID, ULONG, PULONG) |
Definition at line 129 of file detector.cpp.
| bool IsDetectorPeer | ( | const std::string & | peer, |
| int | serverPort, | ||
| std::string & | why ) |
Whether a gRPC peer is PanoptesDetector.exe from the service's folder. The server listens on localhost without credentials, so this keeps other local processes from reading the event stream or asking the service to kill processes.
| peer | grpc::ServerContext::peer(), e.g. "ipv4:127.0.0.1:50123" |
| serverPort | The port the service listens on |
| why | Set to the reason when the peer is refused |
Definition at line 91 of file detector.cpp.
References DetectorExecutablePath(), and ToString().
| std::string RespondToDetection | ( | const Detection & | detection, |
| const Configuration & | configuration ) |
Carries out a detection's action and describes what was done, for the log. Kill and quarantine only happen with EnforceDetectionActions; they are refused for system processes, the service and its children, critical processes, and a process ID reused since the match.
Definition at line 193 of file detector.cpp.
References Configuration::IsPathInList(), Configuration::m_enforceDetectionActions, Configuration::m_exclusions, MoveFileToQuarantine(), and ToString().