0% found this document useful (0 votes)
12 views29 pages

Keywords: SDN, Ddos Attacks, Mitm Attacks, Slow-Rate Dos, Network Security, Statistical Analysis, Entropy, Ip Analysis

This research paper proposes a multi-attack detection approach for SDN networks that combines entropy-based anomaly detection and machine learning techniques like SVM to detect DDoS, MitM, and slow-rate DoS attacks. The method uses entropy and SVM classifiers along with IP-MAC analysis to classify attacks. The proposed approach was evaluated on an SDN simulation and in a practical environment, showing it can effectively detect the attacks with high accuracy and low false positives.

Uploaded by

Son Tran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views29 pages

Keywords: SDN, Ddos Attacks, Mitm Attacks, Slow-Rate Dos, Network Security, Statistical Analysis, Entropy, Ip Analysis

This research paper proposes a multi-attack detection approach for SDN networks that combines entropy-based anomaly detection and machine learning techniques like SVM to detect DDoS, MitM, and slow-rate DoS attacks. The method uses entropy and SVM classifiers along with IP-MAC analysis to classify attacks. The proposed approach was evaluated on an SDN simulation and in a practical environment, showing it can effectively detect the attacks with high accuracy and low false positives.

Uploaded by

Son Tran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Abstract

This research paper presents a multi-attack detection approach for Software-Defined


Networking (SDN) networks. The proposed approach combines entropy-based
anomaly detection with machine learning techniques to detect various types of attacks,
including Distributed Denial-of-Service (DDoS), Man-in-the-Middle (MitM) and
Slow-rate DoS attacks. The method using the hybrid method which combines Entropy
and SVM, along with the IP-MAC analysis to classify attacks. Entropy-based anomaly
detection method measures the randomness of traffic flows and identifies abnormal
traffic patterns, while SVM classifier are used to classify the traffic flows as normal or
attack traffic. The IP-MAC analysis will be used to detect MitM. The proposed
approach was implemented and evaluated on both SDN simulation and practical. The
results show that the proposed approach can effectively detect DDoS, MitM, Slow-rate
DoS with high accuracy and low false positive rates. The proposed approach provides
a practical and efficient solution for improving the security of SDN networks against
various types of attacks.
Keywords: SDN, DDoS attacks, MitM attacks, Slow-rate DoS, network security,
statistical analysis, entropy, IP analysis.

ii
Table of Contents

Abstract........................................................................................................................ ii
Table of Contents........................................................................................................iii
1. Introduction.............................................................................................................1
1.1. Research objectives............................................................................................1
1.2. Research methodology.......................................................................................1
1.3. Contribution of the research...............................................................................1
2. Details of research report........................................................................................2
2.1. Related work.......................................................................................................2
2.2. SDN Overview...................................................................................................3
2.2.1. SDN............................................................................................................. 3
2.2.2. OpenFlow Protocol.....................................................................................4
2.2.3. Pox Controller.............................................................................................5
2.3. Attacks in SDN Environments............................................................................6
2.3.1. Distributed Denial of Services (DDoS).......................................................6
2.3.2. Man-in-the-Middle (MitM).........................................................................6
2.3.3. Slow-rate DoS attacks.................................................................................7
2.4. System model.....................................................................................................9
2.4.1. System model..............................................................................................9
2.4.2. Entropy......................................................................................................10
2.4.3. SVM..........................................................................................................12
2.5. Model Evaluation.............................................................................................14
2.5.1. Simulation Environment............................................................................14
2.5.2. Practical Environment...............................................................................18
2.5.3. Evaluation.................................................................................................18
3. Conclusion..............................................................................................................22
4. References...............................................................................................................23
5. Appendix................................................................................................................24

iii
List of Figures and Tables
Figure 1. SDN Architecture
3
Figure 2. Slow-rate DOS attack model
3
Figure 3. System detection model
3
Figure 4. SVM Hyperplane and Hyperspace
3
Figure 5. Simulation model
3
Figure 6. SVM feature extraction
3
Figure 7. Practical topology
3
Table 1. Evaluated metrics of the proposed method for the DDoS attack
3
Table 2. Evaluated metrics of the proposed method for the MitM attack
3
Table 3. Evaluated metrics of the proposed method for the Slow-rate DoS attack
3

iv
1. Introduction
1.1. Research objectives
The research objectives for a multi-attack detection in SDN network are:
1. To propose a multi-attack detection approach for SDN networks that can
detect different attacks such as DDoS, MitM and Slow-rate DOS.
2. To compare the proposed approach with existing techniques for attack
detection in SDN networks.
3. To evaluate the performance of the method in a real SDN model
Overall, the research objectives aim to provide a practical and efficient solution
for improving the security of SDN networks against multiple types of attacks, and to
contribute to the growing body of research on attack detection in SDN networks.

1.2. Research methodology


The main method to detect the multi attack in our research is the combination of
IP-MAC analysis, SVM and Entropy method. The following steps haves been taken:
1. Data collection and preprocessing: Collect network traffic data from a SDN
controller and preprocess the data by filtering out traffic and converting the data for
analysis.
2. Feature extraction and selection: Extract relevant features from the network
traffic data, such as packet size, packet arrival time, and source and destination IP
addresses, then select the most relevant features using techniques such as principal
component analysis and mutual information.
3. Model training and evaluation: Train machine learning models using the
selected features and evaluate their effectiveness in detecting various types of attacks,
including DDoS, MitM, and slow-rate attacks, then using performance metrics to
evaluate.

1.3. Contribution of the research


The research on multi-attack detection in SDN networks contributes to the field
of network security in several ways. Firstly, this is the first research to detect DDoS,
MitM and Slow-rate DoS in one model, furthermore, we propose a practical and
efficient solution for detecting these attacks. Secondly, it addresses the growing
concern about the vulnerability of SDN networks to various types of attacks. Next, the
research provides recommendations for the practical deployment of the proposed

1
approach in real-world SDN networks. Overall, the research contributes to the
advancement of knowledge in the field of SDN security and provides a practical and
effective solution for improving the security of SDN networks against multiple types
of attacks.

2. Details of research report


2.1. Related work
The idea of a multi-attack detection model has been implemented before but it’s
not widely deployed in a SDN model. The author [1] propose a Forensic based multi-
attack detection and neural network based prevention system for mobile environments,
which prevent Denial-of-Service (DoS), probe, vampire, User-to-Root (U2R) attacks
and a Mobile Ad hoc Network (MANET). The process is implemented in two stages.
The first stage is to perform forensic based multi attack detection to filter the traffic
flows and second stage is to train the Artificial Neural Network (ANN) based multi-
attack prevention system to classify the malicious packets and the normal ones. While
the research [2] propose two deep learning models, BR-NN and LR-NN, for detecting
multiple attacks and achieve real-time monitoring of the CVQKD systems, which
prevents the data set from being attacked. In addition, to detect other unknown attacks,
the step is to adopt the one-class SVM to our model.
Many methods have been proposed to detect DDoS in SDN [3], include various
techniques that utilize machine learning, statistical method or hybrid approaches to
detect different types of attacks.
One commonly used technique is flow-based anomaly detection, which uses
statistical methods to analyze network traffic and identify abnormal patterns. Some
research has explored the use of entropy-based anomaly detection for detecting DDoS
attacks in SDN networks as in papers [4-7]. For example, the authors of [8] developed
a technique for identifying DDoS attacks based on fixed entropy values of 50 packets.
After calculating, the entropy value will be compared with a pre-set threshold value. If
it is below the threshold, then the possibility of an attack is indicated. Otherwise, the
entropy value will be set to the current entropy calculation to avoid further inaccurate
analysis. This enables the detection algorithm to adjust in adapt response to the
characteristics of traffic flow.
In paper [9], H. Lotfalizadeh et al suggested the use of real-time entropy to
differentiate between normal and attack traffic. Each flow statistics is only applied to
the associated time window. In other words, statistics of flows are retrieved for each

2
time window without any data from earlier time windows. Consequently, the threshold
will change over time and help the system detect the new flow of attack more
accurately. The suggested approach was tested on 3 time windows of 10, 30 and 60
seconds in which the 10 seconds window provides the best result.
Another popular method is machine learning detection which a machine learning
algorithm is trained and applied to a detection model to detect the abnormal events
[10]. In [11], the authors suggested a technique that based on the extraction of six
characteristic variables from traffic in the flow table acquired from the switch. They
then also used the SVM algorithm to classify data which helps accurately detect DDoS
attacks. According to experimental data, the method’s average accuracy rate was
95.24% even though only a small amount of flow data was collected. The authors in
[12] enhanced this algorithm with an advanced SVM technique. They customized a
reaction mechanism which informs DDoS attack by taking the security requirements
of the application into account. The method then still extracts 5 characteristics value to
train the model. The detection rate of this enhanced technique is approximately 97%.
Using another machine learning method, the authors in [13] proposed a new
method to detect DDoS attack in an SDN using Principal Component Analysis (PCA).
In the paper, they suggested a unique real-time DDoS detection system for the SDN
environment to examine the network status on traffic data. To minimize the calculating
workload, the network is split into various parts. The residual vector value is then
estimated in real time. The DDoS will be detected if this value falls below a threshold
over a specific period.
In addition, some research has proposed hybrid approaches that combine multiple
techniques to improve the accuracy and effectiveness of attack detection. Authors in
[14] designed a hybrid algorithm that combines entropy and KL-divergence. They
conducted two experiments to assess the accuracy of the proposed method in
determining the occurrence of a DoS attack and to compare its performance to that of
entropy alone in detecting the start of another DoS attack when a previous attack is
ongoing. Results ,from these experiments, provided that it would be difficult to detect
the start and end of the second attack using entropy alone, thus the proposed hybrid
method provides better results in this case. Papers [8-15] introduce a hybrid
classification model, that combined Genetic Algorithm and Decision Tree into an SDN
framework to detect DDoS attack. Characteristics features will be extracted from the
packets and determined by the Genetic Algorithm. If the feature found as abnormal, it
will then be classified with Decision Tree model. The system is tested with several
flooding attack types and have an accuracy rate of 98.20 %.
3
The work in [16] presented a comparison of opensource controllers ODL -
ONOS - Ryu, then described two methods of MITM attacks and presenting potential
security issue in SDN security threats and attack surfaces. The detection based on the
communication between the control layer (ODL) and infrastructure layer (Mininetin
southbound interface. In addition, the authors have also proposed an effective
countermeasure to prevent attacks based on the switch monitoring service.
Overall, the related works demonstrate the potential of using different techniques
to detect various types of attacks in SDN networks. However, there is still a need for
more research to improve the accuracy and efficiency of attack detection in SDN
networks, especially for multi-attack scenarios.

2.2. SDN Overview


2.2.1. SDN
Software-Defined Networking (SDN) is the innovative network architecture with
the goal of providing the flexibility and simple in network operation and management
by separating the control plane from the data plane in network devices. This separation
allows network administrators to centrally manage and control the network, rather than
having to configure each individual device separately. The SDN controller in the
control layer plays a vital role in managing all network operations. The controller
communicates with the devices using a protocol such as OpenFlow, allowing it to
program the forwarding rules and policies for each device. The architecture of SDN is
visualized in Figure. 1.

Fig. 1: SDN Architecture


SDN provides several benefits over traditional networking approaches, including
increased flexibility, scalability, and agility. With SDN, network administrators can

4
easily change network policies and configurations, allowing them to respond quickly
to the continuously changing of network conditions or business requirements.
SDN has been applied in a variety of use cases, such as network virtualization,
traffic engineering, and security. In network virtualization, SDN is used to create
multiple logical networks on top of a physical network infrastructure, allowing
multiple tenants to share the same physical resources. In traffic engineering, SDN is
used to optimize network performance by dynamically adjusting network paths and
traffic flows based on network conditions. In security, SDN can be used to detect and
mitigate cyber-attacks by monitoring network traffic and enforcing security policies.
Despite its many advantages, SDN also faces several challenges, such as security,
interoperability, and scalability. SDN controllers can be a single point of failure and
are vulnerable to cyber-attacks, making it crucial to secure them against potential
threats. Additionally, interoperability can be an issue when implementing SDN, as
different vendors may use different implementations of the OpenFlow protocol.
Finally, as networks become larger and more complex, scaling SDN can become a
significant challenge.
Overall, SDN represents a significant shift in networking architecture, allowing
for greater flexibility and control over network resources. As the demand for more
agile and dynamic networks continues to grow, SDN is likely to play an increasingly
important role in the future of networking.

2.2.2. OpenFlow Protocol


The OpenFlow protocol is a key technology in the field of software-defined
networking (SDN), which has emerged as a promising approach to network
management and optimization. The protocol defines a standardized way for a network
controller to communicate with the forwarding elements (i.e., switches) in a network,
allowing for centralized control and management of network resources. By separating
the control plane from the data plane, OpenFlow enables greater flexibility and
programmability in network management, as administrators can dynamically configure
forwarding rules and traffic flows from a single controller.
One of the key benefits of the OpenFlow protocol is its ability to provide
granular control over network traffic. This is achieved through the use of flow tables,
which store information about the various flows of traffic in the network. The
controller can dynamically modify these flow tables in response to changing network
conditions, allowing it to optimize traffic routing and manage congestion. OpenFlow
also enables the creation of customized forwarding rules, which can be based on
5
various factors such as source and destination addresses, port numbers, or even the
contents of specific packets.
Another important aspect of the OpenFlow protocol is its support for network
virtualization. By abstracting the physical network infrastructure and providing a
virtual network layer, OpenFlow enables the creation of multiple logical networks that
can be dynamically configured and managed. This is particularly useful in cloud
computing environments, where multiple tenants may share the same physical
infrastructure but require separate and secure virtual networks.
As the demand for more flexible, efficient, and scalable network management
solutions continues to grow, it is likely that OpenFlow and other SDN technologies
will play an increasingly important role in the future of network architecture and
design.

2.2.3. Pox Controller


The POX controller is a popular open-source controller for Software-Defined
Networking (SDN) that is written in Python. It provides a flexible and easy-to-use
framework for developing custom SDN applications and has gained widespread
adoption in both industry and academia. The POX controller supports multiple
OpenFlow versions, making it compatible with a wide range of network devices, and
provides a rich set of APIs for interacting with the network topology, forwarding rules,
and network events.
One of the key features of the POX controller is its modular architecture, which
makes it easy to extend and customize. Developers can create new modules to
implement additional features and services, such as network virtualization, traffic
engineering, and security. The POX controller also includes a range of built-in
modules for common tasks, such as topology discovery, network monitoring, and
traffic management.
The POX controller has been used in a variety of research projects, including
network function virtualization (NFV), network slicing, and traffic engineering. One
of the benefits of the POX controller is its ease of use, especially for developers
familiar with Python. The POX controller provides a simple and intuitive
programming model, allowing developers to quickly prototype and test new
applications. It also includes a range of built-in tools and utilities for debugging and
testing, making it easier to troubleshoot and optimize applications.

6
While the POX controller has gained widespread adoption, there are also other
open-source controllers available for SDN, such as Ryu and OpenDaylight, each with
their own strengths and weaknesses. The choice of controller will depend on the
specific requirements of the network and the applications running on it. However, the
flexibility, ease of use, the more straightforward and effective in detection algorithm
and extensibility of the POX controller make it a popular choice for researchers and
developers looking to build custom SDN applications.

2.3. Attacks in SDN Environments


2.3.1. Distributed Denial of Services (DDoS)
Distributed Denial of Service (DDoS) attacks have been a major threat to
network security for many years. However, with the emergence of software-defined
networking (SDN), the nature of these attacks has evolved. DDoS attacks in SDN
networks are particularly concerning due to the centralized nature of SDN controllers,
which provide a single point of failure and control for the entire network. These
attacks aim to overload the network with a flood of traffic, causing legitimate traffic to
be dropped or delayed, and ultimately leading to service disruption.
One of the main challenges in facing DDoS attacks in SDN networks is the need
to identify and distinguish legitimate traffic from attack traffic. Traditional detection
techniques, such as signature-based detection, are not always effective in these
scenarios, as attackers can use various evasion techniques to bypass these methods.
Therefore, new techniques are required that can accurately and efficiently identify and
mitigate DDoS attacks in SDN networks.
Therefore, new techniques are required that can accurately and efficiently
identify DDoS attacks in SDN networks. Machine learning algorithms, such as
Support Vector Machines (SVMs) and Random Forests, have been shown to be
effective in detecting DDoS attacks based on features extracted from packet headers,
flow characteristics, and behavioral patterns. These algorithms can be trained using
supervised or unsupervised learning techniques and can be implemented in the SDN
controller to provide real-time detection and mitigation of DDoS attacks. Another
effective method can be used to detect DDoS attacks is the statistical method with the
use of Entropy. The Entropy will determine the randomness of IP address and
therefore identify the IP with the abnormal large amount of present to confirm an
attack.

7
In this research, we use a hybrid method which combines SVM and Entropy
which improves the accuracy of the detection model and aldo reduce the response
time.

2.3.2. Man-in-the-Middle (MitM)


A Man-in-the-Middle (MitM) attack is a type of cyber attack in which an attacker
intercepts communication between two parties and can potentially modify or
manipulate the communication. In a MitM attack, the attacker positions themselves
between the two parties, acting as a relay or proxy for communication. The attacker
can then intercept, read, and potentially modify the communication before forwarding
it on to the intended recipient. MitM attacks can occur in a variety of scenarios,
including over wireless networks, through public Wi-Fi hotspots, or even via
compromised network devices.
MitM attacks can be carried out using a variety of techniques, such as ARP
spoofing, DNS spoofing, or SSL stripping. In ARP spoofing, the attacker sends false
Address Resolution Protocol (ARP) messages to redirect traffic to their own device.
This allows the attacker to intercept and manipulate traffic between the two parties. In
DNS spoofing, the attacker intercepts and modifies Domain Name System (DNS)
requests to redirect traffic to their own server. This can allow the attacker to intercept
and modify communication between the two parties.
MitM attacks can be used for a variety of malicious purposes, such as stealing
sensitive information, injecting malware, or impersonating the victim. MitM attacks
can be difficult to detect because the attacker is positioned between the two parties and
can potentially modify the communication without either party realizing it.
To prevent MitM attacks, several techniques can be used, such as implementing
secure communication protocols, using digital certificates to verify the identity of the
communication partner, and monitoring network traffic for suspicious activity.
However, MitM attacks remain a persistent threat in the cyber security landscape, and
attackers continue to develop new and sophisticated techniques to carry out these
attacks.
In MitM attacks, one MAC address will get several IP addresses. So, by mapping
IP_src and Mac_src which we extract from the switch’s flow entries, we can find out
that it will change due in the MitM attacks and successfully detect the abnormal
traffic.

8
2.3.3. Slow-rate DoS attacks
A Slow Denial of Service (Slow DoS) attack is a type of cyber attack that aims
to consume the resources of a target system or network by exploiting vulnerabilities in
its infrastructure or applications. Unlike traditional DoS attacks that overwhelm a
target with a large volume of traffic in a short period of time, Slow DoS attacks use
low-rate traffic or exploits that slowly drain the target's resources over time, causing
the system to become unavailable or significantly slower to respond.
Slow DoS attacks can take many forms, including TCP SYN floods, HTTP
GET/POST floods, and low-and-slow attacks, among others. TCP SYN floods are
designed to flood the target system with a large number of connection requests,
causing it to allocate resources to incomplete connection requests, which eventually
leads to a denial of service. HTTP floods are similar but are targeted at web
applications, using GET or POST requests to exhaust the target's resources. Low-and-
slow attacks, on the other hand, are designed to send a small number of requests that
are spaced out over time, making them harder to detect and mitigate.

Fig. 2: Slow-rate attack model


Slow DoS attacks can be difficult to detect and mitigate, as the traffic can be
indistinguishable from legitimate traffic. Furthermore, they can be launched from a
single machine or from a botnet, making it harder to block the source of the attack.
However, there are several techniques that can be used to detect and mitigate Slow
DoS attacks.
1. Baseline Traffic Analysis: Monitoring the network traffic and identifying
normal patterns of traffic can help detect Slow DoS attacks. By
establishing a baseline of normal traffic patterns, abnormal traffic that is
characteristic of a Slow DoS attack can be detected.

9
2. Anomaly Detection: Using machine learning algorithms and other
statistical techniques, anomaly detection can help detect Slow DoS
attacks. The algorithm can analyze traffic patterns, traffic volume, and
resource utilization to identify deviations from normal behavior that may
indicate an attack.
3. Packet Inspection: Deep packet inspection (DPI) is a technique that
involves analyzing the contents of network packets to identify patterns
that may indicate a Slow DoS attack. DPI can identify patterns that are
not visible at the network layer, such as slow HTTP requests or TCP
SYN packets that are sent at irregular intervals.
4. Behavior-based Detection: Behavior-based detection involves
monitoring the behavior of network connections and identifying
connections that are exhibiting suspicious behavior. For example,
connections that are sending a large number of requests or using unusual
protocols may be indicative of a Slow DoS attack.
5. Resource Monitoring: Monitoring the utilization of network resources
such as CPU, memory, and bandwidth can help detect Slow DoS attacks.
Slow DoS attacks consume resources over time, and monitoring the
utilization of these resources can help identify abnormal patterns that
may indicate an attack
6. Traffic Shaping: Traffic shaping involves regulating the flow of traffic to
prevent network congestion and can help detect Slow DoS attacks. By
monitoring traffic patterns and limiting the amount of traffic that can be
sent, traffic shaping can help prevent an attacker from consuming all
available network resources.
In summary, detecting Slow DoS attacks requires a combination of techniques
that involve monitoring network traffic, analyzing traffic patterns, and identifying
deviations from normal behavior. By using these techniques, organizations can detect
Slow DoS attacks and implement appropriate measures to mitigate the impact of the
attack. For that, we will develop a module based on traffic analyzing and machine
learning algorithms, which can correctly detect Slow DoS attacks in SDN.

2.4. System model


2.4.1. System model
The process of detect multi attack in the model is demonstrated in Fig. 3. Firstly,
the incoming packet is collected. If the collected packet is equal to 50, then the entropy
will be calculated. If the entropy is smaller than the threshold the the abnormal flow
will then go to the SVM Classifier to confirm the attack. On the other hand, if the
Entropy is greater than the threshold, the IP-MAC comparison will be processed. If the
IP-MAC pair is change from the initial mapping value then the MitM attack is

10
identified. Whereas, the packets will go through the SVM Classifier of Slow-rate DOS
to detect the Slow-rate DOS.

Fig. 3: System detection model

2.4.2. Entropy
Entropy is a measure of randomness or uncertainty in a system, and it has been
used as a feature for detecting Distributed Denial of Service (DDoS) attacks in
network traffic. Entropy-based detection methods rely on the observation that DDoS
attacks often generate traffic with higher entropy than normal traffic. This is because
DDoS attacks often involve a large number of compromised devices generating traffic
with similar characteristics, leading to a less predictable pattern of traffic. By
measuring the entropy of packet payloads, packet headers, or other features of network
traffic, it is possible to identify patterns of traffic that are characteristic of DDoS
attacks.

11
Consider a collection W with n items (n ≤ N ) that represents a window of N
IP addresses and represents the number of distinct destination IP addresses in the
incoming packet headers:
W =\{ x 1 , x 2 , x 3 , … , x n \} (1)

Then, the entropy value is determined using to the following formula:


N
H=−∑ p i lo g ( p ) i
(2)
i=1

The probability of an IP address in W is:


pi=x i / N (3)

Where x i represents the number of IP addresses x in W while N is the size of the


W (the total IP address). N stands for the window's size.
In (2), if H decreases and approaches zero, it means that there is an anomalous
event is occurring throughout the system. Whereas, in normal event, packets are sent
to different destinations with almost the same speed, no destinations receive a
disproportionately large number of packets compared to other destinations. As a result,
H will be in an optimal average approximated state.

In [27], a static test threshold is chosen based on the execution of many attacks in
order to detect a DDoS attack.
σ
ConfidenceInterval=X ± Z . (4)
√N
In (4), X stands for the sample mean while the remaining is called the margin of
error: Z is a confidence coefficient, σ is the sample standard deviation and N is the
sample size. The chosen confidence level is 95% ( Z = 1.9599).

Firstly, we will find the difference △=H n −H a in which H n is calculated as


min max min

normal average traffic minus the reliability interval and H a is equivalent to the
ma x

average entropy value in attack event plus a confidence interval. Finally, the static
threshold is determined as H n −∆. This static threshold is fixed and any entropy value
max

below it will be regarded as an ongoing attack [7].


However, this static threshold value based on previous attack data. As a result, it
limits the ability to adjust the threshold for identifying new attacks. In this study, the
threshold that we utilized will not be fixed but it will fluctuate over time based on the
changing of entropy value in incoming traffic. Once the entropy values have been
calculated, it will be stored in the window. Based in these parameters, we will
calculate the average entropy value H t and the standard deviation σ t for each window.
12
t
1
Ht= ∑ Hi (5)
t i=1
t
1
σ t= ∑ ( H i −H t )
2
(6)
t i=1
In (5) and (6), H i is the entropy value over period t which denotes the number of
windows calculated using the previously described in (2). Depending on the
parameters determined above, we consider a dynamic threshold value T dynamic with the
formula defined as follows:
T dynamic =H t +C d . σ t (7)
In (7), H t and σ t denote the average entropy value and standard deviation at the
time of t , respectively. The normal distribution indicates that 95% of entropy values
will fall within the range H t ± 2 σ H t . These values, which are smaller than H t −¿ 2 σ H t
, will not significantly affect the result. Then, we can choose C d for this system based
on this fact. In [8], C d is a constant value and equal to -2 according to experiment.

2.4.3. SVM
Support Vector Machine is a supervised learning algorithm, which means it will
predict outcomes for the new data based on the training labeled dataset. SVM
compares the new input data with the labeled data used for training in order to find the
accurate label for the new one. In this study, normal traffic will be labeled as “0” while
attack traffic will be labeled as “1”.
SVM can classify data into different classes and it is believed to be the best
machine learning algorithm in terms of data classifier.
The strength of SVM resides in its capacity to represent data as points in an n-
dimensional space (n – the number of features) Fig. 2. SVM converts a nonlinearly
separable sample set into a higher-dimensional hyperspace, enabling linear separability
of the data sample. Then a hyperplane will be created to distinctly classify 2 sample
classes. The hyperplane is called "Decision boundaries" and its shape will be based on
the number of features. Boundaries are lines if there are only two features and planes if
there are more. And the prediction for the new data can be made relying on which side
it lies on the boundaries.

13
Fig. 4: SVM Hyperplane and Hyperspace
a. DDoS attack
Characteristic values will be extracted from the flow status of the switch, then it
will be calculated and used as input data for the SVM model. Characteristic values are
the parameter used to represent the system status and they are collected as training
features for the classifier model. The value in an attack event will differ irregularly
with its in the normal event so by examining the difference in the attack and normal
value, we can detect the attack. There are five-tuple of characteristics [2] that we will
collect for detecting DDoS attack
1. “Speed of Source IP (SSIP)”: Represent the total number of incoming IP
sources within a particular period.
2. “Standard Deviation of Flowpacket (SDFP)”: Represent the standard deviation
of the packet.
3. “Standard Deviation of Flow Bytes (SDFB)”: Represent the deviation of the
number of bits in a particular time period t in a particular period of time.
4. “Speed of Flow Entries (SFE)”: This is the total number of flow entries coming
to the switch within a particular period of time. It also reflects how rapidly the
controller is handling new flow entries.
5. Number of Interactive Flowentries ratio (NIFE): Represent for the ratio
between Interactive Flow and Flow entries.
b. Slow-DoS attack
In a slow DoS attack, the hacker attempts to create as many connections as
possible to the webserver. Each of these connections will try to maintain the minimum
conditions to keep it from being deleted. Based on the advantages of OpenFlow
Switch, we propose the following characteristics that can distinguish between when an

14
attack is occurring and when it is not. First, we collect necessary information about
flow entries in the flow table. We then preprocess and extract four features as follows:
1. "avePackets" represents the average number of packets transmitted per flow.
Hackers during slow DoS attacks attempt to establish as many connections as
possible by sending minimum packets that can maintain the connection open
without deletion. A decrease in the number of packets per flow over time can
indicate a slow DoS attack.
2. "aveBytes" represents the average number of bytes transmitted per flow. In a
slow DoS attack, the header is divided into several parts and sent to the
webserver at a very slow rate. The webserver collects enough parts of the
header to respond to the request. As a result, the average number of bytes per
flow may decrease, indicating a slow DoS attack.
3. "flowPerIP" represents the number of flow entries per IP address. During a slow
DoS attack, the number of flow entries per IP address may increase since the
hacker will send and keep many connections aliving that are displayed in a flow
table. A significant increase in this metric may indicate a slow DoS attack.
4. "newFlowPerTime" represents the number of new flows created within a 10-
second time window. Slow DoS attacks can be detected by an increase in the
number of new flows created within the 10-second window, which suggests that
an attacker is attempting to overwhelm the system with many new connections.
The 10-second time window matches the idle timeout of flow entries, ensuring
that flows are properly deleted and new ones are created.
By monitoring these metrics, network administrators can detect and respond to
slow DoS attacks.

2.5. Model Evaluation


2.5.1. Simulation Environment
Our simulation was carried out on a Lenovo computer with an Intel® Core™ i5 -
9300H processor operating at 1.2 GHz and 8 GB of DDR4 RAM 2666 MHz, along
with Ubuntu 20.04 as operating system. We chose Mininet as a network emulator with
a POX controller for simulation purposes. With Mininet, we could create an attack on
a virtual server and examine the outcomes of our DDoS attack detection model. Then,
we apply our proposed method to detect the DDoS in this model. In this study, we
simulated a DDoS attack with 64 hosts and 9 Open vSwitch, with 1 core Open vSwitch
and 8 access switches connect to 8 hosts, as illustrated in Fig. 5.

15
Fig. 5: Simulation model
In order to make the host communicate with each other through POX, we use the
l 3 _ learning module in Pox. This module offers layer 3 learning capabilities by storing
a list of IP address information between nodes. l 3 _ learning will analyse and extract
the IP address from each new packet that comes in. This information will be compared
with the list and if there is no similar path, the module will start ARP protocol to start
the request. In addition, we edited integrated algorithms that make it possible for the
POX controller to calculate entropy values and parameters needed to detect attacks
when there is an unusual change in incoming traffic.

a. DDoS

Scapy handled packet initialization and transmission in the system. Scapy is used
to generate UDP packets and spoof their source IP addresses to simulate attack and
normal traffic in the simulation system. The hosts in the model are given IP addresses
that increase gradually, starting from 10.0.0.1.

1) Phase 1: The system is in normal state: In normal state, we use a host to initiate
traffic and distribute packets to the whole system. The packet is sent every 0.1
second with a destination port of 80 and a source port of 2. 500 packets which
equivalent to 10 windows will be delivered in all during a single run.

We use formula (2) and (3) to determine the current entropy in a window of 50
packets. Formulas (5) and (6) are used, respectively, to calculate Average
Entropy and Standard Deviation. The dynamic entropy threshold is then
calculated using the above value and formula (7).

For instance, the immediate entropy value is almost 0 with 50 identical


destination IP addresses. In contrast, when there are 50 separate IP addresses in
a window, this figure peaks at about 1.5.

In normal event, packets are transmitted to a wide range of network destination


addresses. Therefore, the randomness will increase as well as the entropy value
at that time. As the immediate entropy value exceeds the dynamic entropy
threshold value, the system can conclude that the system is in normal state.

16
2) Phase 2: The system is in a State of Attack: We implement a 75% rate attack on
the system. The rate of an attack is determined by:
Ia
Rattackrate =1− .100 % (8)
I n+ I a

In (8), I a and I n are the period of time where attack traffic and normal traffic
occur, sequentially. In the system, normal traffic is randomly forwarded to all
hosts, whereas attack traffic is only intended for one host.

The rate tests of 75% were performed on a host to examine a more focused
attack so the changes in entropy can be seen more clearly in these simulations.

b. MitM

To execute the MITM attack, we use the dnspoof tools to sniffs live
connections and TCP traffic with filtering content.

c. Slow-rate DOS

We performed our method in a topology as in Fig. 2.


We installed a webserver on host h1 (10.0.0.1), which is a simple webserver
that we developed ourselves. It contains a webpage and can handle a
customizable number of simultaneous connections. In this study, we set a limit
of 150 concurrent connections for the webserver (similar to Apache webserver).
If the number of connections exceeds this limit, it will be unable to process
them and requests to the webpage will be denied. Host 2 (10.0.0.2) serves as the
attacker, continuously sending HTTP requests to the webserver every 15
seconds. Each time requests are created, we randomly generate between 200
and 1000 requests simultaneously, ensuring that they are within the webserver's
threshold. The remaining users send requests to display the pre-installed
webpage on the webserver. We processed and modified the attack traffic and
normal traffic generation software according to our requirements. After running
and measuring the proposed features, we obtained the results as shown below.

17
Fig. 6: SVM feature evalution
Our team generated legitimate traffic during the period from cycle 1 to cycle
230, with each cycle being a sliding window of 10 consecutive captures. It is
easy to see that the aveBytes value varies significantly and fluctuates between
700 and 6000 bytes on average per stream, which is higher than during an
attack because data is continuously sent and received through the streams. On
the other hand, when an attack occurs, the value fluctuates around 200 bytes per
stream, which is the minimum value that a hacker can maintain to prevent the
streams from being deleted and disconnected.
Moving on to the avePackets value, this represents the average number of
packets per stream. When normal, it fluctuates between 5 and 30 packets per
stream, and during an attack, it stabilizes at around 4 packets per stream.
Hackers try to send the minimum number of packets possible to maintain the
connection, which means that packet size will be as small as possible.
The flowsPerIp value also reflects the difference when abnormalities occur in
the network. During an attack, the number of flows generated per IP address is
very high. We take an average value because in many cases, there may be
multiple attackers attacking a web server. This value fluctuates greatly when an
attack occurs, ranging from 100 to 700 connections per IP address.
The next value is newFlowPerTime, which represents the number of new flows
created within a certain time period, specifically 10 seconds. When connections
are deleted, hackers continuously create new connections in large numbers. It is
18
clear that during an attack, the number of new connections created fluctuates
between 400 and over 2000 connections.

2.5.2. Practical Environment


In the preceding session, we detect the DDoS attack in simulation environment.
In this section, the model will be put into practice on the Aruba Switch 2930F in which
OpenFlow protocol is enabled.
We build a practical topology with 1 controller, 2 switch and 8 hosts as shown in
Fig. 7. By using the IP address and listen port of the controller interface, we can
acquire the flow status of the switch and calculate entropy. The normal and attack
script is implemented as same as in the simulation environment. For DDoS, Host
10.10.0.6 produce samples of normal traffic and forward to the whole network. The
attack scenario will be implemented using scapy. Host 10.10.0.3 is the attacker, from
there we use scapy to flood UDP packets to the target, host 10.10.0.7. The network is
affected by the DDoS and can not communicate as normal. For MitM and Slow rate
DOS, the attacker is host 10.10.0.4 and the target is host 10.10.0.3.

Fig. 7: Practical topology.

2.5.3. Evaluation
We gathered 1000 samples to evaluate metrics for the proposed method. The
table 2 below shows the overview of the system parameter. There are 7 parameters
determine the performance of methods. True Positive (TP) represent the percentage of
attacks event that are successfully detected by the system, False Positive (FP) is the
rate of attack event which detected as normal. In contrast, True Negative (TN) stands
for the normal event that are successfully detected and False Negative (FN) is the
percentage of normal event wrongly detected as attack. Precision is the ratio of true
attack detected flows to all attack detected flows. Recall is the ratio of true attack
detected flows to all attack flows. Finally, accuracy is the detection rate of all system.
a. DDoS attacks
19
Table 1. Evaluated metrics of the proposed method for the DDoS attack.

TP FP TN FN Precision Recall Accuracy


(%) (%) (%) (%) (%) (%) (%)

Simulatio 99.7 0.3 99.1 0.9 99.1 99.7 99.4


n

Practical 99.8 0.2 99.5 0.5 99.5 99.65 99.8

The results in Table 2 show that the practical result is quite higher than the
simulation results. This happen because our practical topology is quite small
comparing with the simulation topology as there are just 8 hosts in the system. The
hybrid model represents a remarkable achievement in the field of intrusion detection.
The response time of this method is 4 seconds which make it able to swiftly identify
potential threats to the network. Furthermore, its accuracy of up to 99% is a testament
to the efficacy of the model. The entropy module’s sensitivity to anomalous
information variance which then follow up by the reconfirmation of the SVM classifier
help increase the chances of a correct outcome and contribute for the success of the
hybrid model.
b. MitM attacks
Table 2. Evaluated metrics of the proposed method for the MitM attack.
TP FP TN FN Precision Recall Accuracy
(%) (%) (%) (%) (%) (%) (%)

Simulatio 96.39 3.61 98.8 1.2 96.38 97.56 98


n

Practical

c. Slow DoS attacks


After surveying these four characteristics, we created a dataset with 1000
samples representing normal traffic and 1000 samples representing slow attacks. We
then chose the SVM machine learning model for classification, based on the
performance of the model as measured by the statistics we collected, as follows:
Table 3. Evaluated metrics of the proposed method for the Slow DOS attack.

20
TP FP TN FN Precision Recall Accuracy
(%) (%) (%) (%) (%) (%) (%)

Simulatio 100 0 95.8 4.2 92 100 96


n

Practical

The presented results show that the SVM model achieved high accuracy and
performance in detecting Slow DoS attacks. The model achieved an overall accuracy
of 96%, indicating that it correctly classified 96% of the instances in the test dataset.
The precision for the normal class was 92%, indicating that when the model predicted
that an instance belonged to the normal class, it was correct 92% of the time. The
recall for the normal class was 100%, indicating that the model correctly identified all
instances that belonged to the normal class.
For the attack class, the precision was 100%, indicating that when the model
predicted that an instance belonged to the attack class, it was correct 100% of the
time. The recall for the attack class was 92%, indicating that the model correctly
identified 92% of the instances that belonged to the attack class.
Overall, the model's high accuracy and performance in detecting both normal
and attack instances suggest that it can be effectively integrated and deployed as a
module within an SDN network to detect Slow DoS attacks in real-time. The
presented figure illustrates an example scenario where host 3 sends a GET request to
retrieve an html file from host 1.

The request is received and returned with a successful response code of 200. At
the same time, the detection module also reports that the network is in a normal state.

21
After that, we sent attack traffic from the host 2 to the web server. At this time,
host 3 was unable to access the web server and was continuously denied due to host 2
sending requests exceeding the web server's allowed threshold (up to 329 connections
at the same time). Additionally, the detection module also issued a warning that the
network was under attack at switch number 2 (s2), where host 2 was connected and
sending data.

22
After host 2 stopped the attack, host 3 was able to send requests to access the
web server normally.

The estimated response time for our module to detect the abnormality in the
network is about 10 seconds after host 2 performs the attack. This time frame is fast
enough to detect a slow DoS attack because of the nature of this type of attack, which
is very similar to normal traffic, making it much harder to classify compared to
traditional DDoS attacks.
The slow DoS attack can go unnoticed for a long time and has the potential to
cause significant damage to a network by consuming its resources, making it
inaccessible to legitimate users. Therefore, early detection is crucial to mitigate the
damage caused by the attack. In our case, the SDN network with the integrated module
is capable of detecting and preventing slow DoS attacks, providing a higher level of
security to the network.

3. Conclusion
The implementation of a multi-attack system for detecting Distributed Denial of
Service (DDoS), Man-in-the-Middle (MitM), and slow-rate DDoS attacks in Software-
Defined Networking (SDN) provides an effective and comprehensive approach to
network security. This academic research has demonstrated the effectiveness of such a
system through both simulation and real-world experiments, highlighting the potential
of SDN for enhancing network security and mitigating various types of attacks.

23
The proposed system leverages the programmability and centralized control of
SDN to monitor network traffic and detect anomalies indicative of DDoS, MitM, and
slow-rate DDoS attacks. By using machine learning algorithms, the system is able to
classify network traffic into different categories and identify malicious patterns. This
approach allows for a more dynamic and adaptive system that can quickly respond to
emerging threats and adjust its detection mechanisms accordingly.
The simulation results demonstrate that the proposed system is capable of
achieving a high detection rate and low false positive rate, even under varying attack
scenarios. The system was able to detect DDoS attacks with an accuracy of over 99%,
and MitM attacks with an accuracy of over 98%. Additionally, the system was able to
detect slow-rate DDoS attacks with an accuracy of over 96%.
The real-world experiments confirmed the feasibility of implementing the
proposed system in a real-world SDN environment, with similar performance and
effectiveness as the simulation results. The experiments involved a testbed network
with multiple virtual machines, simulating various attack scenarios. The system was
able to successfully detect and mitigate all the simulated attacks, highlighting its
effectiveness in a practical setting.
Overall, this research provides valuable insights into the potential of SDN for
enhancing network security, particularly in the detection and mitigation of complex
and evolving network attacks. The proposed multi-attack system demonstrates the
effectiveness of combining machine learning with SDN to achieve a more dynamic
and adaptive security system. Further research can explore additional attack scenarios
and evaluate the proposed system in larger and more complex networks, ultimately
leading to the development of more robust and effective network security solutions.

4. References
[1] Vaseer, G. (2020). Multi-Attack Detection using Forensics and Neural Network based
Prevention for Secure MANETs. 2020 11th International Conference on Computing,
Communication and Networking Technologies (ICCCNT).
[2] Du, H.; Huang, D. Multi-Attack Detection: General Defense Strategy Based on Neural
Networks for CV-QKD. Photonics 2022, 9, 177
[3] Lubna Fayez Eliyan & Roberto Di Pietro (2021), "DoS and DDoS attacks in Software
Defined Networks: A survey of existing solutions and research challenges”, Future
Generation Computer Systems, Vol. 122, pp. 149-171.

24
[4] Kalkan K., Gur, G., & Alagoz F. (2018), “JESS: Joint Entropy-Based DDoS Defense
Scheme in SDN,” in IEEE Journal on Selected Areas in Communications, Vol. 36, No.
10, pp. 2358-2372.
[5] Mao, J.; Deng, W. & Shen, F. (2018), “DDoS Flooding Attack Detection Based on
Joint-Entropy with Multiple Traffic Features”, IEEE International Conference On Trust,
Security And Privacy In Computing And Communications/12th IEEE International
Conference On Big Data Science And Engineering (TrustCom/BigDataSE), pp. 237–
243.
[6] Jiang, Y.; Zhang, X.; Zhou, Q. & Cheng, Z. (2016), “An Entropy-Based DDoS Defense
Mechanism in Software Defined Networks”, Int. Conf. Commun. Netw., Vol.1, pp.169–
178.
[7] Mohammad Aladaileh, Mohammed Anbar, Iznan H. Hasbullah, Yousef K. Sanjalawe
and Yung-Wey Chong, “Entropy-Based Approach to Detect DDoS Attacks on Software
Defined Networking Controller”, Tech Science Press, 2021
[8] Tamer Omar, Anthony Ho & Brian Urbina (2019), “Detection of DDoS in SDN
Environment Using Entropy-based Detection”, IEEE International Symposium on
Technologies for Homeland Security (HST), pp. 1-4.
[9] H. Lotfalizadeh & D. S. Kim (2020), "Investigating Real-Time Entropy Features of
DDoS Attack Based on Categorized Partial-Flows," 14th International Conference on
Ubiquitous Information Management and Communication (IMCOM), pp. 1-6.
[10] Lubna Fayez Eliyan & Roberto Di Pietro (2021), “DoS and DDoS attacks in Software
Defined Networks: A survey of existing solutions and research challenges”, Future
Generation Computer Systems, Vol. 122, pp. 149-171.
[11] Ye J, Cheng X, Zhu J, Feng L & Song L (2018), “A DDoS attack detection method
based on SVM in software defined network”, Security and Communication Networks,
Vol. 2018, Hindawi.
[12] Myo Myint Oo, Sinchai Kamolphiwong, Thossaporn Kamolphiwong & Sangsuree
Vasupongayya (2019), “Advanced Support Vector Machine-(ASVM-) based detection
for Distributed Denial of Service (DDoS) attack on Software Defined Networking
(SDN)'', Journal of Computer Networks and Communications, Vol. 2019, Hindawi.
[13] D. Wu, J. Li, S. K. Das, J. Wu, Y. Ji & Z. Li (2018), “A Novel Distributed Denial-of-
Service Attack Detection Scheme for Software Defined Networking Environments,”
2018 IEEE International Conference on Communications (ICC), pp. 1-6.
[14] Nada M.AbdelAzim, Sherif, F.Fahmy, Mohammed Ali Sobh, Ayman, M.Bahaa Eldin,
"A hybrid entropy-based DoS attacks detection system for software defined networks

25
(SDN): A proposed trust mechanism", Egyptian Informatics Journal, Volume 22, Issue
1, March 2021, Pages 85-90.
[15] X. Zhao, S. Chen, Y. Yu and Z. Sun, "Genetic Algorithm based Intrusion Detection
System for Software-Defined Network Architecture," 2020 IEEE International
Conference on Progress in Informatics and Computing (PIC), Shanghai, China, 2020,
pp. 309-313.
[16] Sebbar, A., Boulmalf, M., Dafir Ech-Cherif El Kettani, M., & Badd, Y. (2018).
Detection MITM Attack in Multi-SDN Controller. 2018 IEEE 5th International
Congress on Information Science and Technology (CiSt).

5. Appendix

26

You might also like