Skip to content

nyu-tandon-hsn-ai/trace-feature-selection

Repository files navigation

Trace Feature Selection

Goal

Extract features from raw trace

Requirement

  • A virtual environment with python 3.6.(You could use this link to set up a virtual environment)
  • pip (If you set up a virtual environment using what is mentioned above, you should be free from the problem)
  • tshark 2.4.3 (detail see tshark version)

Instructions

  1. enter your virtual environment
  2. if this is the first time you are using this
    1. run pip install -r requirements.txt to install required libraries
    2. run jupyter nbextension enable --py --sys-prefix widgetsnbextension before using jupyter to install visualization tools in jupyter
  3. extract features
    • run jupyter notebook to use jupyter notebook
    • extract flow image features
      1. set environment variables for PYTHONPATH
        export PYTHONPATH=$(pwd)/python:$PYTHONPATH
      2. extract image features
        • extract above IP layer, IP w/ transport layer (only for TCP or UDP) header with fixed-length transport layer payload.
          python3 extract_img_feature.py -td ${YOUR_TRACE_DIR} -l ${YOUR_LABEL_TYPE} -m ${MAX_PKTS_PER_FLOW} -s ${SAVING_PATH} -tr ${TRAINING_RATIO} -i ip-above
          e.g.
          python3 extract_img_feature.py -td data/unb-vpn-app/pcap-trace/vpn-test/ -l vpn -m 10 -s vpn-test/ -tr 0.8 -i ip-above
        • extract fixed-length transport layer payload
          python3 extract_img_feature.py -td ${YOUR_TRACE_DIR} -l ${YOUR_LABEL_TYPE} -s ${SAVING_PATH} -tr ${TRAINING_RATIO} -i payload-len
          e.g.
          python3 extract_img_feature.py -td data/unb-vpn-app/pcap-trace/vpn-test/ -l vpn -s vpn-test/ -tr 0.8 -i payload-len
        • APPENDIX: label type contains the following for now
          • vpn
          • non-vpn-app
          • skype
          • hangout
          • facebook

About

Extract feature from raw trace

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published