![]() |
PE-sieve
Scans all running processes. Recognizes and dumps a variety of potentially malicious implants (replaced/implanted PEs, shellcodes, hooks, in-memory patches).
|
#include <pe_buffer.h>
Public Member Functions | |
| PeBuffer (HANDLE _process_hndl, bool _is_refl) | |
| ~PeBuffer () | |
| bool | isFilled () |
| bool | isValidPe () |
| bool | isCode () |
| size_t | getBufferSize () const |
| bool | readRemote (ULONGLONG module_base, size_t pe_vsize) |
| bool | fillFromBuffer (ULONGLONG module_base, util::ByteBuffer &data_cache) |
| bool | resizeBuffer (size_t new_size) |
| bool | resizeLastSection (size_t new_img_size) |
| bool | dumpPeToFile (IN std::string dumpFileName, IN OUT peconv::t_pe_dump_mode &dumpMode, IN OPTIONAL const peconv::ExportsMapper *exportsMap=nullptr, OUT OPTIONAL peconv::ImpsNotCovered *notCovered=nullptr) |
| bool | dumpToFile (IN std::string dumpFileName) |
| ULONGLONG | getModuleBase () const |
| ULONGLONG | getRelocBase () const |
| void | setRelocBase (ULONGLONG reloc_base) |
Protected Member Functions | |
| bool | _readRemote (ULONGLONG module_base, size_t pe_vsize) |
| size_t | calcRemoteImgSize (ULONGLONG module_base) const |
| bool | allocBuffer (const size_t pe_vsize) |
| void | freeBuffer () |
Protected Attributes | |
| HANDLE | processHndl |
| bool | isRefl |
| BYTE * | vBuf |
| size_t | vBufSize |
| ULONGLONG | moduleBase |
| ULONGLONG | relocBase |
Friends | |
| class | ImpReconstructor |
| class | PeReconstructor |
Definition at line 8 of file pe_buffer.h.
|
inline |
Definition at line 10 of file pe_buffer.h.
|
inline |
|
protected |
|
inlineprotected |
|
protected |
| bool pesieve::PeBuffer::dumpPeToFile | ( | IN std::string | dumpFileName, |
| IN OUT peconv::t_pe_dump_mode & | dumpMode, | ||
| IN OPTIONAL const peconv::ExportsMapper * | exportsMap = nullptr, | ||
| OUT OPTIONAL peconv::ImpsNotCovered * | notCovered = nullptr ) |
| bool pesieve::PeBuffer::dumpToFile | ( | IN std::string | dumpFileName | ) |
Definition at line 173 of file pe_buffer.cpp.
| bool pesieve::PeBuffer::fillFromBuffer | ( | ULONGLONG | module_base, |
| util::ByteBuffer & | data_cache ) |
|
inlineprotected |
Definition at line 99 of file pe_buffer.h.
|
inline |
Definition at line 39 of file pe_buffer.h.
|
inline |
Definition at line 68 of file pe_buffer.h.
|
inline |
Definition at line 73 of file pe_buffer.h.
| bool pesieve::PeBuffer::isCode | ( | ) |
|
inline |
Definition at line 22 of file pe_buffer.h.
|
inline |
Definition at line 27 of file pe_buffer.h.
| bool pesieve::PeBuffer::readRemote | ( | ULONGLONG | module_base, |
| size_t | pe_vsize ) |
| bool pesieve::PeBuffer::resizeBuffer | ( | size_t | new_size | ) |
| bool pesieve::PeBuffer::resizeLastSection | ( | size_t | new_img_size | ) |
Definition at line 103 of file pe_buffer.cpp.
|
inline |
Definition at line 78 of file pe_buffer.h.
|
friend |
Definition at line 113 of file pe_buffer.h.
|
friend |
Definition at line 114 of file pe_buffer.h.
|
protected |
Definition at line 107 of file pe_buffer.h.
|
protected |
Definition at line 110 of file pe_buffer.h.
|
protected |
Definition at line 106 of file pe_buffer.h.
|
protected |
Definition at line 111 of file pe_buffer.h.
|
protected |
Definition at line 108 of file pe_buffer.h.
|
protected |
Definition at line 109 of file pe_buffer.h.