Skip to content

Commit be9ffac

Browse files
committed
split PE and embedded PE, closes #2 thanks @recvfrom
1 parent 798ad25 commit be9ffac

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Embedded_PE.rule

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ rule Embedded_PE
99
condition:
1010
for any i in (1..#mz):
1111
(
12-
uint32(@mz[i] + uint32(@mz[i] + 0x3C)) == 0x00004550
12+
@mz[i] != 0 and uint32(@mz[i] + uint32(@mz[i] + 0x3C)) == 0x00004550
1313
)
1414
}

PE.rule

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
rule Embedded_PE
2+
{
3+
meta:
4+
Author = "InQuest Labs"
5+
URL = "https://github.com/InQuest/yara-rules"
6+
Description = "Discover embedded PE files, without relying on easily stripped/modified header strings."
7+
strings:
8+
$mz = { 4D 5A }
9+
condition:
10+
for any i in (1..#mz):
11+
(
12+
uint32(@mz[i] + uint32(@mz[i] + 0x3C)) == 0x00004550
13+
)
14+
}

0 commit comments

Comments
 (0)