Skip to content

Commit 47ec8d5

Browse files
authored
Merge pull request #741 from avast/improvement-enigma-detection
Improve the detection of Enigma protector (32-bit).
2 parents 66bb11b + cf379f4 commit 47ec8d5

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

support/yara_patterns/tools/pe/x64/packers.yara

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55

66
import "pe"
77

8+
rule enigma_1x {
9+
meta:
10+
tool = "P"
11+
name = "Enigma"
12+
version = "1.x+ (64-bit)"
13+
pattern = "5051525355565741504151415241534154415541564157489C4881EC080000000FAE1C24E8000000005D4881ED??0000004881ED"
14+
strings:
15+
$1 = { 50 51 52 53 55 56 57 41 50 41 51 41 52 41 53 41 54 41 55 41 56 41 57 48 9C 48 81 EC 08 00 00 00 0F AE 1C 24 E8 00 00 00 00 5D 48 81 ED ?? 00 00 00 48 81 ED }
16+
condition:
17+
@1 < pe.overlay.offset or $1
18+
}
19+
820
rule upx_39x_lzma {
921
meta:
1022
tool = "P"

support/yara_patterns/tools/pe/x86/packers.yara

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4786,16 +4786,28 @@ rule encryptpe_22008618_02 {
47864786
$1 at pe.entry_point
47874787
}
47884788

4789-
rule enigma_protector_102 {
4789+
rule enigma_0x {
47904790
meta:
47914791
tool = "P"
4792-
name = "Enigma protector"
4792+
name = "Enigma"
4793+
version = "0.x beta"
4794+
pattern = "60E824000000??????EB02????8B44240C8380B80000000331C0C383C008EB02????89C461EB2E??????83042403EB01??31C0EB01??64FF30EB01??648920EB02????8900"
4795+
strings:
4796+
$1 = { 60 E8 24 00 00 00 ?? ?? ?? EB 02 ?? ?? 8B 44 24 0C 83 80 B8 00 00 00 03 31 C0 C3 83 C0 08 EB 02 ?? ?? 89 C4 61 EB 2E ?? ?? ?? 83 04 24 03 EB 01 ?? 31 C0 EB 01 ?? 64 FF 30 EB 01 ?? 64 89 20 EB 02 ?? ?? 89 00 }
4797+
condition:
4798+
@1 < pe.overlay.offset or $1
4799+
}
4800+
4801+
rule enigma_102 {
4802+
meta:
4803+
tool = "P"
4804+
name = "Enigma"
47934805
version = "1.02"
47944806
pattern = "60E8000000005D83ED0681ED??????????????????????????????????????????????????????????????????????E8010000009A83C404EB02FF3560E8240000000000FFEB02CD208B44240C8380B80000000331C0C383C008EB02FF1589C461EB2EEAEB2B83042403EB010031C0EB018564FF30EB0183648920EB02CD2089009A648F0500000000EB02C1905861EB013EBE01000000C1E60283EC0487DE891C24"
47954807
strings:
47964808
$1 = { 60 E8 00 00 00 00 5D 83 ED 06 81 ED ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? E8 01 00 00 00 9A 83 C4 04 EB 02 FF 35 60 E8 24 00 00 00 00 00 FF EB 02 CD 20 8B 44 24 0C 83 80 B8 00 00 00 03 31 C0 C3 83 C0 08 EB 02 FF 15 89 C4 61 EB 2E EA EB 2B 83 04 24 03 EB 01 00 31 C0 EB 01 85 64 FF 30 EB 01 83 64 89 20 EB 02 CD 20 89 00 9A 64 8F 05 00 00 00 00 EB 02 C1 90 58 61 EB 01 3E BE 01 00 00 00 C1 E6 02 83 EC 04 87 DE 89 1C 24 }
47974809
condition:
4798-
$1 at pe.entry_point
4810+
@1 < pe.overlay.offset or $1
47994811
}
48004812

48014813
rule enigma_11x {
@@ -4870,6 +4882,18 @@ rule enigma_1x_02 {
48704882
$1 at pe.entry_point
48714883
}
48724884

4885+
rule enigma_1x_03 {
4886+
meta:
4887+
tool = "P"
4888+
name = "Enigma"
4889+
version = "1.x+"
4890+
pattern = "60E8000000005D81ED0600000081ED????????E9??000000454E49474D41"
4891+
strings:
4892+
$1 = { 60 E8 00 00 00 00 5D 81 ED 06 00 00 00 81 ED ?? ?? ?? ?? E9 ?? 00 00 00 45 4E 49 47 4D 41 }
4893+
condition:
4894+
@1 < pe.overlay.offset or $1
4895+
}
4896+
48734897
rule enigma_131 {
48744898
meta:
48754899
tool = "P"

0 commit comments

Comments
 (0)