![]() |
Panoptes 1.0.0
Endpoint Detection and Response
|
#include <grpcpp/grpcpp.h>#include "panoptes.grpc.pb.h"#include "panoptes_service.h"#include "grpc.hpp"#include "hash.h"#include "pano_log.h"#include "utils.h"#include "service_constants.h"#include "tray_notifications.h"#include "Configuration.hpp"#include "detector.h"#include "detector_stream.h"#include "process_images.h"#include <atomic>#include <map>#include <vector>#include <string>#include <algorithm>#include <filesystem>#include <regex>#include <mutex>#include <chrono>Go to the source code of this file.
Classes | |
| class | PanoptesImpl |
| The PanoptesImpl class is a class that implements the PanoptesExtensibility::Service interface from the gRPC class. More... | |
Macros | |
| #define | PANO_SCAN_TIMEOUT_SECONDS 120 |
| #define | PANO_DETECTOR_POLL_MS 250 |
| #define | PANO_SERVER_SHUTDOWN_GRACE_MS 2000 |
Functions | |
| bool | MoveFileToQuarantine (std::string filePath) |
| Moves a file into C:\ProgramData\Panoptes\Quarantine. | |
| bool | GetRegistryPortValue (DWORD &portValue) |
| bool | CheckIfMalicious (std::string jsonString) |
| bool | CreateRegistryEntryWithPort (DWORD dwPort) |
| std::string | CleanUpProtobufMessage (std::string msg) |
| void | SelfQueuePeScan (std::string pePath, std::string fileHash) |
| VOID | StopServiceServer () |
| Shuts down the server RunServiceServer started, cancelling calls still in flight after a short grace period, so RunServiceServer returns. Safe to call if it never started. | |
| void | RunServiceServer (LPVOID lpParam) |
Variables | |
| std::unique_ptr< PanoptesExtensibility::Stub > | stub_ |
| std::unique_ptr< PanoptesService::Stub > | selfStub_ |
| PanoptesContext * | serviceContext |
| #define PANO_SERVER_SHUTDOWN_GRACE_MS 2000 |
Definition at line 583 of file grpc.cpp.
Referenced by StopServiceServer().
| bool CheckIfMalicious | ( | std::string | jsonString | ) |
Definition at line 133 of file grpc.cpp.
| std::string CleanUpProtobufMessage | ( | std::string | msg | ) |
Definition at line 195 of file grpc.cpp.
References FormatTime().
| bool CreateRegistryEntryWithPort | ( | DWORD | dwPort | ) |
Definition at line 152 of file grpc.cpp.
References PANOPTES_REG_ROOT.
Referenced by RunServiceServer().
| bool GetRegistryPortValue | ( | DWORD & | portValue | ) |
Definition at line 88 of file grpc.cpp.
References PANOPTES_REG_ROOT.
Referenced by SelfQueuePeScan().
| bool MoveFileToQuarantine | ( | std::string | filePath | ) |
Moves a file into C:\ProgramData\Panoptes\Quarantine.
Definition at line 71 of file grpc.cpp.
Referenced by RespondToDetection().
| void RunServiceServer | ( | LPVOID | lpParam | ) |
Definition at line 598 of file grpc.cpp.
References CreateRegistryEntryWithPort(), and serviceContext.
Referenced by WinMain().
| void SelfQueuePeScan | ( | std::string | pePath, |
| std::string | fileHash ) |
Definition at line 338 of file grpc.cpp.
References GetRegistryPortValue(), Configuration::IsPathInList(), selfStub_, and serviceContext.
| VOID StopServiceServer | ( | ) |
Shuts down the server RunServiceServer started, cancelling calls still in flight after a short grace period, so RunServiceServer returns. Safe to call if it never started.
Definition at line 585 of file grpc.cpp.
References PANO_SERVER_SHUTDOWN_GRACE_MS, and StopDetectorStreams().
| std::unique_ptr<PanoptesService::Stub> selfStub_ |
Definition at line 32 of file grpc.cpp.
Referenced by SelfQueuePeScan().
| PanoptesContext* serviceContext |
Definition at line 33 of file grpc.cpp.
Referenced by RunServiceServer(), SelfQueuePeScan(), and WinMain().