nDPI/dga
2024-10-28 12:55:18 +01:00
..
scikit-learn_tests Moved new DGA code 2024-10-26 21:15:36 +02:00
tensorflow_tests Rename 2024-10-28 12:55:18 +01:00
dga_domains_full.csv Moved new DGA code 2024-10-26 21:15:36 +02:00
README.md Added reference to the existing nDPI DGA code 2024-10-26 21:19:11 +02:00
requirements.txt Moved new DGA code 2024-10-26 21:15:36 +02:00

Overview

This folder contains training and inference scripts for two models based on different technologies: MLP (multi-layer perceptron) using scikit-learn and an LSTM-based neural network using TensorFlow. Each model has its own folder with training and testing scripts. Developers interested in DGA detection in nDPI should also visit this folder containing the original ML implementation.

The test scripts only show how to use an already-trained model.

Requirements

To install the necessary dependencies, run

pip install -r requirements.txt

How to use the scripts

1. scikit-learn (MLP model)

Folder: scikit-learn_tests.

Training

To train the MLP model, run the training script:

python scikit-learn_tests/training_script.py

Inference

After training, you can perform inference using the test script:

python scikit-learn_tests/test_script.py

2. TensorFlow (LSTM model)

Folder: tensorflow_tests.

Training

To train the LSTM model, run the training script

python tensorflow_tests/training_script.py

Inference

Once training is complete, you can run inference on the test set with

python tensorflow_tests/test_script.py