Code Monkey home page Code Monkey logo

mlforandroidapps's Introduction

MLforAndroidApps

Machine Learning to actively classify android applications

Description

Given a PCAP file, this will create feature vectors based on given PCAPs and then will train a decision tree classifier which can classify PCAP files.

The apps are: FruitNinja, GoogleNews, Wikipedia, WeatherChannel, and Youtube. Sample PCAPs generated from the Android VM can be found in the Samples folder at https://github.com/sjcomeau43543/MLforAndroidApps.

Dependencies

scikit-learn==latest

pyshark==0.3.8

Usage

To create the features file from the PCAPs run... python logFlows.py -d Samples/

To train and use a model run... python classifyFlows.py -t traffic.csv -e SAMPLE.PCAP where traffic.csv was generated by logFlows.py SAMPLE.PCAP is the PCAP you want to classify

Results

During our tests we got between 75-90% accuracy. For test logs look in Testing.

Limitations

The mean accuracy will not be accurate if there are no test labels. For example: when giving a pcap file it will assume that the label is 0 rather than a number 1,2,3,4,5 which represent the app names. To get the accuracy we have been giving PCAPS from Samples/APPNAME/dump.pcap and then getting the label from the APPNAME directory. If you wanted to see accuracy for a specific file you would run python classifyFlows.py -t traffic.csv -e Samples/FruitNinja/dump_a1.pcap. Files can be found by cloning https://github.com/sjcomeau43543/MLforAndroidApps.

mlforandroidapps's People

Contributors

sjcomeau43543 avatar dalarson avatar

Watchers

James Cloos 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.