All Projects → AFAgarap → Malware Classification

AFAgarap / Malware Classification

Licence: gpl-3.0
Towards Building an Intelligent Anti-Malware System: A Deep Learning Approach using Support Vector Machine for Malware Classification

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Malware Classification

Cnn Svm
An Architecture Combining Convolutional Neural Network (CNN) and Linear Support Vector Machine (SVM) for Image Classification
Stars: ✭ 170 (+93.18%)
Mutual labels:  artificial-intelligence, classification, convolutional-neural-networks, artificial-neural-networks, supervised-learning
Gru Svm
[ICMLC 2018] A Neural Network Architecture Combining Gated Recurrent Unit (GRU) and Support Vector Machine (SVM) for Intrusion Detection
Stars: ✭ 76 (-13.64%)
Mutual labels:  artificial-intelligence, classification, recurrent-neural-networks, artificial-neural-networks, supervised-learning
Transfer Learning Suite
Transfer Learning Suite in Keras. Perform transfer learning using any built-in Keras image classification model easily!
Stars: ✭ 212 (+140.91%)
Mutual labels:  artificial-intelligence, classification, convolutional-neural-networks, image-classification
Rmdl
RMDL: Random Multimodel Deep Learning for Classification
Stars: ✭ 375 (+326.14%)
Mutual labels:  classification, convolutional-neural-networks, image-classification, recurrent-neural-networks
Trending Deep Learning
Top 100 trending deep learning repositories sorted by the number of stars gained on a specific day.
Stars: ✭ 543 (+517.05%)
Mutual labels:  artificial-intelligence, convolutional-neural-networks, recurrent-neural-networks, artificial-neural-networks
Top Deep Learning
Top 200 deep learning Github repositories sorted by the number of stars.
Stars: ✭ 1,365 (+1451.14%)
Mutual labels:  artificial-intelligence, convolutional-neural-networks, recurrent-neural-networks, artificial-neural-networks
First Steps Towards Deep Learning
This is an open sourced book on deep learning.
Stars: ✭ 376 (+327.27%)
Mutual labels:  artificial-intelligence, convolutional-neural-networks, recurrent-neural-networks, artificial-neural-networks
Deep Learning With Python
Deep learning codes and projects using Python
Stars: ✭ 195 (+121.59%)
Mutual labels:  artificial-intelligence, convolutional-neural-networks, image-classification, recurrent-neural-networks
dl-relu
Deep Learning using Rectified Linear Units (ReLU)
Stars: ✭ 20 (-77.27%)
Mutual labels:  recurrent-neural-networks, supervised-learning, classification, artificial-neural-networks
Artificio
Deep Learning Computer Vision Algorithms for Real-World Use
Stars: ✭ 326 (+270.45%)
Mutual labels:  artificial-intelligence, convolutional-neural-networks, image-classification
Text Classification Models Pytorch
Implementation of State-of-the-art Text Classification Models in Pytorch
Stars: ✭ 379 (+330.68%)
Mutual labels:  classification, convolutional-neural-networks, recurrent-neural-networks
Graph 2d cnn
Code and data for the paper 'Classifying Graphs as Images with Convolutional Neural Networks' (new title: 'Graph Classification with 2D Convolutional Neural Networks')
Stars: ✭ 67 (-23.86%)
Mutual labels:  artificial-intelligence, classification, convolutional-neural-networks
Komputation
Komputation is a neural network framework for the Java Virtual Machine written in Kotlin and CUDA C.
Stars: ✭ 295 (+235.23%)
Mutual labels:  artificial-intelligence, convolutional-neural-networks, recurrent-neural-networks
L2c
Learning to Cluster. A deep clustering strategy.
Stars: ✭ 262 (+197.73%)
Mutual labels:  artificial-intelligence, artificial-neural-networks, supervised-learning
Echotorch
A Python toolkit for Reservoir Computing and Echo State Network experimentation based on pyTorch. EchoTorch is the only Python module available to easily create Deep Reservoir Computing models.
Stars: ✭ 231 (+162.5%)
Mutual labels:  artificial-intelligence, recurrent-neural-networks, artificial-neural-networks
Pba
Efficient Learning of Augmentation Policy Schedules
Stars: ✭ 461 (+423.86%)
Mutual labels:  artificial-intelligence, convolutional-neural-networks, image-classification
Deeplearning.ai
deeplearning.ai , By Andrew Ng, All video link
Stars: ✭ 625 (+610.23%)
Mutual labels:  artificial-intelligence, convolutional-neural-networks, artificial-neural-networks
Reading comprehension tf
Machine Reading Comprehension in Tensorflow
Stars: ✭ 37 (-57.95%)
Mutual labels:  artificial-intelligence, convolutional-neural-networks, recurrent-neural-networks
All Classifiers 2019
A collection of computer vision projects for Acute Lymphoblastic Leukemia classification/early detection.
Stars: ✭ 22 (-75%)
Mutual labels:  artificial-intelligence, convolutional-neural-networks, artificial-neural-networks
Hardhat Detector
A convolutional neural network implementation of a script that detects whether an individual is wearing a hardhat or not.
Stars: ✭ 41 (-53.41%)
Mutual labels:  artificial-intelligence, convolutional-neural-networks, image-classification

Towards Building an Intelligent Anti-Malware System: A Deep Learning Approach using Support Vector Machine for Malware Classification

DOI AUR PyPI

The full paper may be read at arXiv.org.

Abstract

Effective and efficient mitigation of malware is a long-time endeavor in the information security community. The development of an anti-malware system that can counteract previously-unknown malware is a prolific activity that may benefit several sectors. We envision an intelligent anti-malware system that utilizes the power of deep learning (DL) models. Using such models would enable the detection of newly-released malware through mathematical generalization. That is, finding the relationship between a given malware x and its corresponding malware family y, f : x → y. To accomplish this feat, we used the Malimg dataset[12] which consists of malware images that were processed from malware binaries, and then we trained the following DL models 1 to classify each malware family: CNN-SVM[16], GRU-SVM[3], and MLP-SVM. Empirical evidence has shown that the GRU-SVM stands out among the DL models with a predictive accuracy of ≈84.92%. This stands to reason for the mentioned model had the relatively most sophisticated architecture design among the presented models. The exploration of an even more optimal DL-SVM model is the next stage towards the engineering of an intelligent anti-malware system.

Dataset

To use the dataset from this repository, you can intall pt-datasets,

$ pip install pt-datasets

Usage

First, clone the project.

git clone https://github.com/AFAgarap/malware-classification.git/

Run the setup.sh to ensure that the pre-requisite libraries are installed in the environment.

$ sudo chmod +x setup.sh
$ ./setup.sh

Run the main.py with the following parameters.

usage: main.py [-h] -m MODEL -d DATASET -n NUM_EPOCHS -c PENALTY_PARAMETER -k
               CHECKPOINT_PATH -l LOG_PATH -r RESULT_PATH

Deep Learning Using Support Vector Machine for Malware Classification

optional arguments:
  -h, --help            show this help message and exit

Arguments:
  -m MODEL, --model MODEL
                        [1] CNN-SVM, [2] GRU-SVM, [3] MLP-SVM
  -d DATASET, --dataset DATASET
                        the dataset to be used
  -n NUM_EPOCHS, --num_epochs NUM_EPOCHS
                        number of epochs
  -c PENALTY_PARAMETER, --penalty_parameter PENALTY_PARAMETER
                        the SVM C penalty parameter
  -k CHECKPOINT_PATH, --checkpoint_path CHECKPOINT_PATH
                        path where to save the trained model
  -l LOG_PATH, --log_path LOG_PATH
                        path where to save the TensorBoard logs
  -r RESULT_PATH, --result_path RESULT_PATH
                        path where to save actual and predicted labels array

For instance, use the CNN-SVM model.

$ cd malware-classification
$ python3 main.py --model 1 --dataset ./dataset/malimg.npz --num_epochs 100 --penalty_parameter 10 --checkpoint_path ./checkpoint/ --log_path ./logs/ --result_path ./results/

To run a trained model, run the classifier.py with the following parameters.

usage: classifier.py [-h] -m MODEL -t MODEL_PATH -d DATASET

Deep Learning Using Support Vector Machine for Malware Classification

optional arguments:
  -h, --help            show this help message and exit

Arguments:
  -m MODEL, --model MODEL
                        [1] CNN-SVM, [2] GRU-SVM, [3] MLP-SVM
  -t MODEL_PATH, --model_path MODEL_PATH
                        path where to save the trained model
  -d DATASET, --dataset DATASET
                        the dataset to be classified

For instance, use a trained CNN-SVM model.

$ python3 classifier.py --model 1 --model_path ./trained-cnn-svm/ --dataset/malimg.npz
Loaded trained model from trained-cnn-svm/CNN-SVM-2400
Predictions : [ 1. -1. -1. ..., -1. -1.  1.]
Accuracies : [ 0.99609375  0.94140625  0.94921875  0.984375    0.95703125  0.9296875
  0.9296875   0.9609375   0.9296875   0.94921875  0.953125    0.92578125
  0.89453125  0.8203125   0.8125      0.75390625  0.8203125   0.84375
  0.8515625   0.94140625  0.7421875   0.94140625  0.984375    0.9921875   1.
  0.99609375  0.9765625   0.9609375   0.81640625  0.98828125  0.7890625
  0.8828125   0.94921875  0.96875     1.          1.        ]
Average accuracy : 0.9203559027777778

Results

The experiments were conducted on a laptop computer with Intel Core(TM) i5-6300HQ CPU @ 2.30GHz x 4, 16GB of DDR3 RAM, and NVIDIA GeForce GTX 960M 4GB DDR5 GPU. Table 1 shows the hyperparameters used in the study.

Table 1. Hyperparameters used in the DL-SVM models.

Hyperparameters CNN-SVM GRU-SVM MLP-SVM
Batch Size 256 256 256
Cell Size N/A [256, 256, 256, 256, 256] [512, 256, 128]
No. of Hidden Layers 2 5 3
Dropout Rate 0.85 0.85 None
Epochs 100 100 100
Learning Rate 1e-3 1e-3 1e-3
SVM C 10 10 0.5

Figure 1. Plotted using matplotlib. Training accuracy of the DL-SVM models on malware classification using the Malimg dataset.

Figure 1 summarizes the training accuracy of the DL-SVM models for 100 epochs (equivalent to 2500 steps, since 6400 × 100 ÷ 256 = 2500). First, the CNN-SVM model accomplished its training in 3 minutes and 41 seconds with an average training accuracy of 80.96875%. Meanwhile, the GRU-SVM model accomplished its training in 11 minutes and 32 seconds with an average training accuracy of 90.9375%. Lastly, the MLP-SVM model accomplished its training in 12 seconds with an average training accuracy of 99.5768229%.

Table 2. Summary of experiment results on the DL-SVM models.

Variables CNN-SVM GRU-SVM MLP-SVM
Accuracy 77.2265625% 84.921875% 80.46875%
Data points 256000 256000 256000
Epochs 100 100 100
F1 0.79 0.85 0.81
Precision 0.84 0.85 0.83
Recall 0.77 0.85 0.80

Table 2 summarizes the experiment results on the DL-SVM models on malware classification using the Malimg dataset.

Citation

To cite the paper, kindly use the following BibTex entry:

@article{agarap2017towards,
  title={Towards building an intelligent anti-malware system: a deep learning approach using support vector machine (SVM) for malware classification},
  author={Agarap, Abien Fred},
  journal={arXiv preprint arXiv:1801.00318},
  year={2017}
}

To cite the repository/software, kindly use the following BibTex entry:

@misc{abien_fred_agarap_2017_1134207,
  author       = {Abien Fred Agarap},
  title        = {AFAgarap/malware-classification v0.1-alpha},
  month        = dec,
  year         = 2017,
  doi          = {10.5281/zenodo.1134207},
  url          = {https://doi.org/10.5281/zenodo.1134207}
}

License

Copyright 2017 Abien Fred Agarap

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].