HollowsHunter
Scans all running processes. Recognizes and dumps a variety of potentially malicious implants (replaced/implanted PEs, shellcodes, hooks, in-memory patches).
Loading...
Searching...
No Matches
hh_scanner.h
Go to the documentation of this file.
1#pragma once
2
3#include <windows.h>
4#include <psapi.h>
5#pragma comment(lib,"psapi.lib")
6
7#include <string>
8#include <vector>
9#include <set>
10
11#include "hh_params.h"
12#include "hh_report.h"
13
14
23
24class HHScanner {
25public:
26 // is the scanner best suited for the OS bitness
27 static bool isScannerCompatibile();
28 static t_single_scan_status shouldScanProcess(const hh_params& hh_args, const time_t hh_initTime, const DWORD pid, const WCHAR* exe_file);
29
30 HHScanner(t_hh_params& _args, time_t _initTime = 0);
31
33 bool writeToLog(HHScanReport* hh_report);
34 void summarizeScan(HHScanReport* hh_report, const pesieve::t_results_filter rfilter);
35
36protected:
37 void printScanRoundStats(size_t found, size_t ignored_count, size_t not_matched_count);
38 size_t scanProcesses(HHScanReport &my_report);
39 void printSingleReport(pesieve::t_report& report);
40
41 t_single_scan_status scanNextProcess(DWORD pid, WCHAR* image_buf, HHScanReport &report);
42 void initOutDir(time_t scan_time, pesieve::t_params &pesieve_args);
43
45 std::string outDir;
46
47 // time when HollowsHunter was initialized
48 time_t initTime;
50};
51
52
53// Global arguments
void printScanRoundStats(size_t found, size_t ignored_count, size_t not_matched_count)
bool writeToLog(HHScanReport *hh_report)
std::string outDir
Definition hh_scanner.h:45
void summarizeScan(HHScanReport *hh_report, const pesieve::t_results_filter rfilter)
t_single_scan_status scanNextProcess(DWORD pid, WCHAR *image_buf, HHScanReport &report)
bool isScannerWow64
Definition hh_scanner.h:49
static t_single_scan_status shouldScanProcess(const hh_params &hh_args, const time_t hh_initTime, const DWORD pid, const WCHAR *exe_file)
size_t scanProcesses(HHScanReport &my_report)
time_t initTime
Definition hh_scanner.h:48
t_hh_params & hh_args
Definition hh_scanner.h:44
HHScanReport * scan()
void initOutDir(time_t scan_time, pesieve::t_params &pesieve_args)
HHScanner(t_hh_params &_args, time_t _initTime=0)
static bool isScannerCompatibile()
void printSingleReport(pesieve::t_report &report)
t_hh_params g_hh_args
Definition main.cpp:29
single_status
Definition hh_scanner.h:15
@ SSCAN_NOT_MATCH
Definition hh_scanner.h:18
@ SSCAN_IGNORED
Definition hh_scanner.h:19
@ SSCAN_READY
Definition hh_scanner.h:21
@ SSCAN_ERROR1
Definition hh_scanner.h:16
@ SSCAN_ERROR0
Definition hh_scanner.h:17
@ SSCAN_SUCCESS
Definition hh_scanner.h:20
enum single_status t_single_scan_status