Skip to content

Dorokhov/tensorflow-keras-malicious-requests-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TensorFlow Malicious Requests Detection Demo

This project demonstrates how to apply TensorFlow and neural networks for detecting malicious requests and visualize results on TensorBoard

Prerequisites

  • Python3
  • TensorFlow
  • git

Clone Repository

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>

Demo

Step 1

Train Your Model

python train.py

alt tag

Step 2

Visualize Training Results on TensorBoard

Run the following code from command line:

python tensorboard-visualisation.py
tensorboard --logdir="logs"

Copy tensorboard URL and open it in your famous browser:

alt tag

Open "Projector" tab

On the left "Data" panel change "Color by" selector to "Class" value:

alt tag

Ensure "Label Mode" is enabled ("A" icon is checked):

alt tag

Now, you should be able to see visualisation of log request classification:

alt tag

Step 3

Evaluate Custom Requests

Evaluate regular request:

python eval.py '{"username"="vova" "password"="0"}'

the system displays accuracy:

alt tag

Evaluate SQL Injection request:

python eval.py '{"username"=";drop database" "password"="0"}'

the system displays accuracy:

alt tag

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages