Skip to content

Kenun99/MalwareBinaryMultiClassify-Base-gray-Image

Repository files navigation

Requirements

python 3.5

Keras 1.12.0

Tensorflow 1.1.0

sklearn

numpy

pandas

matplotlib

Usage:

unzip ./dataset/imgfeature_extent_10000.zip to get the whole dataset_X

python3 model.py will train the model and save it as Bpnn_features10000_model_batchSize512

python3 example.py is to predict single example

Dataset

from Kaggle :

https://www.kaggle.com/c/malware-classification/data

unzip the ./dataset/imgfeature_extent_10000.zip to get the whole dataset_X

trainLables2.csv is the whole dataset_Y

The dataset contain 2w example which is divided as nine classes.

Besides,It is not balance.

I choose 0.15 dataset as test data

dataset

each example contains 2w featutes. one feature actually is a pixel value from 0 to 0xff.

Here is one grey picture.

example_grey

Model

Simple Three Dense Model, which detail is shown below.

img

Train

Comparing different epochs and batch size how to change the training result.

1567252145053

So we choose

Batch Size =  512

Epochs = 30

Dropout = 0.1

Then we get the training acc&loss curve.

train_process

Test

result

Confuse matrix

[193 0 9 0 0 1 0 0 0]

[ 1 360 0 0 0 0 0 0 0]

[ 1 0 389 0 0 0 0 0 0]

[ 4 0 0 56 0 0 0 0 0 ]

[ 1 0 1 0 2 4 0 0 0 ]

[ 6 0 2 0 0 105 0 0 0]

[ 2 0 18 0 0 0 37 0 0]

[ 0 0 0 0 0 0 0 194 3]

[ 0 0 0 0 0 0 0 5 140]

change the value into pixel to get below picture.

confusion_matrix

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages