Conference PaperPDF Available

Utilization and Comparision of Convolutional Neural Networks in Malware Recognition

Authors:

Abstract

Advances in Industry 4.0, IoT and mobile systems have led to an increase in the number of malware threats that target these systems. The research shows that classification via the use of computer vision and machine learning methods over byte-level images extracted from malware files could be an effective static solution. In this study, in order to detect malware, we have employed various contemporary convolutional neural networks (Resnet, Inception, DenseNet, VGG, AlexNet) that have proven success in image classification problem and compared their predictive performance along with duration of model production and inference. In addition, a novel malware data set involving 8750 training and 3644 test instances over 25 different classes was proposed and used. As a result of the experiments carried out with 3-channel (RGB) images obtained, the highest success in terms of accuracy was determined as 97.48% by using DenseNet networks.
Kötücül Yazılımların Tanınmasında Evrişimsel Sinir
Ağlarının Kullanımı ve Karşılaştırılması
Utilization and Comparision of Convolutional Neural
Networks in Malware Recognition
Ahmet Selman Bozkir, Ahmet Ogulcan Cankaya, Murat Aydos
Hacettepe Üniversitesi Bilgisayar Mühendisliği Bölümü, Ankara, Türkiye
E-mail: selman@cs.hacettepe.edu.tr
Özetçe—Endüstri 4.0, IoT ve mobil sistemlerdeki gelişmeler
beraberinde bu tür sistemleri hedef alan kötücül yazılım
tehditlerinde artışa neden olmaktadır. Yapılan araştırmalar
kötücül yazılım dosyalarından byte düzeyinde çıkarılmış
imgelerin bilgisayarlı görü ve makine öğrenimi ntemleriyle
sınıflandırılmasının etkin bir statik çözüm olabileceğini
göstermektedir. Bu çalışmada kötücül yazılımları tespit amaçlı
olarak görsel sınıflandırma probleminde başarısı kanıtlanmış
modern evrişimsel sinir ağları (Resnet, Inception, DenseNet,
VGG ve AlexNet) kullanılarak kestirim performansları ile
birlikte model üretme ve tahmin süreleri karşılaştırılmıştır.
Bununla birlikte çalışmada 8750 eğitim, 3644 test örneği içeren
25 sınıflı özgün bir kötücül yazılım veri kümesi önerilmiş ve
kullanılmıştır. Elde edilen 3 kanallı (RGB) görsellerle yapılan
deneyler sonucunda doğruluk bağlamında en yüksek başarı
DenseNet ağlarında 97.48% olarak tespit edilmiştir.
Anahtar Kelimeler kötücül yazılım; kötücül yazılım tespiti;
evrişimli sinir ağları; bilgisayarlı görü; gözetimli öğrenme.
Abstract Advances in Industry 4.0, IoT and mobile systems
have led to an increase in the number of malware threats that
target these systems. The research shows that classification via
the use of computer vision and machine learning methods over
byte-level images extracted from malware files could be an
effective static solution. In this study, in order to detect malware,
we have employed various contemporary convolutional neural
networks (Resnet, Inception, DenseNet, VGG, AlexNet) that have
proven success in image classification problem and compared
their predictive performance along with duration of model
production and inference. In addition, a novel malware data set
involving 8750 training and 3644 test instances over 25 different
classes was proposed and used. As a result of the experiments
carried out with 3-channel (RGB) images obtained, the highest
success in terms of accuracy was determined as 97.48% by using
DenseNet networks.
Keywords malware; malware detection; convolutional neural
networks; computer vision; supervised learning.
I. GİRİŞ
Son yıllarda gerek internet gerekse de bilgi tabanlı sistemler
başta olmak üzere IoT (Internet of Things) ve mobil
cihazlardaki gelişmeler beraberinde kötücül yazılımlarda
(malware) üssel bir artışa neden olmuştur. tücül yazılımlar
virüs, Truva atı, reklam gösterici gibi genellikle zararlı amaçlar
taşıyan ve saldırganlara çeşitli faydalar sağlayan yazılımlardır.
Aktas ve Sen [1]’e göre kötücül yazılım geliştirmede temel
amaçların başında haksız finansal kazanç gelmektedir. Bu
nedenle ortaya çıkan KY sayısı ve çeşitliliği her geçen gün
artmaktadır [2]. Bir örnek vermek gerekirse [2], 2016 yılında
bir önceki yıla nazaran 36% artışla 430 milyon farklı KY
örneği tespit edilmiştir.
Kötücül yazılımların tespiti ve tanınmasında genel olarak
statik ve dinamik çözümleme yöntemleri ön plana çıkmaktadır.
Statik çözümlemeler zararlı kodun çalıştırılmaksızın ihtiva
ettiği ikili (binary) dizilimleri, kütüphane çağrıları, opcode
(operational code) sıklık dağılımları, akış kontrol çizgeleri gibi
örüntüleri keşfetmeyi ve bu örüntüler üzerinden tanımlayıcı bir
imza oluşturmayı hedefler [3]. Öte yandan dinamik çözümleme
yaklaşımında potansiyel zararlı kod bir kum kutusu ya da sanal
makine üzerinde çalıştırılarak davranışsal örüntüleri ortaya
konmaktadır. Bu noktada, statik çözümleme kaynak tüketimi
yönünden etkin ve çok daha hızlı sonuçlar ortaya koyarken
polimorfik ve metamorfik zararlıların tespitinde yetersiz
kalabilmektedir. Diğer yandan dinamik çözümleme bu türden
zafiyetlerin önüne geçerken zaman ve kaynak tüketici
olmaktadır.
Statik çözümleme tabanlı bir yaklaşım olarak Nataraj v.d.
[4] kötücül yazılımlara ait ham ikili dosyalardaki byte
dizilimlerinin gri ölçekli resimlere dönüştürülmesi sonrasında
bilgisayarlı görü ve makine öğrenimi yöntemlerinden
yararlanılarak sınıflama yapılabilirliğini göstermiştir. Bu
kavramın dayandığı temel fikir, kötücül dosyaların ait oldukları
familyalarda genellikle küçük değişiklikler göstermesidir.
Nataraj v.d [4] yaptıkları ilk çalışmada KY görsellerinden elde
ettikleri GIST betimleyicilerinden yararlanarak çok sınıflı KY
tanıması yapmışlardır. Sonraki yıllarda bilgisayarlı görü
alanında derin öğrenmenin önemli bileşenlerinden biri olan
evrişimsel sinir ağlarının (convolutional neural networks
cnn) önerilmesi ve yaygınlaşmasıyla birlikte KY görsellerinin
analizinde CNN ağlarının kullanımı gündeme gelmiştir.
Güncel çalışmalarda [5,6] ham KY görselleri üzerinden uçtan
uca eğitim gerçekleştirilerek doğruluk (accuracy) ölçeğinde
97%’yi aşan başarılar yakalanmıştır. Keza, yine Saxe ve Berlin
[7] derin öğrenme yöntemlerinin bahsi geçen problem üzerinde
etkinliğini ölçümlemişlerdir.
İlgili çalışmalara bakıldığında CNN kullanılarak yapılan
araştırmaların büyük kısmının VGG [9] ve Alexnet [8] ağları
veya özgün mimarileri üzerinde gerçekleştirilm olduğu
gözlemlenmektedir. Ne var ki, CNN yöntemleri günümüze
değin hız kaybetmeden gelişmiş, daha etkin ağ tasarımları daha
az parametre içerecek şekilde tasarlanmış ve önerilmiştir. Bu
çalışmada 2012 yılından bu yana alan yazınına girmiş ve doğal
görsellerin sınıflandırılması probleminde başarısı kanıtlanmış
modern CNN mimarilerinin kötücül yazılım sınıflandırmadaki
etkinliği araştırılmış ve incelenmiştir. Bu bağlamda bu
çalışmanın katkıları şu şekilde sıralanmaktadır:
AlexNet ve VGG ağlarından farklı olarak Inception
[10], ResNet [11] ve DenseNet [12] mimarileri farklı
varyasyonlarıyla birlikte problem uzayında denenerek
başarımları ve eğitim süreleri ölçülmüştür.
Gri ölçekli görsellerin kullanımı terkedilerek 3 kanallı
RGB görseller elde edilmiş ve deneylerde
kullanılmıştır.
Deneylerin yapılabilmesi adına “MaleVis” [13] ismi
verilmiş olan özgün bir kötücül yazılım veri kümesi
kurulmuştur ve gelecek çalışmalar için erişime
açılmıştır. Bu veri kümesi farklı familyalara ait kötücül
yazılımların ham PE (portable executable) dosyaları ile
bu dosyalardan elde edilen farklı çözünürlükteki
imgeleri içermektedir.
Bildirinin geri kalanı şu şekilde düzenlenmiştir. Bölüm 2’de
çalışmanın kullandığı yöntem ve araçlar kısaca tanıtılmıştır.
Bölüm 3’de veri kümesine ait ayrıntılar paylaşılmıştır. Bölüm
4’de deney tasarımı ve sonuçlar sunulmuştur. Son kısımda
sonuç bölümü yer almaktadır.
II. YÖNTEM VE ARAÇLAR
A. Evrişimsel Sinir Ağları
İlk olarak 2012 yılında Krizhevksy v.d. [8] tarafından doğal
görüntülerin sınıflandırılması probleminde önerilen (Alexnet)
ve elde ettiği başarıyla devrim yaratan evrişimsel sinir ağları
zaman içerisinde nesne tanıma, segmentasyon ve hatta metin
sınıflandırma gibi problemlere uyarlanmıştır. İlerleyen yıllar
içerisinde bu yeni nesil yapay sinir ağları önceleri derinlik
anlamında gelişme göstermiştir. Oxford Üniversitesi Visual
Geometry Group bünyesinde önerilen VGG ağları (Vgg-11,
Vgg-16, Vgg-19) [9] daha yüksek kestirim performansı
göstermekle birlikte gerekli eğitim resi ve parametre sayısı
bakımından maliyetlidir. Öte yandan VGG ağları yeteri sayıda
eğitim verisi bulunmadığı takdirde kaybolan eğim (vanishing
gradient) problemine karşı duyarlılık taşımaktadır. Bu
problemleri aşmak adına 1×1, 3×3 ve 5×5 boyutunda filtrelerin
birlikte kurgulandığı “inception” bloklarını içeren 22 katmanlı
GoogleNet ağı Szegedy v.d. [10] tarafından önerilmiş ve
ImageNet 2015 yarışmasında birincilik kazanmıştır. İlerleyen
dönemde daha derin ağların kestirim performansına olumlu
katkı koyduğu gözlemlenmiş ancak kaybolan eğim problemini
aşabilmenin ve 100 katmandan daha derin ağları üretebilmenin
bir yolu olarak birim matrislerinin evrişim operasyonu
sonrasında toplanmasına dayalı Resnet [11] mimarisi
önerilmiştir. Bu yaklaşımdan farklı olarak Huang v.d. [12] her
katman bloğunun diğer katman bloklarına bilgi taşımasına izin
veren yoğun (dense) blok ve geçiş (transition) katmanlarının
peşi sıra birleştirilmesi kavramını önermiştir. Bu yaklaşım
DenseNet mimarisinin temelini oluştururken elde edilen nitelik
haritalarının Resnet mimarisindeki toplama işlemi yerine
birleştirme (concatanation) işlemine sokulmasına dikkat
edilmelidir. Sayfa sınırı olmasından dolayı okuyucunun daha
ayrıntılı bilgi için ilgili numaralandırılmış kaynakları
incelemeleri önerilmektedir.
B. Ön İşlemler
Bu çalışmada Şekil 1 de gösterildiği üzere farklı CNN
mimarilerinin kötücül yazılımlardan elde edilen imgeler
üzerindeki sınıflama başarımları gözlemlenmeye çalışılmıştır.
Bu nedenle ilk olarak ikili dosyaların imgelere dönüştürülmesi
gerekmiştir. Bu noktada https://github.com/ESultanik/bin2png
adresinde yer alan ve Python dilinde kodlanmış olan “bin2png”
betiğinden yararlanılmıştır. Bin2png betiği kendisine verilen
herhangi bir ikili dosyayı PNG biçimine kayıpsız olarak
dönüştürebilmektedir. Ancak ilgili betiğin özgün hali Python
2.7 platformuna göre kodlanmıştır. İlk olarak daha etkin bir
kullanım için özgün betik tarafımızca Python 3 platformuna
uyumlandırılmış ve veri kümesinde yer alan tüm KY sınıflarına
ait PNG imgeler oluşturulmuştur. İmgelerin oluşturulma
aşamasında rsellerin genişliği 224 veya 300 piksel olacak
şekilde ayarlanmıştır. Daha sonrasında farklı CNN ağlarının
farklı boyuttaki girdi ihtiyaçlarına yönelik birbirinden farklı
uzunluktaki imgeler OpenCV [14] kütüphanesi üzerinde 8×8
komşuluğu dikkate alan Lanczos interpolasyonu yöntemi
kullanılarak 224×224 ve 300×300 boyutuna ölçeklendirilmiştir.
Böylelikle ölçeklendirme aşamasında imgelere ait piksellerdeki
kaybın minimize edilmesi hedeflenmiştir. Elde edilen
imgelerden oluşan veri kümesi genel olarak 70% eğitim – 30%
geçerleme olacak şekilde bölümlenerek nihai veri kümesi
oluşturulmuştur.
Şekil. 1. Analiz sürecinin akış çizeneği
C. Derin Öğrenme Kütüphane ve Çatıları
Çalışma boyunca testleri gerçekleştirilen CNN modelleri
Pytorch v0.4 [15] ve Caffe v0.16.1 [16] derin öğrenme çatıları
kullanılarak eğitilmiştir. Eğitimlerde kullanılan ağların ön
eğitimli modelleri yerine baştan (from scratch) itim tercih
edilmiştir. Inception (GoogleNet) ağı haricindeki tüm diğer
ağlar Pytorch içerisinde tanımlı olduğundan bu ağların
eğitiminde ve testlerinde Pytorch çatısından faydalanılmıştır.
III. VERİ KÜMESİ
Bu belgede bahsi geçen çalışmaya başlanmadan önce ilgili
çalışmaların kullandıkları veri kümeleri incelendiğinde bu veri
kümelerinin ham ikili dosyaları içermediği veya gri ölçekli
imgelerden oluştukları gözlenmiştir. Dolaysıyla bu içerikler
üzerinden çalışmanın yürütülmesi olanaksız hale gelmiştir. Bu
nedenle çalışma için kötücül yazılım laboratuvarı bulunan ve
bu alanda faaliyet gösteren bir siber güvenlik firmasıyla ortak
çalışılarak 25 farklı familyadan oluşan ham PE dosya kümesi
derlenmiştir. Derlemdeki dosyalar 2017-2018 yıllarında ortaya
çıkan kötücül yazılımlardan elde edilmiştir. Her bir familya
için 500 veya yakın sayıda KY örneği içeren ve MaleVis
Malware Evaluation with Vision” [12] olarak adlandırılan
veri kümesi dengeli bir dağılıma sahiptir. Aşağıda yer alan
Tablo 1 de veri kümesinde yer alan kötücül yazılımların
familya, kategori ve sayıca dağılımları sunulmuştur. Tabloda
görüleceği üzere eğitim ve test örnekleri 70%-30% şeklinde
oluşturulmuştur. Veri kümesi toplamda 8750 eğitim, 3644 test
örneği barındırmaktadır.
TABLO I. MALEVIS VERİ KÜMESİ İÇERİĞİ
No
Sınıf İsmi
Kategori
Eğitim/Test
Örneği Sayıları
1
Win32/Adposhel
Adware
350/144
2
Win32/Agent-fyi
Trojan
350/120
3
Win32/Allaple.A
Worm
350/128
4
Win32/Amonetize
Adware
350/147
5
Win32/Androm
Backdoor
350/150
6
Win32/AutoRun-PU
Worm
350/146
7
Win32/BrowseFox
Adware
350/143
8
Win32/Dinwod!rfn
Trojan
350/149
9
Win32/Elex
Trojan
350/150
10
Win32/Expiro-H
Virus
350/150
11
Win32/Fasong
Worm
350/150
12
Win32/HackKMS.A
Trojan
350/149
13
Win32/Hlux!IK
Worm
350/150
14
Win32/Injector
Trojan
350/145
15
Win32/InstallCore.C
Adware
350/150
16
Win32/MultiPlug
Adware
350/149
17
Win32/Neoreklami
Adware
350/150
18
Win32/Neshta
Virus
350/147
19
Win32/Regrun.A
Trojan
350/135
20
Win32/Sality
Virus
350/149
21
Win32/Snarasite.D!tr
Trojan
350/150
22
Win32/Stantinko
Backdoor
350/150
23
VBA/Hilium.A
Virus
350/150
24
Win32/VBKrypt
Trojan
350/146
25
Win32/Vilsel
Trojan
350/146
MaleVis veri kümesi gerek ham KY dosyalarını gerekse de
RGB kanallı PNG imgelerini doğrudan derin öğrenme
kütüphanelerinin kullanılabileceği şekilde kurulmuştur.
Bununla birlikte ilgili veri kümesi yapılacak sonraki çalışmalar
için araştırmacıların ücretsiz kullanımına açılmıştır.
IV. DENEY TASARIMI VE SONUÇLAR
A. Deney Süreci
Bu çalışmada daha önceki kesimlerde belirtildiği üzere
AlexNet, VGG (11 ve 16 katmanlı), Resnet (18, 34, 50 ve 101
katmanlı) Inception (sürüm 1 ve 3) ve Densenet (121, 169 ve
201 katmanlı) CNN mimarileri kullanılmıştır. Yapılan
eğitimlerin ilk basamağında tüm evrişimsel filtreler rassal
ağırlıklarla başlatılmıştır. Gerçekleştirilen deneylerde öğrenme
katsayısı (learning rate) 0.01, sönümleme katsayısı
(momentum) 0.8, adım sayısı (step size) 10 olarak belirlenmiş
ve tüm eğitimler 60 dönemi (epoch) kapsayacak şekilde
uygulanmıştır. Ayrıca geri yayılım eniyilemesinde SGD
(Stochastic Gradient Descent) yöntemi benimsenmiştir.
Deneyler,16 GB DDR4 hafızaya, Intel i7 6700K işlemciye,
512 GB SSD sabit diske ve NVidia GTX 1060 6GB GPU’ya
sahip bir bilgisayar üzerinde GPU tabanlı gerçekleştirilmiştir.
Farklı CNN mimarilerinin farklı bellek gereksinimleri
bulunmasından ötürü tüm CNN modelleri kullandığımız
GPU’nun belleğine maksimum derecede sığacak yığın
boylarında (batch size) eğitilmiştir.
B. Sonuçlar ve Tartışma
Gerçekleştirilen deneylere ait sonuçlar Tablo 2’de
sunulmuştur. Sonuçlar elde edilen en yüksek doğruluk
(accuracy), her bir dönemin eğitim ve geçerleme süresi, toplam
eğitim süresi ve yığın sayısını kapsamaktadır. Buna göre
problem uzayında doğruluk bağlamında en başarılı mimari
97.48% doğrulukla Densenet türevleri olmuştur. Ayrıca
Densenet ağları diğer ağlara nazaran çok daha kısa sürede
yakınsayabilmiştir. Aşağıda yer alan Şekil 2’de geçerleme
verisi üzerinde Densenet 201 ağıyla elde edilmiş örnek bir
doğruluk tablosu sunulmuştur. Densenet mimarisinin katman
sayısındaki farklılıklar süreleri etkilemekle birlikte geçerleme
başarısında bir farklılığa neden olmamıştır. Bu bağlamda 121
katmanlı DenseNet mimarisinin kullanımı yeterli
olabilmektedir.
1) Aksis tanımlamaları: 8 büklüğünde punto kullanınız.
Kısaltma kullanmayınız. Birim ekleyecekseniz “Sıcaklık/K
dil, “Sıcaklık (K)şeklinde olmalıdır.
Şekil. 2. DenseNet201 ağıyla elde edilen doğruluk tablosu
Başarı anlamında Resnet18 mimarisi çok daha az katmana
sahip olmakla birlikte 97.18% doğruluk ile ikinci sırada yer
almıştır. Resnet18 ağının parametre sayısındaki tutumluluğu,
hızlı eğitimi ve toplamda 3644 imgeyi 5 saniye gibi kısa sürede
geçerleyebilmesi problem uzayında tercih edilebilir bir mimari
olduğunu göstermektedir. VGG ağları daha önceki
çalışmalarda kullanılmış ve başarısı kanıtlanmış ağlar olmakla
birlikte daha yeni ağlar karşısında geride kalmaktadır.
Sonuçların ortaya koyduğu iki önemli bulgu bulunmaktadır.
İlki kötücül yazılımların tanınması probleminde kullanılan
ağlar bağlamında evrişimsel katman sayısının başarım üzerinde
ciddi bir etki yaratamadığıdır. İkincisi ise KY imgelerinde
çıkarılan nitelik ve nitelik haritalarından elde edilen bilginin ilk
katmanlardan katmanlara kadar taşınabilmesinin ve
birleştirilebilmesinin başarımda pozitif etki göstermesidir.
Densenet mimarisinin diğer ağlara nazaran daha ilk
dönemlerde hızlı yakınsaması ve gösterdiği başarının altında
yatan temel nedenin bu olduğunu düşünmekteyiz.
V. SONUÇ
Bu çalışmada kötücül yazılımların tanınması probleminde
2012 yılından bugüne değin geliştirilmiş birçok CNN mimarisi
önerilen bir veri kümesi üzerinde test edilerek sonuçları ortaya
koyulmuştur. Yapılan analizler neticesinde Densenet ve Resnet
mimarilerinin diğer mimarilere göre daha başarılı olduğu, 3
kanallı RGB imgelerin problemin çözümünde sorun
yaratmadığı gözlemlenmiştir. Bununla birlikte gelecek
çalışmalarda problemin açık küme (open-set) problemi haline
dönüştürülerek, kötücül yazılımlarla birlikte güvenilir
yazılımların tek bir çatı altında sınıflandırılabilmesinin
araştırılması planlanmaktadır.
BİLGİLENDİRME
Yazarlar, bu çalışmada kullanılan kötücül yazılım veri
kümesinin temininde Comodo Inc. firmasına teşekkürlerini
sunar.
KAYNAKLAR
[1] K. Aktas and S. Sen,“UpDroid: Updated Android Malware and Its
Familial Classification",in Nordsec'18 2018.
[2] S. Ni, Q. Qian and R. Zhang, "Malware identification using visualization
images and deep learning", Computers & Security, vol. 77, pp.871-885,
2018. .
[3] L. Nataraj, D. Kirat, B.S. Manjunath, G. Vigna, “SARVAM: Search and
RetrieVAl of Malware”, in NGMAD’13, 2013.
[4] L. Nataraj, S. Karthikeyan, G. Jacob and B.S. Manjunath, “Malware
Images: Visualization and Automatic Classification”, in VizSec’11,
2011.
[5] K. Özkan, Ş. Işık and Y. Kartal, “Evaluation of Convolutional Neural
Network Features for Malware Detection”, In 6th International
Symposium on Digital Forensic and Security, 2018.
[6] S. Yue, “Imbalanced Malware Images Classification: a CNN based
Approach”, arXiv: 1708.08042, 2017.
[7] J.Saxe and K. Berlin, “Deep neural network based malware detection
using two dimensional binary program features”, In 10th International
Conference on Malicious and Unwanted Software, 2015.
[8] A. Krizevsky, I. Sutsever and G. Hinton, “Imagenet classification with
deep convolutional neural networks. In Advances in neural information
processing systems, pp. 1097-1105, 2012.
[9] K. Simonyan ve A. Zisserman, “Very deep convolutional network for
large scale image recognition”, arXiv preprint arXiv:1409.1556, 2014.
[10] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D.
Erhan, V. Vanhoucke and A. Rabinovich, “Going deeper with
convolutions, In Proceedings of the IEEE Conference on Computer
Vision and Pattern Recognition, pp. 1-9, 2015.
[11] K. He, X. Zhang, S. Ren and J. Sun, “Deep residual learning for image
recognition”, In Proceedings of the IEEE Conference on Computer
Vision and Pattern Recognition, pp. 770-778, 2016.
[12] G. Huang, Z. Liu, L.V.D. Maaten, K. Q. Weinberger, “Densely
connected convolutional network”, arXiv preprint arXiv: 1608.06993,
2016.
[13] Malevis Dataset, https://web.cs.hacettepe.edu.tr/~selman/malevis/
[14] OpenCV, https://opencv.org/ (8.2.2019 tarihinde ziyaret edilmiştir)
[15] Pytorch, https://pytorch.org/ (8.2.2019 tarihinde ziyaret edilmiştir)
[16] Caffe, http://caffe.berkeleyvision.org/ (8.2.2019 tarihinde ziyaret
edilmiştir)
TABLO II. FARKLI CNN MİMARİLERİNDEN ELDE EDİLEN EN YÜKSEK DOĞRULUK SONUÇLARI VE DİĞER ÖZELLİKLER
-Mimari
Doğruluk (Eğitim)
Doğruluk (Geçerleme)
Toplam Eğitim Süresi
Yığın Sayısı
AlexNet
98.73%
94.43%
13 dakika
128
VGG11
99.99%
96.46%
153 dakika
16
VGG16
99.82%
96.10%
278 dakika
16
Resnet18
99.99%
97.17%
45 dakika
64
Resnet34
99.98%
96.84%
84 dakika
48
Resnet50
99.97%
97.03%
136 dakika
16
Resnet101
99.97%
97.09%
233 dakika
12
Inception (Googlenet)
99.99%
96.38%
50 dakika
32
Inception V3
99.53%
96.62%
214 dakika
12
Densenet121
99.98%
97.48%
138 dakika
12
Densenet169
99.92%
97.48%
192 dakika
8
Densenet201
99.98%
97.48%
247 dakika
8
... Nataraj et al. (2011) first visualized Malware binaries as grayscale images based on the observation that the images belonging to the same malware family appear very similar in layout and texture. In their solution, Bozkir et al. (2019) employed several various convolutional neural networks to classify persistent malware files. They converted PE files' binary bytes into images, and they reported 97.48% detection accuracy in experiments. ...
... To evaluate MRm-DLDet as comprehensively as possible, we compared it with four recent malware detection methods combining deep learning and vision-based methods. Bozkir et al. (2019) converted raw binary bytes of PE files into RGB images and used convolutional neural networks to classify persistent malware files. Pinhero et al. (2021) visualized PE files into grayscale, RGB, and Markov images and extracted features of the three types of images by Gabor filters. ...
Article
Full-text available
Cyber attackers have constantly updated their attack techniques to evade antivirus software detection in recent years. One popular evasion method is to execute malicious code and perform malicious actions only in memory. Malicious programs that use this attack method are called memory-resident malware, with excellent evasion capability, and have posed huge threats to cyber security. Traditional static and dynamic methods are not effective in detecting memory-resident malware. In addition, existing memory forensics detection solutions perform unsatisfactorily in detection rate and depend on massive expert knowledge in memory analysis. This paper proposes MRm-DLDet, a state-of-the-art memory-resident malware detection framework, to overcome these drawbacks. MRm-DLDet first builds a virtual machine environment and captures memory dumps, then creatively processes the memory dumps into RGB images using a pre-processing technique that combines deduplication and ultra-high resolution image cropping, followed by our neural network MRmNet in MRm-DLDet to fully extract high-dimensional features from memory dump files and detect them. MRmNet receives the labeled sub-images of the cropped high-resolution RGB images as input of ResNet-18, which extracts the features of the sub-images. Then trains a network of gated recurrent units with an attention mechanism. Finally, it determines whether a program is memory-resident malware based on the detection results of each sub-image through a specially designed voting layer. We created a high-quality dataset consisting of 2,060 benign and memory-resident programs. In other words, the dataset contains 1,287,500 labeled sub-images cut from the MRm-DLDet transformed ultra-high resolution RGB images. We implement MRm-DLDet for Windows 10, and it performs better than the latest methods, with a detection accuracy of up to 98.34 $$\%$$ % . Moreover, we measured the effects of mimicry and adversarial attacks on MRm-DLDet, and the experimental results demonstrated the robustness of MRm-DLDet.
... The dataset was dealt with by Hacettepe University's Computer Engineering Multimedia Information Lab. It provides an RGB-based Core Fact Dataset for evaluating vision-based multiclass malware identification studies [6]. We used Keras Framework with TensorFlow in back-end, this about for deep learning libraries. ...
Chapter
Full-text available
In today’s cyber security landscape, companies are facing increasing pressure to protect their data and systems from malicious attackers. As a result, there has been a significant rise in the number of security solutions that can identify malware. But how do you know if an image file is infected with malware? How can you prevent it from running? This blog post covers everything you need to know about malware in your images and how to prevent them from running. The malware will allow the attacker or un-legitimate user to enter the system without being recognized as a valid user. In this paper, we will look at how malware can hide within images and transfer between computers in the background of any system. In addition, we will describe how deep transfer learning can detect malware hidden beneath images in this paper. In addition, we will compare multiple kernel models for detecting malicious images. We also highly suggest which model should be used by the system for detecting malware.
... The first dataset is used to evaluate the classification performance. The experiments are conducted by using malware samples from Nataraj et al. (2011) and Bozkir et al. (2019), Virus-mnist (Noever and Noever 2021) and self-made malware samples. There are more than 99, 069 malware samples from 7 families as shown in Table 3. ...
Article
Full-text available
As image classification is gaining momentum in many applications, it is a common practice for malware detection to convert each malware sample into a gray-scale image for analysis. While most existing deep learning models take fixed-size images as inputs, malware gray-scale images are often of varied length and width. In this study, we propose a Convolutional Neural Network (CNN) that can take both fixed and varied-size images as inputs by introducing Spatial Pyramid Pooling on the last pooling layer in CNN. Furthermore, we visualized the feature maps by saliency maps and demonstrated that malware images show strong stripe patterns. Based on this observation, we propose Stripe Pooling CNN (SP-CNN) and Pyramid Stripe Pooling CNN (PSP-CNN) to enhance the performance of malware classification. Our experimental results show that PSP-CNN, with 98.72% accuracy, 97.45% recall, 100% precision, 100% specificity and 98.71% F1 score, tops the other four models for malware classification. SP-CNN follows and achieves 98.50% accuracy. All trained models are also applicable for malware detection and PSP-CNN performs the best on all performance metrics with 99.31% detection accuracy and 100% precision.
... Hemalathaet al. [38] proposed a visualization-based method, where malware binaries were depicted as two-dimensional images and then classified by DenseNet model. The study was evaluated on four different datasets;Malimg [40], Big2015 [41], MaleVis [42] and Malicia [43]. The model achieved high accuracy, however the proposed method came with high false negative rate. ...
Conference Paper
The rapid evolution of technology in the past years largely contributed to the digital transformation, however, attackers took advantage of it to spread malicious software (malware). Nowadays, malware has become more sophisticated, which makes it harder to be detected with traditional techniques. Over the years, attacks became, not only limited to computer-based operating systems, but also to that of mobilebased, which makes it even harder for analysts. Furthermore, this increases the need for more research in this direction. The technological evolution also gives researchers the chance to utilize Artificial Intelligence widely and leverage its capabilities in many fields in general and in the field of malware detection in particular. This paper provides a literature review on malware detection using Artificial Intelligence techniques and specifically, Machine Learning and Deep Learning techniques. The paper helps researchers to have a broad idea of the latest malware detection techniques, available datasets, challenges, and limitations.
Article
Full-text available
Targeted malware attacks are usually more purposeful and harmful than untargeted attacks, so it is important to perform the malware family classification. In classification tasks, convolutional neural networks (CNN) have shown superior performance. However, clean samples with intentional small-scale perturbations (i.e. adversarial examples) may lead to incorrect decisions made by CNN-based classifiers. The most successful approach to improve the robustness of classifiers is adversarially trained on practical adversarial examples. Despite many attempts, previous works have not dealt with generating executable adversarial examples in a pure black-box manner to emulate adversarial threats. The aim of this work is to generate realistic adversarial malware examples and improve the robustness of classifiers against these attacks. We first explain the decision of malware classification by the saliency detection technique and argue that there are two similarities in saliency distribution of CNN classifiers. To explore the under-researched Malware to Malware threats that deceive PE malware classifiers into targeted misclassification, we propose the Saliency Append (SA) attack method based on the two saliency similarities, which produces adversarial examples via only one query, achieving higher attack success rate than other append-based attacks. We use these examples to improve the robustness of classifiers by adversarially trained on the generated adversarial examples. Compared to classifiers trained on other attacks, our approach produces classifiers that are significantly more robust against the proposed SA attack as well as others.
Chapter
Malware is a serious threat in a world where IoT devices are becoming more and more pervasive; indeed, every day new and more sophisticated malware can rely on an attack surface that grows together with the number of new devices coming to the market. There is a constant competition between malware detection systems that have to adapt their knowledge base and heuristics day by day and malware writers that have to find new techniques to evade these systems. In this scenario, machine learning methods are the best candidate to face the continuous evolution of malware; this justifies the increasing interest in such approaches to build antimalware systems able to learn and adapt themselves. However, a still open question is how robust machine learning-based systems are against obfuscation techniques: methods that base their effectiveness on what they are able to learn from a training set are potentially vulnerable to modifications of the code that alter the probabilistic distribution of the features observed during the training phase. In this paper we propose a comparison of seven different methods trained to classify malware, paying specific attention to the recent image-based approaches. The comparison has been conducted using one of the largest dataset of malware publicly released until now, i.e., the SOREL-20M, composed of more than 20 million of samples divided in 11 families of malware. In the proposed analysis, we have considered four basic obfuscation techniques based on the addition of a sequence of bytes at the end of the executable; they are very easy to implement for a malware writer. All the tested methods achieved a very high accuracy on unmodified test samples, but only few of them have demonstrated to be able to withstand the considered obfuscation techniques.KeywordsBinary file analysisImage-based malware analysisMalware classificationMachine learningConvolutional neural networks
Chapter
Full-text available
Android is the platform most targeted by attackers. While security solutions have improved against such attacks on one side, at- tackers introduce new variants of existing malware by employing new strategies to evade them on another side. One of the most effective evasion techniques widely used is updating malicious code at runtime. In this study, an up-to-date dataset of such update attacks called UpDroid is introduced and then analyzed. This dataset consists of 2,479 samples belonging to 21 malware families, of which most have been discovered in just the last few years. While this dataset gives an overview of recent malware, it will also be useful for researchers working on dynamic analysis. Furthermore, in this study, a new classification algorithm based on both static and dynamic features is introduced in order to group such malware into families.
Article
Full-text available
Recent work has shown that convolutional networks can be substantially deeper, more accurate and efficient to train if they contain shorter connections between layers close to the input and those close to the output. In this paper we embrace this observation and introduce the Dense Convolutional Network (DenseNet), where each layer is directly connected to every other layer in a feed-forward fashion. Whereas traditional convolutional networks with L layers have L connections, one between each layer and its subsequent layer (treating the input as layer 0), our network has L(L+1)/2 direct connections. For each layer, the feature maps of all preceding layers are treated as separate inputs whereas its own feature maps are passed on as inputs to all subsequent layers. Our proposed connectivity pattern has several compelling advantages: it alleviates the vanishing gradient problem and strengthens feature propagation; despite the increase in connections, it encourages feature reuse and leads to a substantial reduction of parameters; its models tend to generalize surprisingly well. We evaluate our proposed architecture on five highly competitive object recognition benchmark tasks. The DenseNet obtains significant improvements over the state-of-the-art on all five of them (e.g., yielding 3.74% test error on CIFAR-10, 19.25% on CIFAR-100 and 1.59% on SVHN).
Article
Currently, malware is one of the most serious threats to Internet security. In this paper we propose a malware classification algorithm that uses static features called MCSC (Malware Classification using SimHash and CNN) which converts the disassembled malware codes into gray images based on SimHash and then identifies their families by convolutional neural network. During this process, some methods such as multi-hash, major block selection and bilinear interpolation are used to improve the performance. Experimental results show that MCSC is very effective for malware family classification, even for those unevenly distributed samples. The classification accuracy can be 99.260% at best and 98.862% at average on a malware dataset of 10,805 samples which is higher than other compared algorithms. Moreover, for MCSC, on average, it just takes 1.41s to recognize a new sample, which can meet the requirements in most of the practical applications.
Technical Report
In this work we investigate the effect of the convolutional network depth on its accuracy in the large-scale image recognition setting. Our main contribution is a thorough evaluation of networks of increasing depth, which shows that a significant improvement on the prior-art configurations can be achieved by pushing the depth to 16-19 weight layers. These findings were the basis of our ImageNet Challenge 2014 submission, where our team secured the first and the second places in the localisation and classification tracks respectively.
Conference Paper
We trained a large, deep convolutional neural network to classify the 1.2 million high-resolution images in the ImageNet LSVRC-2010 contest into the 1000 dif- ferent classes. On the test data, we achieved top-1 and top-5 error rates of 37.5% and 17.0% which is considerably better than the previous state-of-the-art. The neural network, which has 60 million parameters and 650,000 neurons, consists of five convolutional layers, some of which are followed by max-pooling layers, and three fully-connected layers with a final 1000-way softmax. To make training faster, we used non-saturating neurons and a very efficient GPU implemen- tation of the convolution operation. To reduce overfitting in the fully-connected layers we employed a recently-developed regularization method called dropout that proved to be very effective. We also entered a variant of this model in the ILSVRC-2012 competition and achieved a winning top-5 test error rate of 15.3%, compared to 26.2% achieved by the second-best entry
Article
Deep convolutional neural networks (CNNs) can be applied to malware binary detection through images classification. The performance, however, is degraded due to the imbalance of malware families (classes). To mitigate this issue, we propose a simple yet effective weighted softmax loss which can be employed as the final layer of deep CNNs. The original softmax loss is weighted, and the weight value can be determined according to class size. A scaling parameter is also included in computing the weight. Proper selection of this parameter has been studied and an empirical option is given. The weighted loss aims at alleviating the impact of data imbalance in an end-to-end learning fashion. To validate the efficacy, we deploy the proposed weighted loss in a pre-trained deep CNN model and fine-tune it to achieve promising results on malware images classification. Extensive experiments also indicate that the new loss function can fit other typical CNNs with an improved classification performance.
Conference Paper
In this paper we introduce a deep neural network based malware detection system that Invincea has developed, which achieves a usable detection rate at an extremely low false positive rate and scales to real world training example volumes on commodity hardware. We show that our system achieves a 95% detection rate at 0.1% false positive rate (FPR), based on more than 400,000 software binaries sourced directly from our customers and internal malware databases. In addition, we describe a non-parametric method for adjusting the classifier’s scores to better represent expected precision in the deployment environment. Our results demonstrate that it is now feasible to quickly train and deploy a low resource, highly accurate machine learning classification model, with false positive rates that approach traditional labor intensive expert rule based malware detection, while also detecting previously unseen malware missed by these traditional approaches. Since machine learning models tend to improve with larger datasizes, we foresee deep neural network classification models gaining in importance as part of a layered network defense strategy in coming years.