Skip to content

Commit 3fe61e8

Browse files
Merge pull request #1194 from avast/LZ_PeInOverlayDetection
Added detection of PE in overlay
2 parents e119d3b + 071f184 commit 3fe61e8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,21 @@ rule eziriz_dotnet_reactor_62_or_newer {
184184
dotnet.user_strings[dotnet.number_of_user_strings - 2] == "{\x001\x001\x001\x001\x001\x00-\x002\x002\x002\x002\x002\x00-\x005\x000\x000\x000\x001\x00-\x000\x000\x000\x000\x001\x00}\x00"
185185
}
186186

187+
rule pe_file_in_overlay
188+
{
189+
meta:
190+
tool = "P"
191+
name = "PE-in-Overlay"
192+
version = "-"
193+
extra = "Various binary tools"
194+
condition:
195+
pe.overlay.size != 0 and
196+
pe.overlay.offset != 0 and
197+
uint16(pe.overlay.offset) == 0x5A4D and
198+
uint32(pe.overlay.offset + 0x3C) >= 4 and
199+
uint32(pe.overlay.offset + uint32(pe.overlay.offset + 0x3C)) == 0x00004550
200+
}
201+
187202
rule spirit_15_01 {
188203
meta:
189204
tool = "P"

0 commit comments

Comments
 (0)