this project is based on DDos attack detection combined with machine learning in the SDN environment, which can detect whether the current host is attacked by DDos.
recommended operating system:
ubuntu 16.04 or ubuntu 18.04
- mininet:
sudo apt install mininet
- pox:
git clone https://github.com/noxrepo/pox
- hyping3:
sudo apt install hyping3
- tshark:
sudo apt install tshark
- tensorflow、numpy、pandas、matplotlib:
pip install tensorflow==1.14 numpy pandas matplotlib
Also, you can use our shell script to install all above:
$ chmod +x preinstall.sh
$ ./preinstall.sh
- start the POX controller:
$ ./pox.py openflow.of_01 --address=127.0.0.1 --port=8877 pox.forwarding.l2_learning
- use mininet to build topology:
$ sudo mn --custom sdntopo.py --topo mytopo --controller=remote,ip=127.0.0.1,port=8877 --switch ovsk,protocols=OpenFlow10
- use pingall to test the connectivity:
pingall
- use hyping3 simulated the DDos attack:
h3 hping3 h1 -p 80 -S -i u400 --rand-source
- start DDos attack detection:
./detect.sh
if 'machine is under attack' appears in the terminal, it means that a DDos attack has been successfully detected.