PE-sieve
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
mapping_scanner.cpp
Go to the documentation of this file.
1#include "mapping_scanner.h"
2
4
5using namespace pesieve;
6using namespace pesieve::util;
7
9{
11
13 std::string module_name = moduleData.szModName;
14 bool is_same = (to_lowercase(mapped_name) == to_lowercase(module_name));
15
16 my_report->mappedFile = mapped_name;
17 my_report->moduleFile = module_name;
18 my_report->isDotNetModule = moduleData.isDotNet();
19
20 size_t mod_name_len = module_name.length();
21 if (!is_same && mod_name_len > 0) {
22 //check Wow64
23 char path_copy[MAX_PATH] = { 0 };
26 is_same = (to_lowercase(mapped_name) == to_lowercase(path_copy));
27 if (is_same) {
29 }
30 }
31 if (!is_same) {
32 my_report->status = SCAN_SUSPICIOUS;
33 return my_report;
34 }
36 return my_report;
37}
virtual MappingScanReport * scanRemote()
char szModName[MAX_PATH]
static std::string getMappedName(HANDLE _processHandle, LPVOID _modBaseAddr)
std::string to_lowercase(std::string)
bool convert_to_wow64_path(char *szModName)
int MAX_PATH
Definition pesieve.py:10
size_t fill_iat(BYTE *vBuf, size_t vBufSize, IN const peconv::ExportsMapper *exportsMap, IN OUT IATBlock &iat, IN ThunkFoundCallback *callback)
Definition iat_finder.h:31