Skip to content

Commit 1921407

Browse files
committed
test and bugfix
1 parent cef9fe1 commit 1921407

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

refinery/lib/id.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ def get_pe_type(data: buf):
428428
)
429429
else:
430430
return None
431-
if data[nt + 0x16] & 0x20:
431+
if data[nt + 0x17] & 0x20:
432432
return dll
433433
subsystem = data[nt + 0x5C] - 1
434434
if not 0 <= subsystem <= 2:

test/units/test_grabbag.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,8 @@ def test_malicious_pdf_with_javascript(self):
136136
'http'U':/'R'/addvertseense'U'.co'R'.uk/bfgnqs2.exe',
137137
'http'U':/'R'/addvertseense'U'.co'R'.uk/click.php',
138138
})
139+
140+
def test_0x09_extension(self):
141+
data = self.download_sample('bb41df67b503fef9bfd8f74757adcc50137365fbc25b92933573a64c7d419c1b')
142+
test, = data | self.load_pipeline('alu B@S -P2 -s64 -e=R(E*0x81F6+0xF3C7,8) | rev')
143+
self.assertEqual(test.meta['ext'], 'dll')

0 commit comments

Comments
 (0)