Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
Configuration.hpp
Go to the documentation of this file.
1#pragma once
2#include <string>
3#include <fstream>
4#include <vector>
5#include <nlohmann/json.hpp>
6
8protected:
9 nlohmann::json m_data;
10 std::ifstream m_fileStream;
11
14
17
19 void GetLogExclusions();
20
22 void GetDontInject();
23
25 void GetFileEvents();
26
29
30public:
33 static const std::vector<std::string>& FileEventNames();
40
42 std::vector<std::string> m_exclusions;
43
45 bool m_quartine = false;
46
49 std::vector<std::string> m_logExclusions;
50
56 std::vector<std::string> m_dontInject;
57
61 std::vector<std::string> m_fileEvents = FileEventNames();
62
66
72 static bool IsPathInList(const std::vector<std::string>& patterns, const std::string& path);
73
76 Configuration(std::string configurationPath);
77
79 void Parse();
80
82 void IsValidJson();
83
86 void ValidateSettings();
87
90 std::vector<std::string> GetJsonKeys();
91};
nlohmann::json m_data
static const std::vector< std::string > & FileEventNames()
The names FileEvents accepts, one per group of file system events the driver can report....
static bool IsPathInList(const std::vector< std::string > &patterns, const std::string &path)
Check whether a path matches any pattern in an exclusion list. A pattern with no wildcard matches eve...
Configuration(std::string configurationPath)
Constructor for the Configuration class.
std::vector< std::string > m_exclusions
Path patterns that are not scanned (see IsPathInList).
std::vector< std::string > m_fileEvents
The groups of file system events the driver reports, from FileEventNames(). Every group if FileEvents...
std::vector< std::string > GetJsonKeys()
Get the keys from the configuration file.
ContainerType
The type of container that the extensibility is running in.
void GetLogExclusions()
Get the optional log exclusions from the configuration file.
void ValidateSettings()
Check that each setting has the right type, after IsValidJson. Throws std::runtime_error naming the f...
void Parse()
Parse the configuration file.
void IsValidJson()
Check if the configuration file is valid.
bool m_enforceDetectionActions
Whether the service carries out the kill and quarantine actions of detector rules....
void GetScannerExclusions()
Get the scanner exclusions from the configuration file.
void GetQuarantineMaliciousFiles()
Get the quarantine malicious files from the configuration file.
std::ifstream m_fileStream
std::vector< std::string > m_dontInject
Processes the driver does not inject the hook DLL into. Each entry is either a file name such as "mse...
void GetEnforceDetectionActions()
Get the optional EnforceDetectionActions setting from the configuration file.
void GetFileEvents()
Get the optional FileEvents list from the configuration file.
bool m_quartine
The quarantine malicious files from the configuration file.
std::vector< std::string > m_logExclusions
Path patterns whose driver events are not logged (see IsPathInList). Files matching them are still sc...
void GetDontInject()
Get the optional DontInject list from the configuration file.