This project demonstrates how to apply TensorFlow and neural networks for detecting malicious requests and visualize results on TensorBoard
- Python3
- TensorFlow
- git
Clone the repository and switch to the target directory
git clone "https://github.com/Dorokhov/tensorflow-keras-malicious-requests-demo"
cd <path_to_source_code_directory>
python train.py
Run the following code from command line:
python tensorboard-visualisation.py
tensorboard --logdir="logs"
Copy tensorboard URL and open it in your famous browser:
Open "Projector" tab
On the left "Data" panel change "Color by" selector to "Class" value:
Ensure "Label Mode" is enabled ("A" icon is checked):
Now, you should be able to see visualisation of log request classification:
Evaluate regular request:
python eval.py '{"username"="vova" "password"="0"}'
the system displays accuracy:
Evaluate SQL Injection request:
python eval.py '{"username"=";drop database" "password"="0"}'
the system displays accuracy: