Prevalence and Impact
- f Low-Entropy Packing Schemes
in the Malware Ecosystem
Alessandro Mantovani (EURECOM), Simone Aonzo (UniGe), Xabier Ugarte Pedrero (CISCO), Alessio Merlo (UniGe), Davide Balzarotti (EURECOM)
1
Prevalence and Impact of Low-Entropy Packing Schemes in the Malware - - PowerPoint PPT Presentation
Prevalence and Impact of Low-Entropy Packing Schemes in the Malware Ecosystem Alessandro Mantovani (EURECOM), Simone Aonzo (UniGe), Xabier Ugarte Pedrero (CISCO), Alessio Merlo (UniGe), Davide Balzarotti (EURECOM) 1 Packing 2 Scope / Packing
Alessandro Mantovani (EURECOM), Simone Aonzo (UniGe), Xabier Ugarte Pedrero (CISCO), Alessio Merlo (UniGe), Davide Balzarotti (EURECOM)
1
2
3
4
5
[1] Lyda and Hamrock. Using entropy analysis to find encrypted and packed malware (2007). [2] Han and Lee. Packed PE file detection for malware forensics (2009). U g a r t e
e d r e r
B a l z a r
t i , S a n t
, B r i n g a s . D e e p p a c k e r i n s p e c t i
: A l
g i t u d i n a l s t u d y
t h e c
p l e x i t y
r u n
i m e ( 2 1 5 ) p e f i l e
y t h
m
u l e M a n a l y z e
t a t i c a n a l y z e r f
P E e x e c u t a b l e s
6
7
0x00001234 0x00002000 0x00002004 0x00001232
PC Lists status WL = [ ] WXL = [ ]
...
xor eax, eax mov WORD PTR [0x2000], 0x9090
...
0x00000000 0x00000000
...
8
0x00001234 0x00002000 0x00002004 0x00001232
PC Lists status WL = [ ] WXL = [ ]
...
xor eax, eax mov WORD PTR [0x2000], 0x9090
...
0x00000000 0x00000000
...
9
PC Lists status WL = [ (0x1234,0x2000); (0x1234, 0x2001) ] WXL = [ ] Memory Write
0x00001234 0x00002000 0x00002004 0x00001232
...
xor eax, eax mov WORD PTR [0x2000], 0x9090
...
0x00000000 0x00000000
...
10
PC Lists status WL = [ (0x1234,0x2000); (0x1234, 0x2001) ] WXL = [ ]
Not interesting instructions
0x00001234 0x00002000 0x00002004 0x00001232
...
xor eax, eax mov WORD PTR [0x2000], 0x9090
...
0x00009090 0x00000000
...
11
PC Lists status WL = [ (0x1234,0x2000); (0x1234, 0x2001) ] WXL = [ (0x1234, 0x2000) ]
0x00001234 0x00002000 0x00002004 0x00001232
...
xor eax, eax mov WORD PTR [0x2000], 0x9090
...
0x00009090 0x00000000
...
12
○ unexpected crash ○ virtual environment detection ○ missing dependencies ○ incorrect command line arguments
○ did not invoke at least 10 disk or network-related syscalls ○ samples whose executed instructions did not span at least five memory pages
13
PE header
Encrypted data
.text .data
Encrypted data
14
31.5% (14.583/46.295) ⇒ entropy alone is a very poor metric to select packed samples
15
Packed Hidden high- entropy data Not packed
16
17
18
Two layers of packing
19
○ signatures based on a scripting language
○ signatures only contain low-level byte patterns
○ signatures ○ PE structure heuristics ■ unusual section names ■ sections WX ■ low number of imported functions ■ resources bigger than the file itself ■ sections with H > 7.0
20
○ detected the presence of packing more often in unpacked samples than in the packed group
○ why the malware authors used those names? ○ they could be fake clues used on purpose to deceive automated tools
21
22
Considering H Not Considering H
23
○ Entropy ❌ ○ Signature and Rule-Based ❌ ○ Machine Learning ❌
24