PE-sieve
Scans all running processes. Recognizes and dumps a variety of potentially malicious implants (replaced/implanted PEs, shellcodes, hooks, in-memory patches).
|
A scanner for detection of artefacts related to PE implants in the process workingset. More...
#include <artefact_scanner.h>
Classes | |
class | ArtefactsMapping |
Public Member Functions | |
ArtefactScanner (HANDLE _procHndl, const process_details _proc_details, MemPageData &_memPageData, ProcessScanReport &_process_report) | |
virtual | ~ArtefactScanner () |
virtual ArtefactScanReport * | scanRemote () |
Public Member Functions inherited from pesieve::ProcessFeatureScanner | |
ProcessFeatureScanner (HANDLE _processHandle) | |
virtual | ~ProcessFeatureScanner () |
Static Public Member Functions | |
static size_t | calcImgSize (HANDLE processHandle, HMODULE modBaseAddr, BYTE *headerBuffer, size_t headerBufferSize, IMAGE_SECTION_HEADER *hdr_ptr=NULL) |
Protected Member Functions | |
void | deletePrevPage () |
bool | hasShellcode (HMODULE region_start, size_t region_size, PeArtefacts &peArt) |
bool | findMzPe (ArtefactsMapping &mapping, const size_t search_offset) |
bool | setMzPe (ArtefactsMapping &mapping, IMAGE_DOS_HEADER *_dos_hdr) |
bool | setSecHdr (ArtefactsMapping &mapping, IMAGE_SECTION_HEADER *_sec_hdr) |
bool | setNtFileHdr (ArtefactScanner::ArtefactsMapping &aMap, IMAGE_FILE_HEADER *_nt_hdr) |
PeArtefacts * | generateArtefacts (ArtefactsMapping &aMap) |
PeArtefacts * | findArtefacts (MemPageData &memPage, size_t start_offset) |
PeArtefacts * | findInPrevPages (ULONGLONG addr_start, ULONGLONG addr_stop) |
ULONGLONG | _findMZoffset (MemPageData &memPage, LPVOID hdr_ptr) |
ULONGLONG | calcPeBase (MemPageData &memPage, LPVOID hdr_ptr) |
size_t | calcImageSize (MemPageData &memPage, IMAGE_SECTION_HEADER *hdr_ptr, ULONGLONG pe_image_base) |
IMAGE_FILE_HEADER * | findNtFileHdr (MemPageData &memPage, const size_t start_offset, size_t stop_offset=INVALID_OFFSET) |
bool | _validateSecRegions (MemPageData &memPage, LPVOID sec_hdr, size_t sec_count, ULONGLONG pe_image_base, bool is_virtual) |
bool | _validateSecRegions (MemPageData &memPage, LPVOID sec_hdr, size_t sec_count) |
BYTE * | _findSecByPatterns (BYTE *search_ptr, const size_t max_search_size) |
IMAGE_SECTION_HEADER * | findSecByPatterns (MemPageData &memPageData, const size_t max_search_size, const size_t search_offset) |
IMAGE_DOS_HEADER * | findMzPeHeader (MemPageData &memPage, const size_t search_offset) |
IMAGE_DOS_HEADER * | _findDosHdrByPatterns (BYTE *search_ptr, const size_t max_search_size) |
IMAGE_DOS_HEADER * | findDosHdrByPatterns (MemPageData &memPage, const size_t start_offset, size_t stop_offset=INVALID_OFFSET) |
Protected Attributes | |
MemPageData & | memPage |
MemPageData * | prevMemPage |
MemPageData * | artPagePtr |
bool | isProcess64bit |
const process_details | pDetails |
ProcessScanReport & | processReport |
Protected Attributes inherited from pesieve::ProcessFeatureScanner | |
HANDLE | processHandle |
A scanner for detection of artefacts related to PE implants in the process workingset.
Definition at line 157 of file artefact_scanner.h.
|
inline |
|
inlinevirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 298 of file artefact_scanner.cpp.
|
protected |
|
static |
|
protected |
|
inlineprotected |
Definition at line 238 of file artefact_scanner.h.
|
protected |
|
protected |
|
protected |
Definition at line 836 of file artefact_scanner.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 862 of file artefact_scanner.cpp.
|
virtual |
Perform the scan on the remote process
Implements pesieve::ProcessFeatureScanner.
Definition at line 876 of file artefact_scanner.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 273 of file artefact_scanner.h.
|
protected |
Definition at line 274 of file artefact_scanner.h.
|
protected |
Definition at line 271 of file artefact_scanner.h.
|
protected |
Definition at line 275 of file artefact_scanner.h.
|
protected |
Definition at line 272 of file artefact_scanner.h.
|
protected |
Definition at line 276 of file artefact_scanner.h.