Giter Club home page Giter Club logo

safedroid-v2.0's Introduction

Welcome to SafeDroid v2.0

A Framework for detecting malicious Android applications

Introduction

SafeDroid v2.0 is a terminal-based framework for reverse engineering, static analysis and classification of Android applications. An early version of the framework can be found here.

SafeDroid comes under the GNU GENERAL PUBLIC LICENSE.

The main goal of our work, besides the automated production of fully sufficient prediction and classification models, is to offer an out-of-the-box framework that can be employed by the Android security researchers to efficiently experiment to find effective solutions: the framework makes it possible to test different combinations of machine learning classifiers, with a high degree of freedom and flexibility in the choice of features to consider, such as dataset balance and dataset selection. For more detailed information, read the published research paper.

Installation

SD runs on Python 2.7. Python 2.7 or newer is standard in all Linux systems.

  1. Install the dependencies. SafeDroid v2.0 depends on the following packages:
  • Pandas
  • Sklearn 0.19.2
  • SciPy 1.1.0
  • joblib 0.12.5
  • matplotlib

Installation :

pip install -r requirements.txt

It also needs:

  • python-tk
  • mysqlclient 1.3.13

Install them as:

sudo apt install python-tk mysqlclient

Configure database

To be able to run SafeDroid, a mysql client is required. Follow the installation instructions to set up a mysql user. After setting up a local or remote MySQL database, configure properly the file database.conf. This is a configuration file and it's needed in order to establish communication with the mysql server. The host, username and password must agree with the ones of the mysql settings, the schema can be set up to anything as it is going to be created during execution.

Configure predection model

SafeDroid allows the selection of the settings for the creation of the prediction model. Configure the file model_training.conf. The file looks like :

DATA SET CONFIGURATION
sample_reduce_size : [1]
malicious_size : [1]
threshold : [0.2]

MODEL CONFIGURATION
classifier : [all]	 

TRAINING CONFIGURATION
cv : [5]
test_size : [0.3] 
display_plots : [0]
plot_to_file : [0]

Execution

To run the framework, execute python safedroid.py [-l] [-m] [-b] [-t] [-r] [-R]

The available parameters are :

	-h, --help            show this help message and exit

	-l LOG, --log=LOG     Log level {DEBUG, INFO, WARN, ERROR, CRITICAL}
	
	-t TESTING_MODE, --testing-mode=TESTING_MODE
							Testing mode {FOLDERS, SET, SINGLE}
  
	-m MALICIOUS_FOLDER, --malicious-folder=MALICIOUS_FOLDER
							Malicious input folder {ABSOLUTE PATH}
  
	-b BENIGN_FOLDER, --benign-folder=BENIGN_FOLDER
							Benign input folder {ABSOLUTE PATH}
							
	-r RESET, --reset=RESET
							Reset database schema
  
	-R RESET, --Reset=RESET
							Reset database schema and exit

Example of execution:

python safedroid.py -l CRITICAL -t FOLDERS -m /path/to/malicious/directory -b /path/to/benign/directory

safedroid-v2.0's People

Contributors

dubniak avatar

Watchers

 avatar

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.