Skip to content

mabidm-tsinghua/daud-MLRiding-With-Redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MLRidin

Tested for Python version 3.8.10.

Installing Redis on the base OS

sudo apt-get install redis-server

Checking Port Number and status of Radis Server

Opening the Redis CLI

redis-cli

It also shows the port on which your REDIS server is running on.

Checking the redis CLI connection with server

ping

PONG

If you get back the response PONG it's mean your connection is alive.

Exiting the CLI

QUIT

Creating Virtualenv

python3 -m virtualenv venv

Activating Virtualenv

source venv/bin/activate

Installing dependencies

pip install -r requirements.txt

It is recommended to first start MLRidin Sniffer process then start MLridinML process.

Starting MLRidin Sniffer

cd MLRidinSniffer

Usage

usage: mlridin [-h] (-i INPUT_INTERFACE | -f INPUT_FILE) [-c] [--output-file OUTPUT]

A Machine Learning based Real-time Intrusion Detection System in Network

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT_INTERFACE, --interface INPUT_INTERFACE
                        This interface will be used to capture traffic in order to convert it into
                        the flow.
  -f INPUT_FILE, --file INPUT_FILE
                        This file will be converted to the flow.
  -c, --csv, --flow     The output will be store in the form of csv in output file.
  --output-file OUTPUT  default: flow.csv, The file output will be written to.

Checking PCAP file

python main.py --file ../hulk.pcap -c

By default, the above command will store the generated flows in the MLRidinSniffer/flow.csv file.

Montoring interface in real time

sudo su
source venv/bin/activate
python main.py -i <interface_name> -c

In order to find the interface_name, you can use ip a command and replace the placeholder <interface_name> with your actual interface name for instance ens33. Root privilege is require to fetch traffic from NIC in real-time.

Starting MLRidinML module

cd MLRidinML
python main.py

Make sure that the Models file exist in the directory MLRidinML/models/. You can download the models from here.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages