17#define CALC_PAGE_STATS
23#include <sig_finder.h>
46 OUT_PADDED(outs, level,
"\"workingset_scan\" : {\n");
58 outs << std::dec <<
has_pe;
60 OUT_PADDED(outs, level,
"\"has_shellcode\" : ");
64 OUT_PADDED(outs, level,
"\"is_executable\" : ");
68 OUT_PADDED(outs, level,
"\"is_listed_module\" : ");
72 outs <<
"\"" << std::hex <<
protection <<
"\"";
74 OUT_PADDED(outs, level,
"\"mapping_type\" : ");
105#ifdef CALC_PAGE_STATS
117 case MEM_PRIVATE:
return "MEM_PRIVATE";
118 case MEM_MAPPED:
return "MEM_MAPPED";
119 case MEM_IMAGE:
return "MEM_IMAGE";
131 OUT_PADDED(outs, level,
"\"patterns\" : {\n");
132 const size_t level2 = level + 1;
133 OUT_PADDED(outs, level2,
"\"total_matched\" : ");
137 OUT_PADDED(outs, level2,
"\"custom_matched\" : ");
virtual const bool toJSON(std::stringstream &outs, size_t level)
A base class of all the reports detailing on the output of the performed module's scan.
virtual const bool _toJSON(std::stringstream &outs, size_t level=JSON_LEVEL, const pesieve::t_json_level &jdetails=JSON_BASIC)
A base class for all the scanners checking appropriate process' features.
The report aggregating the results of the performed scan.
A report from the working set scan, generated by WorkingSetScanner.
util::ByteBuffer data_cache
std::vector< sig_finder::Match > custom_matched
const void patternsToJSON(std::stringstream &outs, size_t level, const pesieve::t_json_level &jdetails)
static std::string translate_mapping_type(DWORD type)
virtual const bool toJSON(std::stringstream &outs, size_t level, const pesieve::t_json_level &jdetails)
size_t generateTags(const std::string &reportPath)
virtual const void fieldsToJSON(std::stringstream &outs, size_t level, const pesieve::t_json_level &jdetails)
WorkingSetScanReport(HMODULE _module, size_t _moduleSize, t_scan_status status)
A scanner for detection of code implants in the process workingset.
virtual ~WorkingSetScanner()
WorkingSetScanReport * scanExecutableArea(MemPageData &memPageData)
bool isPotentiallyExecutable(MemPageData &memPageData, const t_data_scan_mode &mode)
ProcessScanReport & processReport
const process_details pDetails
bool checkAreaContent(IN MemPageData &_memPage, OUT WorkingSetScanReport *my_report)
bool isScannedAsModule(MemPageData &memPageData)
WorkingSetScanner(HANDLE _procHndl, process_details _proc_details, const util::mem_region_info _mem_region, pesieve::t_params _args, ProcessScanReport &_process_report)
const util::mem_region_info memRegion
bool scanImg(MemPageData &memPage)
bool isExecutable(MemPageData &memPageData)
virtual WorkingSetScanReport * scanRemote()
std::string escape_path_separators(std::string path)
enum pesieve::module_scan_status t_scan_status
virtual const bool toJSON(std::stringstream &outs, size_t level)