Understanding Linux Malware
Emanuele Cozzi1, Mariano Graziano2, Yanick Fratantonio1, Davide Balzarotti1
1EURECOM 2Cisco Systems, Inc.
Understanding Linux Malware Emanuele Cozzi 1 , Mariano Graziano 2 , - - PowerPoint PPT Presentation
Understanding Linux Malware Emanuele Cozzi 1 , Mariano Graziano 2 , Yanick Fratantonio 1 , Davide Balzarotti 1 1 EURECOM 2 Cisco Systems, Inc. IEEE Symposium on Security & Privacy, May 2018 Malware and operating systems Malware and operating
1EURECOM 2Cisco Systems, Inc.
◮ Previous studies only looked at the network behavior 1 2 1Antonakakis et al. ”Understanding the mirai botnet,” USENIX Security Symposium 2017. 2Yin Minn Pa et al. ”IoTPOT: analysing the rise of IoT compromises,” USENIX Workshop on Offensive
Technologies 2015.
◮ Previous studies only looked at the network behavior 1 2
1Antonakakis et al. ”Understanding the mirai botnet,” USENIX Security Symposium 2017. 2Yin Minn Pa et al. ”IoTPOT: analysing the rise of IoT compromises,” USENIX Workshop on Offensive
Technologies 2015.
◮ Previous studies only looked at the network behavior 1 2
1Antonakakis et al. ”Understanding the mirai botnet,” USENIX Security Symposium 2017. 2Yin Minn Pa et al. ”IoTPOT: analysing the rise of IoT compromises,” USENIX Workshop on Offensive
Technologies 2015.
Data collection File & metadata analysis
File recognition AVClass ELF anomaly
Static analysis
Code analysis Packing identification
Dynamic analysis
Packer analysis Emulation Trace analysis Sandbox preparation
Data collection File & metadata analysis
File recognition AVClass ELF anomaly
Static analysis
Code analysis Packing identification
Dynamic analysis
Packer analysis Emulation Trace analysis Sandbox preparation
Data collection File & metadata analysis
File recognition AVClass ELF anomaly
Static analysis
Code analysis Packing identification
Dynamic analysis
Packer analysis Emulation Trace analysis Sandbox preparation
Data collection File & metadata analysis
File recognition AVClass ELF anomaly
Static analysis
Code analysis Packing identification
Dynamic analysis
Packer analysis Emulation Trace analysis Sandbox preparation
Architecture Samples Percentage X86-64 3018 28.61% MIPS I 2120 20.10% PowerPC 1569 14.87% Motorola 68000 1216 11.53% Sparc 1170 11.09% Intel 80386 720 6.83% ARM 32-bit 555 5.26% Hitachi SH 130 1.23% AArch64 (ARM 64-bit) 47 0.45%
3 0.03% Distribution of the 10,548 downloaded samples across architectures
Architecture Samples Percentage X86-64 3018 28.61% MIPS I 2120 20.10% PowerPC 1569 14.87% Motorola 68000 1216 11.53% Sparc 1170 11.09% Intel 80386 720 6.83% ARM 32-bit 555 5.26% Hitachi SH 130 1.23% AArch64 (ARM 64-bit) 47 0.45%
3 0.03% Distribution of the 10,548 downloaded samples across architectures
Architecture Samples Percentage X86-64 3018 28.61% MIPS I 2120 20.10% PowerPC 1569 14.87% Motorola 68000 1216 11.53% Sparc 1170 11.09% Intel 80386 720 6.83% ARM 32-bit 555 5.26% Hitachi SH 130 1.23% AArch64 (ARM 64-bit) 47 0.45%
3 0.03% Distribution of the 10,548 downloaded samples across architectures
\x07ELF ELF header Program header table .text .data Section header table
\x07ELF ELF header Program header table .text .data Section header table
◮ Sections table removed
\x07ELF ELF header Program header table .text .data Section header table
◮ Sections table removed
◮ Segments table points beyond file ◮ Overlapping header/segment ◮ Sections table points beyond file
\x07ELF ELF header Program header table .text .data Section header table
◮ Sections table removed
◮ Segments table points beyond file ◮ Overlapping header/segment ◮ Sections table points beyond file
✘ readelf 2.26.1 ✘ GDB 7.11.1 ✘ pyelftools 0.24 ✔ IDA Pro 7
3Sebastin et al. ”Avclass: A tool for massive malware labeling,” International Symposium on Research in
Attacks, Intrusions, and Defenses 2016.
Data collection File & metadata analysis
File recognition AVClass ELF anomaly
Static analysis
Code analysis Packing identification
Dynamic analysis
Packer analysis Emulation Trace analysis Sandbox preparation
‘8 ’ ‘888 ‘ Y88 . ‘8888 d8 ’ 888 8 888 . d88 ’ Y888 . . 8 P 888 8 888ooo88P ’ ‘8888 ’ 888 8 888 .8 PY888 . ‘ 88 . . 8 ’ 888 d8 ’ ‘888 b ‘YbodP ’
The Ultimate Packer f o r eXecutables
‘8 ’ ‘888 ‘Y88 . ‘8888 d8 ’ 888 8 888 . d88 ’ Y8 8 . . 888 8 8 88P’ ‘8888 ’ 8 8 888 Y888 . 8 . 88 d8 ’ ‘88 ‘YbodP ’ 88o
The Ultimate Packer f o r eXecutables
‘8 ’ ‘888 ‘Y8 ‘8888 d8 ’ 888 8 888 . d8 Y8 8 . . 8 8 88P’ ‘88 8 8 888 Y 8 . 8 d8 ’ ‘88 ‘Yb dP ’ 88o
888 The Ultimate Packer f o r eXecutables
‘8 ’ ‘88 ‘Y8 88 d8 8 8 8 . d8 8 8 . . 8 8 ‘88 8 8 88 Y 8 . 8 8 ’ ‘88 b dP ’ 88o 88 88 The Ultimate Packer f o r eXecutables
◮ modified magic bytes ◮ modified strings ◮ junk bytes
‘8 ’ ‘88 ‘Y8 88 d8 8 8 8 . d8 8 8 . . 8 8 ‘88 8 8 88 Y 8 . 8 8 ’ ‘88 b dP ’ 88o 88 88 The Ultimate Packer f o r eXecutables
◮ modified magic bytes ◮ modified strings ◮ junk bytes
Data collection File & metadata analysis
File recognition AVClass ELF anomaly
Static analysis
Code analysis Packing identification
Dynamic analysis
Packer analysis Emulation Trace analysis Sandbox preparation
$ ps PID CMD 1234 d41d8cd98f00b204e9800998ecf8427e $ ps PID CMD 1234
sh
$ ps PID CMD 1234
cron
$ ps PID CMD 1234
telnetd
$ ps PID CMD 1234
sshd
$ ps PID CMD 1234 d41d8cd98f00b204e9800998ecf8427e $ ps PID CMD 1234
sh
$ ps PID CMD 1234
cron
$ ps PID CMD 1234
telnetd
$ ps PID CMD 1234
sshd
$ ps PID CMD 1234
my-tool
$ ps PID CMD 1234 d41d8cd98f00b204e9800998ecf8427e $ ps PID CMD 1234
sh
$ ps PID CMD 1234
cron
$ ps PID CMD 1234
telnetd
$ ps PID CMD 1234
sshd
$ ps PID CMD 1234
my-tool
$ ps PID CMD 1234
a5ux38y
$ ps PID CMD 1234 d41d8cd98f00b204e9800998ecf8427e $ ps PID CMD 1234
sh
$ ps PID CMD 1234
cron
$ ps PID CMD 1234
telnetd
$ ps PID CMD 1234
sshd
$ ps PID CMD 1234
my-tool
$ ps PID CMD 1234
a5ux38y
$ ps PID CMD 1234