Giter Site home page Giter Site logo

zabir-nabil / whitebox-attack-malware-gan Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 652 KB

Generating Adversarial Malware Examples for White-Box Attacks Based on GAN

License: MIT License

Python 99.08% Dockerfile 0.92%
gan generative-adversarial-network malware malware-detection adversarial-attacks whitebox whitebox-attacks graybox machine-learning deep-learning

whitebox-attack-malware-gan's Introduction

Whitebox/Graybox Attack with Malware GAN

MalGAN

What are malwares, GANs, whitebox attacks❓

Malware (a portmanteau for malicious software) is any software intentionally designed to cause damage to a computer, server, client, or computer network. - wiki

  • Malware detection systems use machine learning models (both in antivirus softwares and cloud) to analyze static DLLs, API features, etc. to detect malwares.

  • But it is possible to fool the machine learning models by using adversarial attacks (generating malwares which look like benign sample to the machine learning model).

That's where GAN becomes useful.

A generative adversarial network is a class of machine learning frameworks designed by Ian Goodfellow and his colleagues in 2014. Two neural networks contest with each other in a game. Given a training set, this technique learns to generate new data with the same statistics as the training set. - - wiki

  • It is possible to generate a generative adversarial network (GAN) based algorithm to generate adversarial malware examples, which are able to bypass black-box machine learning based detection models.
White-box πŸ”² vs Black-box πŸ”³

In ideal lab scenario, we have access to the machine learning model which is detecting malwares (let's say, we design an MLP classifier which analyzers boolean features from an API, and makes a prediction). While training the GAN, if have full access to the detection model (directly), we can train our GAN by utilizing predictions from the MLP (while optimizing) to make robust adversarial examples. This is the white-box setup.

But in the real world, we may not always have full access to the detection model directly. The model can be treated as black-box and an alternate model can be used for generating the adversarial examples.

https://www.researchgate.net/publication/337296034_Improving_the_Reliability_of_Deep_Neural_Networks_in_NLP_A_Review

Download dataset

  • gdown https://drive.google.com/uc?id=1PwsY_T0MT4Mbk6g70l-jMpZrA7XweHEZ
  • gdown https://drive.google.com/uc?id=1sz12ejCuV9_yEzVI7qhRfUeTu7b4bsXO

Installation

  • With docker -

    • Build the docker image docker build .
    • nvidia-docker run -it -d -v /home/:/malgan --net=host d1cbaadbc4ea /bin/bash
    • nvidia-docker run -it -d -v /home/:/malgan --net=host d1cbaadbc4ea /bin/bash
  • Without docker

    • Make sure you have Nvidia driver and CUDA >= 9.2 (for GPU support)
    • pip install -r requirements.txt

πŸ“πŸ“

  • Dataset
  • Publish the synthetic data generator

whitebox-attack-malware-gan's People

Contributors

zabir-nabil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

di-xue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.