You are on page 1of 7

Proceedings of the International Conference on Inventive Computing and Informatics (ICICI 2017)

IEEE Xplore Compliant - Part Number: CFP17L34-ART, ISBN: 978-1-5386-4031-9

DoS Attack Mitigation Using Rule Based and


Anomaly Based Techniques in Software Defined
Networking

Prajakta M. Ombase Nayana P. Kulkarni


P.G. Scholar P.G.Scholar
Dept. of Computer Science and Technology Dept. of Computer Science and Technology
Usha Mittal Institute of Technology, Usha Mittal Institute of Technology,
SNDT Women’s University Mumbai, India SNDT Women’s University Mumbai, India
prajakta.ombase@gmail.com nyna.p.kul@gmail.com

Sudhir T. Bagade Amrapali V. Mhaisgawali


Assistant Professor Assistant Professor
Dept. of Computer Science and Technology Dept. of Computer Science and Technology
Usha Mittal Institute of Technology, Usha Mittal Institute of Technology,
SNDT Women’s University Mumbai, India SNDT Women’s University Mumbai, India
bsudhiran@ieee.org amrapali10@gmail.com

1. INTRODUCTION
Abstract—Software Defined Networking (SDN) is new technology
over the traditional networks. With the new framework design of Traditional networking devices contain data plane and control
SDN, security is a big challenge. Number of attacks can be plane on each device. Increasing data traffic because of recent
possible in data plane and control plane in SDN. One of the trends in networking such as big data, cloud computing
preliminary attacks in SDN is Denial-of-Service (DoS) attack. increases the load on traditional network and this situation
Providing security to control plane using traditional intrusion motivated to introduce new network architecture. In 2008,
detection system (IDS) to mitigate DoS attack is a challenge. DoS SDN architecture has been introduced by Open Flow standard
attack in SDN affects performance and behavior of network. [1] to deal with increasing data load on network.
Legitimate hosts are not able to communicate with server after
The aim of SDN is to separate data plane and control plane
creation of DoS attack. This paper aims to detect and mitigates
DoS attack in SDN. For detection and mitigation of DoS attack
using open flow protocol. Data plane includes networking
we used two techniques-- 1) Rule based approach using Snort element such as switch, router etc and also called as
tool 2) Anomaly based approach using BRO tool. For DoS attack forwarding plane as it controls data forwarding of network.
creation we employ Hping3 and Low Orbit Ion Cannon (LOIC) Control plane is also known as the brain of SDN as it handles
tools. We evaluate the performance of technique using entire network by automating network management [2] and
parameters like packet loss, average time and round-trip time. maintains the global view of the network. Now SDN is widely
Further work can be extended by reducing false positives and used in many areas such as facebook, Google, data centers etc.
false negatives in IDS. False positives are false alarms generated There are various SDN controllers available such as
on normal traffic. Which may help to improve the performance
Floodlight [3]. Though SDN is more efficient in terms of
IDS.
management of global network over traditional network, there
are some challenges such as controller failover, load
Keywords—Software Defined Network (SDN); Open Flow;
security; Denial of Service (DoS); Open Networking Foundation
balancing, scalability, traffic engineering, and security and
(ONF); Southbound interface (SBI); snort; Bro; Intrusion controller placement [4]
Detection System (IDS). The idea of separating control plane and data plane in SDN
provides many advantages to networking environment but also
introduces various security challenges. In IP spoofing, attacker
can send fake packets to SDN controller indicating that the
packet is from authorized source. In this way attacker can gain
unauthorized access to controller [4]. Unauthorized access to

978-1-5386-4031-9/17/$31.00 ©2017 IEEE 469


Proceedings of the International Conference on Inventive Computing and Informatics (ICICI 2017)
IEEE Xplore Compliant - Part Number: CFP17L34-ART, ISBN: 978-1-5386-4031-9

controller can increase the risk to sensitive information architecture of the system. Section 4 depicts working of IDS.
disclosure. Results and analysis are explained in section 5. The paper is
concluded in section 6 with further research direction.
To date there are many security solutions available such as
Avant-guard [5], Of- guard [6], Flow ranger [7], Flood-guard 2. SDN SETUP
[8] Fresco [9].
Avant-guard [5] secures data plane from TCP based attack by Dos attack can be intended to flood control plane bandwidth
providing extension to Data plane as connection migration and by creating number of new flows which can result into
actuating trigger. Limitation of avant-guard is that, it secures network failure for users. Attack on controller can damage
data plane from only TCP based dos attack. It is not effective the entire network due to communication failure.
for securing control plane from attack. Another possibility of DoS attack is on switch, which can be
Of-guard [6] is data plane layer security solution and uses data caused by filling up the flow table memory [7]. The
plane cache to filter attack. Of-guard is limited to data plane. networking element or switch has limited memory which is
So it can not secure control plane. As it uses data plane cache the target of attack. In this case switch is unable to forward
to detect the attack, it is limited to only known attacks. The buffered packets until there is free memory space in switch
details on other tool are available in reference [4]. flow table. This attack is local for a particular switch and it
Fresco [7] is application layer security framework and helps to does not affect the whole network. Security framework in
develop new security applications by providing event SDN can be provided for data plane, control plane or
triggering and data sharing. Limitation of fresco is that, it application plane.
provides limited security modules and solution is not available In proposed system the IDS is placed in between switch
yet. and controller. IDS is providing security for live traffic in
The limitation of above stated tools does not provide security southbound that is in between data plane and control plane.
to control plane and only effective against only specific type Our system considers DoS attack on the host which are
of attack and discussed DoS attack analysis only. These connected to switch. We are flooding the resources on the
limitations motivated us, to present DoS attack detection and host with the number of fake packets. Due to this host
mitigation technique in SDN environment between data plane becomes unreachable from other host and the resources on
and control plane. In this paper we are focusing on DoS attack host become unavailable.
detection and mitigation using rule based technique and
anomaly based technique by using powerful network intrusion 2.1 Basic SDN setup-
detection system (NIDS) Bro and Snort. We evaluate the
performance of these two Intrusion Detection Systems in SDN We have created SDN setup to detect and mitigate DoS
environment using parameters such as packet loss, average attack using rule based and anomaly based IDS.
time and round-trip time. Our detection technique can be We used Open virtual Switch (OvS). We have installed each
further extended to detect other types of attacks. switch on separate machine. In our system floodlight
controller is used. We have installed floodlight on separate
BRO [10] and Snort [11] are network intrusion detection machine. In this system one or more OvS switches are
systems. Snort is signature based IDS while BRO is anomaly connected to host. All the network setup is done on ubuntu
based IDS. Snort is open source network IDS and uses 14.0. Then OvS is connected to floodlight controller. We
predefined activity pattern related to known attacks to have connected to remote floodlight Controller. The
identify and block the infected traffic; these patterns are connectivity between switches is possible by doing L3
known as “signature” or “rule”. Upon matching signature, switching on SDN setup
snort performs various actions such as alert, drop etc. It also
alerts the network administrator about malicious activity so 2.1.1 L3 switching in basic SDN setup-
that admin can take appropriate action or if snort is
configured as inline mode, it can drop the malicious traffic. This system leverage OvS from L2 to L3 switching. So that
host to host communication is possible using IP address.
BRO is a general purpose tool with scripting language for a Communication in different subnet can be done using L3
network analysis. It consist of libpcap, event engine and switching. VLAN have their own subnet. So L3 switching is
policy script interpreter. These scripting are used for packet needed to route in-between VLANs.In L3 switching switch
capturing, event generation policy creation. Libpcap library works as router.
take care of capturing packets. Then traffic is passed to event
engine to take necessary action. Then policy script interpreter Steps for leverage from L2 to L3 switching in system-
finds suspicious activity. It generates log files and learns 1) Install open virtual switch.
about network. 2) Connect hosts to OvS.
3) Execute the switch and create bridge to the respective
Rest of the paper is organized as follows. In section 2 we switch.
discussed SDN Setup. Section 3 explains the design

978-1-5386-4031-9/17/$31.00 ©2017 IEEE 470


Proceedings of the International Conference on Inventive Computing and Informatics (ICICI 2017)
IEEE Xplore Compliant - Part Number: CFP17L34-ART, ISBN: 978-1-5386-4031-9

4) Set the IP of data plane interfaces to zero. As later on this ip connected to floodlight controller. Once this connectivity is
will be assigned to bridge created. done the SDN topology gets created. In the given setup host
5) Add each interface to its own OvS bridge. to host communication through switch is done using L3
6) Configuration can be verified at this stage. switching. Now the host are able to ping each other. Out of
7) Go to any hosts and try to ping other host, it will not be the four connected host to OvS one host is acting as attacker
possible in this stage. to create DoS attack using hping3 and LOIC. One host will
8) Give IP address and netmask to OvS bridge. be a victim. After DoS attack creation victim becomes
9) Connect to the remote controller. unreachable from any of the other host. IDS is placed in
10) Enable IP forwarding between switch and controller in our system. After that we
11) Now ping between hosts with IP address is possible. execute IDS and check out the network performance. Third
Means L3 switching is successful. host will be used to check whether the victim is reachable or
As a result we get connectivity in SDN network using L3 not. After execution if IDS victim becomes reachable and
switching. Example of one of the topology created is as thus mitigation of DoS attack is performed. We have
shown in Figure 1. In this we have created two switches considered Snort as rule based technique and BRO as
connected to floodlight controller. Six numbers of hosts are Anomaly based technique. How Snort and BRO IDS work to
created and connected to the switches. Each switch is detect and mitigate the attack is discussed in section.
assigned in different subnet. We used L3 switching for
connecting different subnets. 3.1 DoS attack creation in SDN-
Number of tools is available for DoS attack creation. We are
creating DoS attack using Hping3 [12] and LOIC [13] tool.
Both of these tools are open source tools. Switch is flooded
with SYN request using hping3. DoS attack is creating don
one of the hosts connected to switch either on same or
different switch. Hping3 floods the victim host with number
of packets. So that all resources get exhausted and the
internet services on the victim becomes unavailable.LOIC
sends threat packets to victim host. It can send TCP, UDP,
ICMP packets to victim. These threat packets make victim
system unavailable. Both of the tools needs victim IP address.

3.2 Intrusion Detection Systems-


Detection and mitigation of DoS attack on real time traffic is
done by two techniques. One technique is ruled based IDS
Figure 1: Floodlight Topology and other is anomaly based IDS as explained below.

3. DESIGN ARCHITECTURE: 3.2.1 Rule based IDS - Snort:

We proposed the design architecture in the Figure 2.

Figure 3: Snort architecture:

As shown in Figure 3 Snort architecture [14] has four


components such as sniffer, pre-processor, detection engine,
and alerts/logging. First packet sniffer accepts the packet and
analyse various network protocol. Snort saves the packet if it
has to be processed later. This uses libpcap (pcap liabrary) to
get the packet from network device. libpacp provides
information such as length of the packet, packet captured
Figure 2: Proposed system time, link type etc. Then packet decoder decodes the packet
according to link layer type and set the pointers at various
The system to mitigate DoS attack is as shown in Figure 2. parts of the packets, this allow quick access from the various
One Ovs switch is connected to three hosts. Switch is part of the network. After packet decodation is done it is sent

978-1-5386-4031-9/17/$31.00 ©2017 IEEE 471


Proceedings of the International Conference on Inventive Computing and Informatics (ICICI 2017)
IEEE Xplore Compliant - Part Number: CFP17L34-ART, ISBN: 978-1-5386-4031-9

to the pre-processor. There are number of pre-processor The architecture of Bro IDS [16] is shown in Figure 5.
available in snort. After preprocessing the packet it is passed Network – It captures the traffic coming over network.
to detection engine. It match the packet against signature Filtering of packets is done in this layer. Libpcap is a packet
database that is included in snort by walking signature tree capture library provided by tcpdump. It provides powerful
till the detection engine either match the rule or it reach at the filter such as BPF filter. Libpcap use the filter to reduce
end. If the rule is matched, snort generates the alert and sends traffic captured.
it to databse. Event engine – Resulting filtered packets are then handed over
to event engine layer. It ensured that the packet headers are
Snort inline mode [15]: proper. It checks weather IP header checksum correct and not.
Snort inline mode acts as intrusion prevention system and If everything is fine then event engine looks up for connection
creates transparent bridge between two network segments. state with associated ip addresses. Different connection
changes generate different connections.
Policy script interpreter – Events generated by the event
engine are checked by script interpreter. After finishing
processing of packets by event engine policy script
Figure 4: Snort inline mode interpreter checks whether any event if generated. It keeps all
events in FIFO order and processes each event until the
Figure 4 shows that the snort in inline mode creates the queue is empty.
transparent bridge between host1 and host2. All the traffic
from host1 to host2 is passed through snort. The Snort inline Advantages of BRO
mode passes the traffic to other host or drops if the traffic is Open source- BRO is open source IDS which can be installed
suspicious. easily. One can use BRO without any restrictions.
Detect about network- BRO identifies what is going on a
Snort advantages: network. It detects network activity, files types, softwares,
Snort is open source and allows developing and customizing and connected network devices.
the modules or rules of snort. It is easy to understand and Large volume monitoring-
compatible with many operating systems. It can act as Open interfaces- Bro can be connected with other application
intrusion detection system as well as intrusion prevention for real time data exchange [17].
system. Snort signatures are easily available. snort has active Spiritual community- Bro has vibrant community. It is a
community of developers and users. growing community which provides support and assistance.
Forensic- Bro detects what is going on network and it logs it.
Snort Limitation: This provides high level archive of network activity.
Speed of network may prompt snort from picking up all the Real time notification- Bro monitors real time traffic over the
packets. Default rules in snort and new snort installation may network. It checks the traffic with logs. If there is occurrence
give many false positive alarms. False positives are false of any weird activity then Bro generated the notification
alerts. We can get rid of these false positive by tuning snort against it.
with relevant to the network. Underlying infrastructure must
support snort as snort’s performance is depend on network Limitations of Bro-
stack. Snort signature database should be updated regularly
otherwise snort itself be victim of new attack. False positive - Bro generates high rate of false positive.
Preliminary training- Effectiveness of Bro is depends on
3.2.2 Anomaly based IDS-Bro: preliminary training -As Bro takes decision about malicious
activity based on logs generated. It needs preliminary data to
take proper decision.

4. WORKING OF IDS

In this section we discussed attack mitigation using Snort and


Bro.
4.1 Attack mitigation using Snort
Attack mitigation using Snort is discussed below [14].
1. Command line: Snort has more than 40 command line
option including –c<config file>.

2. Snort config file: command line includes the config file


path. Snort initialization process parses the config file
Figure 5: Bro Architecture

978-1-5386-4031-9/17/$31.00 ©2017 IEEE 472


Proceedings of the International Conference on Inventive Computing and Informatics (ICICI 2017)
IEEE Xplore Compliant - Part Number: CFP17L34-ART, ISBN: 978-1-5386-4031-9

which contains various configuration options, rules etc. 4.2 Attack mitigation using Bro
parser is located in parse.c file.
Attack mitigation using Bro is discussed below [18].
3. Rule parsing: Rule parsing is done by snort to identify the 1. Export module pcap-
rule type and detection options. Every snort rule consists pcap.bif. BRO will be generated by user when it executes
of header and options. Bro. It checks identifier of pcap filter and checks whether
it is installed successfully.
4. Packet processing: Snort uses libpcap (pcap liabrary) to global Pcap::install_pcap_filter: function(id: PcapFilterID
receive packet from network device on which snort is ): bool ;
configured. It provides basic information about packet
such as length, link type, captured time, actual content of 2. Information record stores network statistics information.
the packet. Generate BRO init event to collect information of states.
Netstat() is used to get information about state over the
5. Packet decoding: Packet decoder decodes the packet network while transferring packets.
according to packets link type and keeps watch on packet
structure. It generate alert if packet has irregular size, set 3. Log the information about connection state. It set s0,s1,SF
options or setting. For example if ethr_type is 2048, it bits for different connection state. In our system s0 bit is
identifies that the layer is IP. It calls the decoderIP, which set as only connection attempt is seen but no reply is
further identifies the next decoder till there is no more there. We get state history bit s as SYN without ACK
decoder left. occurred in our system. Bro event checks for inactive
connections and generate an event to remove that state. It
6. Attack detection: Attack detection in snort is done by stops to receive packets from respective ip address.
various signatures predefined in the snort and upon rule
matching appropriate action is taken. Pattern matching 4. Bro checks for log information stored above and generate
engine walks through every rule until either the match is notice which gives which weird activity occurred. For our
found or it reaches to the end of the rule file. Default snort system BRO detects SYN_seq_jump weird activity.
rules are available on the snort website. Snort rules are
simple and easy to understand. Snort rules are divide into 5. Netstat.log generates statistics about received and dropped
two parts i.e. header and option. Rule header defines the packets.
action (such as alert, pass, drop, log etc), protocol, source
and destination address, port, direction of the traffic. Rule 5. RESULT AND ANALYSIS
option defines various options such as alert message,
signature id, payload options, non-payload options etc. In this section we will see the actual results of the attack
payload options used to identify the attack using data detection and mitigation.
inside the packet payload.
For Example: 5.1 Detection and Mitigation of DoS using Snort

“alert tcp $EXTERNAL_NET any -> $HOME_NET any Figure 6 shows the snort GUI. Snort GUI provides details of
(msg:"ET DOS Inbound Low Orbit Ion Cannon LOIC alerts that are generated on suspicious packet.
DDOS Tool desu string"; flow:to_server,established;
content:"desudesudesu"; nocase; fast_pattern:only;
threshold: type limit,track by_src,seconds 180,count 1;
reference:url,www.isc.sans.org/diary.html?storyid=10051;
classtype:trojan-activity; sid:2012049; rev:4;)”

Above snort rule identifies the attack created by using


LOIC (Low Orbit Ion Cannon) attack creation tool. This
generate alert on tcp packets from any port if it matches
the “desudeudesu” string, as LOIC has constant string Figure 6: Snort alerts
“desudesudesu”.
It also shows the structure of alerts in snort. In Figure ID
7. Attack Mitigation: To mitigate the attack, snort should defines the signature id on which attack is detected. Signature
configure as inline mode. Inline mode of snort acts as field shows the message. Timestamp provides the time and
intrusion prevention system. date of attack detection. IP address of attacker machine and
victim machine provided in source address and destination
address respectively.

978-1-5386-4031-9/17/$31.00 ©2017 IEEE 473


Proceedings of the International Conference on Inventive Computing and Informatics (ICICI 2017)
IEEE Xplore Compliant - Part Number: CFP17L34-ART, ISBN: 978-1-5386-4031-9

5.2 Detection and Mitigation of DoS using BRO

notice.log-
Bro generates log file for weird activity. For our system
notice.log file is generated as shown in Figure 7. For our
SDN setup weird activity is labled as SYN_seq_jump. This is
the error generated when TCP connection is not established.
We get notice.log file which gives value of timestamp,
unique id, ip address of originator responder and the name of
error generated as shown in Figure 7.

Figure 9: Packet Loss

Average time- In the given system average time required for


packet transmission goes on increasing after creation of DoS
attack. The given figure 10 represent number of packet
transmitted and average time required for packet
transmission. Average time goes on increasing after DoS
Figure 7:Noltice.log attack creation and it reduced down after mitigation of DoS
weird.log- attack.

This file is generated when there is occurrence of weird


activity on real time traffic. As shown in figure 8 weird.log
file gives number of packets received and number of packets
dropped with the respective ip.

Figure 8: Weird.log file

5.3 Performance Evaluation


Figure 10: Average time
In our SDN set up DoS attack is created using different tools.
Bro and Snort Performance in SDN:
After creation of DoS attack different factors get affected.
We have considered packet loss, average time, round-trip
Round-trip time for packet is a time required to travel a
time factors for DoS attack detection and mitigation.
packet from source to destination and back again. In our SDN
set-up rtt goes on increasing after creation of DoS attack. At
Packet loss- In our system host to host communication is
one point rtt is very high and after that victim host becomes
possible before creation of DoS attack. At this point all the
unreachable.
packets transmitted by sender get received by receiver. So
0% packet loss is occurred at this point. After creation of
DoS attack by different tool on our system, number of
packets transmitted gets lost. So there is occurrence of packet
loss. At one stage we get 100% packet loss. It means that
packets are not possible to receive from sender. In the Figure
9, X axis represents number of packets transmitted and Y axis
represents number of packets received. Before DoS attack
creation this ratio is same. After DoS attack creation number
of packets received is less than number of packet transmitted.

Figure 11: BRO and Snort Performance in SDN


We have executed Bro and snort IDS on respective machine
after creation of DoS attack. Once IDS check out for the DoS

978-1-5386-4031-9/17/$31.00 ©2017 IEEE 474


Proceedings of the International Conference on Inventive Computing and Informatics (ICICI 2017)
IEEE Xplore Compliant - Part Number: CFP17L34-ART, ISBN: 978-1-5386-4031-9

attack it drops the malicious packets. Then the round-trip [9] S. Shin, V. Yegneswaran, P. Porras, and M. Tyson, “Fresco: Modular
composable security services for software
time falls down and after some time it becomes very less.
defined network In NDSS”,2013
Now the victim is reachable from other hosts.
[10] Surya bhagavan ambati, deepti vidyarthi,”a brief study and comparison
Figure 11 shows performance of both IDS rule based Snort
of, open source intrusion detection system tools”,2013
and anomaly based Bro in SDN environment. Though there is
[11] https://snort.org/
slight difference in performance of Snort and Bro IDS, both
IDS efficiently mitigated DoS attack in SDN network. After [12] https://tools.kali.org/hping3
attack detection the average round trip time is reduced to [13] https://sourceforge.net
100ms. [13] Andrew R. Baker Joel Esler, “Snort IDS and IPS toolkit”
[14] https://s3.amazonaws.com/snort-org- site/production/document_files/
6. CONCLUSION files/000/000/069/original/Snort-IPS-
Tutorial.pdf?AWSAccessKeyId=AKIAIXACIED2SPMSC7GA&Expires
In this paper, we proposed the DoS attack mitigation =1506507808&Signature=Gi%2Fi%2BSZuOCk6ujFAIdsz%2BuDnt3w
%3D
techniques using rule based and anomaly based techniques in
SDN. Our proposed system mitigates the DoS attack using [15] Tianyi Xingl, Zhengyang Xiongl, Dijiang Huangl, Deep Medhi2,”
SDNIPS: Enabling Software-Defined Networking Based Intrusion
SNORT and BRO IDS. We have created the SDN setup for
Prevention System in Clouds”, 2014 IFIP
the demonstration of DoS attack creation, detection and
[16] Matthias Vallentin,”Network Intrusion Detection & Forensics with Bro”,
mitigation. Attack is created by flooding the targeted hosts or
2016
resource with false requests in an attempt to overload the
[17] Anshu Sharma,Monika Sharma ,”Analysis and implementation of BRO
network and prevent some or all legitimate hosts there
IDS using signature script”,2015
communication. For detection and mitigation of DoS attack
[18] http://www.bro.org/
we used signatures of attack in SNORT and BRO analyses
the packet history collected in scripting log files.
The performance of the network before and after DoS attack
mitigation is evaluated using packet loss, average time and
round trip time. It is observed that packet loss was 95%
reduced over the average time of 5 minutes.
In future we can extend this work to mitigate distributed
Denial of service attack i.e. DDoS attack. This effectively
makes it impossible to stop the attack simply by blocking a
single source.

ACKONOLEGEMENT
The authors would like to thank CDAC, Juhu, Mumbai for
giving us an opportunity to do this project and fulfilling our
requirements needed for execution of the project. The authors
would also like to thank Usha Mittal Institute of Technology
and department of computer science and technology for the
support provided. We would be grateful to our guide Dr. Zia
Saquib from CDAC, Sudhir T. Bagade and Amrapali V.
Mhaisgawali from UMIT for their timely help and guidance.

REFERENCES

[1] https://www.opennetworking.org/about/onf-overview
[2] https://www.opennetworking.org/sdn-resources/sdn-definition
[3] http://www.projectfloodlight.org/floodlight/
[4] Survey on DoS attack challenges in Software Defined Networking.
[5] Seungwon Shiny Vinod Yegneswaranz Phillip Porrasz Guofei Guy,
“AVANT-GUARD: Scalable and Vigilant Switch Flow Management in
Software-Defined Networks”,2013.
[6] H. Wang, L. Xu, and G. Gu,”Of-guard: A dos attack prevention extension
in Software defined network, In Open Networking”,Summit 2014, Poster
Session.USENIX.
[7] https://www.opennetworking.org/sdn-resources/sdn-definition
[8] https://en.wikipedia.org/wiki/Software Defined Network

978-1-5386-4031-9/17/$31.00 ©2017 IEEE 475

You might also like