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
code_patterns.h
Go to the documentation of this file.
1#pragma once
2#include <windows.h>
3
4namespace pesieve {
5
6 typedef struct _t_pattern {
7 BYTE* ptr;
8 size_t size;
10
12 0x55, // PUSH EBP
13 0x8b, 0xEC // MOV EBP, ESP
14 };
15
17 0x55, // PUSH EBP
18 0x89, 0xE5 // MOV EBP, ESP
19 };
20
22 0x60, // PUSHAD
23 0x89, 0xE5 // MOV EBP, ESP
24 };
25
31
33 0x40, 0x53, // PUSH RBX
34 0x48, 0x83, 0xEC // SUB RSP, <BYTE>
35 };
37 0x55, // PUSH RBP
38 0x48, 0x8B, 0xEC // MOV RBP, RSP
39 };
41 0x40, 0x55, // PUSH RBP
42 0x48, 0x83, 0xEC // SUB RSP, <BYTE>
43 };
45 0x53, // PUSH RBX
46 0x48, 0x81, 0xEC // SUB RSP, <DWORD>
47 };
49 0x48, 0x83, 0xE4, 0xF0 // AND rsp, FFFFFFFFFFFFFFF0; Align RSP to 16 bytes
50 };
52 0x57, // PUSH RDI
53 0x48, 0x89, 0xE7 // MOV RDI, RSP
54 };
56 0x48, 0x8B, 0xC4, // MOV RAX, RSP
57 0x48, 0x89, 0x58, 0x08, // MOV QWORD PTR [RAX + 8], RBX
58 0x4C, 0x89, 0x48, 0x20, // MOV QWORD PTR [RAX + 0X20], R9
59 0x4C, 0x89, 0x40, 0x18, // MOV QWORD PTR [RAX + 0X18], R8
60 0x48, 0x89, 0x50, 0x10, // MOV QWORD PTR [RAX + 0X10], RDX
61 0x55, // PUSH RBP
62 0x56, // PUSH RSI
63 0x57, // PUSH RDI
64 0x41, 0x54, // PUSH R12
65 0x41, 0x55, // PUSH R13
66 0x41, 0x56, // PUSH R14
67 0x41, 0x57 // PUSH R15
68 };
69
79
80}; // namespace pesieve
BYTE prolog64_3_pattern[]
BYTE prolog32_pattern[]
BYTE prolog64_5_pattern[]
struct pesieve::_t_pattern t_pattern
BYTE prolog32_3_pattern[]
t_pattern patterns32[]
BYTE prolog64_6_pattern[]
BYTE prolog64_4_pattern[]
BYTE prolog64_pattern[]
BYTE prolog64_2_pattern[]
t_pattern patterns64[]
BYTE prolog32_2_pattern[]
BYTE prolog64_7_pattern[]