Code Monkey home page Code Monkey logo

deep-packet's Introduction

Deep Packet

Details in blog post: https://blog.munhou.com/2020/04/06/Pytorch-Implementation-of-Deep-Packet-A-Novel-Approach-For-Encrypted-Tra%EF%AC%83c-Classi%EF%AC%81cation-Using-Deep-Learning/

How to Use

  • Clone the project
  • Download the train and test set I created at here, or download the full dataset if you want to process the data from scratch.
  • Run python codes with the docker image:
docker run -it \
-v /path/to/the/code:/data \
mhwong2007/deep_packet \
bash
  • If you want to run Jupyter notebook, use the following command:
docker run -it \
-v /path/to/the/code:/data \
-p 8888:8888 \
mhwong2007/deep_packet \
jupyter lab --no-browser --ip=0.0.0.0 --port=8888 --NotebookApp.token='' --allow-root
  • If you want to build the environment yourself, please install the dependencies and libraries in the Dockerfile

Data Pre-processing

python preprocessing.py -s /path/to/CompletePcap/ -t processed_data

Create Train and Test

python create_train_test_set.py -s processed_data -t train_test_data

Train Model

Application Classification

python train_cnn.py -d train_test_data/application_classification/train.parquet -m model/application_classification.cnn.model -t app

Traffic Classification

python train_cnn.py -d train_test_data/traffic_classification/train.parquet -m model/traffic_classification.cnn.model -t traffic

Evaluation Result

Application Classification

Traffic Classification

Model Files

Download the pre-trained models here.

deep-packet's People

Contributors

munhouiani 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.