Sie sind auf Seite 1von 62

See

discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/279800363

M Tech Thesis

Research · July 2015

CITATIONS READS

0 4,994

1 author:

Bikram Ballav
Institute of Technical Education and Research
16 PUBLICATIONS 4 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Security limitations, coverage and connectivity of IoT Sensors View project

Security limitations, coverage and connectivity of IoT Sensors View project

All content following this page was uploaded by Bikram Ballav on 21 August 2015.

The user has requested enhancement of the downloaded file.


Investigating the effect of Black Hole attack on
Zone Based Energy Efficient Routing Protocol
for Mobile Sensor Networks

Dissertation

Submitted in partial fulfillment of the requirements


for the degree of

Master of Technology
CSE
by

Bikram Ballav
Regd. No : 1361012004

Under the guidance of


Prof Binod K Pattanayak
Associate Professor

Department of CSE
Institute of Technical Education and Research
Siksha ’O’ Anusandhan University
2015
Dissertation Approval Certificate

This is to certify that the dissertation entitled “Investigating the effect of


Black Hole attack on Zone Based Energy Efficient Routing Protocol
for Mobile Sensor Networks” submitted by Bikram Ballav (Regd. No
1361012004) is approved for the degree of Master of Technology in Computer
Science and Engineering from Institute of Technical Education and Research,
Siksha ’O’ Anusandhan University, Odisha.

Dr. Binod K Pattanayak


Associate Professor
Department of CSE
(Supervisor)

Dr. Debahuti Mishra


Department of CSE
(Head of the Department)

(External Examiner)

Date: 2nd June 2015


Place: ITER, Bhubaneswar
Declaration

I declare that this written submission represents my ideas in my own words and
where others ideas or words have been included, I have adequately cited and ref-
erenced the original sources. I also declare that I have adhered to all principles
of academic honesty and integrity and have not misrepresented or fabricated or
falsified any idea/data/fact/source in my submission. I understand that any vio-
lation of the above will cause for disciplinary action by the Institute and can also
evoke penal action from the sources which have thus not been properly cited or
from whom proper permission has not been taken when needed.

(Signature)
Bikram Ballav
Regd No 1361012004
Acknowledgment

The satisfaction of successful completion of any task would be incomplete without


mention of the people who made it possible and whose constant guidance and en-
couragement crowns all efforts with success.
I express my deep sense of gratitude to my guide Dr. Binod K Pattanayak, Asso-
ciate Professor, Department of Computer Science, for his initiative and constant
inspiration. I would also thank all the faculty members for their co-operation and
valuable suggestions during the preparation of this seminar report. Last but not
the least a special thanks to all my classmates for their support and compas- sion.

Bikram Ballav
Redg No 1361012004
Abstract

A wireless Sensor Network (WSN) consists of a set of distributed sensors with


sensing, computation, and wireless communication capabilities to monitor physi-
cal or environmental conditions and to cooperatively pass their data through the
network to a base station. Wireless nodes have limited energy capabilities with lim-
ited computation and memory capacity on a dynamically changing environment.
Sensor networks are application dependent and are primarily designed for real-time
collection and analysis of low level data in hostile environments. A Mobile Sensor
Network (MSN) is a collection of mobilizer attached sensor nodes.These nodes can
move randomly or task specifically.The relation between WSN and MSN is that
when WSN nodes are moving they are known as MSN. Routing is a basic step for
data exchange in MSN. Where each node acts as a router and executes a routing
protocol. The routing protocols designed for ad hoc networks are suitable to MSN
because they support mobility which change the topology frequently. But these
protocols are not suitable due to resource constraint nature of MSN nodes.Hence
we need new ones. Zone based Energy Efficient Routing Protocol (ZEEP) is one
of the new protocol in this direction which is the modified form of one of the most
famous Ad-hoc routing protocol Ad Hoc On Demand Distance Vector Routing
Protocol (AODV).The broadcasting nature of the sensors presents a number of
security threats to this kind of network. One of these attacks is the Black Hole
Attack, which grasps all data packets of the network. Since data packets do not
reach the destination, data will loss.These affects the performance of the whole
network.In this thesis, I simulated this Black Hole Attack in AODV and ZEEP
protocols using Network Simulator and have tried to find that the effect of Black
Hole Attack is less affected in case of ZEEP protocol. To support my views I
used two quality of service parameters like Packet Delivery Ratio and Through-
put. And show that they have improved with Black Hole affected ZEEP (BZEEP)
than Black hole affected AODV (BAODV).

Keywords - Black Hole Attack , WSN , MSN, BAODV, BZEEP .


Contents

1 Introduction 1
1.1 Motivation behind this Thesis: . . . . . . . . . . . . . . . . . . . . . 4
1.2 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Organization of Thesis . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 Mobile Sensor Network 7


2.1 Wireless Sensor Network Characteristics . . . . . . . . . . . . . . . 7
2.1.1 Design Constraints . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.2 WSN Applications . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 What is Mobile Sensor Network? . . . . . . . . . . . . . . . . . . . 10
2.2.1 How mobility can be achieved? . . . . . . . . . . . . . . . . 10
2.2.2 Why we use mobile sensor network? . . . . . . . . . . . . . . 10
2.2.3 Dis-advantages: . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.4 Applications of MSN: . . . . . . . . . . . . . . . . . . . . . . 11
2.3 Routing Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3 Energy Efficient Routing Protocol 13


3.1 Energy Efficient Routing Protocols in MSN . . . . . . . . . . . . . 13
3.1.1 What is energy efficient routing protocol ? . . . . . . . . . . 13
3.1.2 Why energy efficient routing protocol is required ? . . . . . . 13
3.1.3 Design goals behind Energy Efficient Protocols : . . . . . . . 14
3.1.4 Classifications of Energy efficient routing protocols . . . . . 15
3.2 Types of Zone Based Energy Efficient Routing Protocols . . . . . . 16
3.2.1 Zone Routing Protocol (ZBR) . . . . . . . . . . . . . . . . . 16
3.2.2 Zone Based Energy Efficient Routing Protocol (ZEEP) . . . 18

4 Security Issues in Wireless Network 20


4.1 Attack Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.1.1 Active Attacks and Passive Attacks . . . . . . . . . . . . . . 21
4.1.2 Passive Eavesdropping . . . . . . . . . . . . . . . . . . . . . 22
4.1.3 Gray Hole Attack (Routing Misbehavior) . . . . . . . . . . . 22

1
4.1.4 Impersonation Attack . . . . . . . . . . . . . . . . . . . . . 23
4.1.5 Sink Hole Attack . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1.6 Worm Hole Attack . . . . . . . . . . . . . . . . . . . . . . . 23
4.1.7 Sybil Attack . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.1.8 Selective Forwarding Attack . . . . . . . . . . . . . . . . . . 24
4.2 Motivation and Challenges behind security . . . . . . . . . . . . . . 24

5 Black Hole Attack 25


5.1 What is Black Hole Attack . . . . . . . . . . . . . . . . . . . . . . 25
5.1.1 How it Works for Ad hoc network ? . . . . . . . . . . . . . 25
5.2 Mitigation Approaches of Black Hole Attack . . . . . . . . . . . . . 27
5.3 How Black Hole attack effect on Zone based energy efficient routing
protocol or ZEEP ? . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

6 Network Simulator 33
6.1 NS Network Simulator . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.2 Tcl Language in NS . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.3 Trace File Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

7 Simulation of Black hole attack and effects 37


7.1 Implementing AODV and ZEEP Protocol in NS2.35 To Simulate
Black Hole Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.2 Simulation Parameters and Measured Metrics . . . . . . . . . . . . 38
7.3 Evaluation of The Simulation . . . . . . . . . . . . . . . . . . . . . 38
7.4 Examining The Trace File and Getting The Results . . . . . . . . 42
7.5 Performance Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . 43

8 Results and Discussions 44


8.1 Evaluation of Results . . . . . . . . . . . . . . . . . . . . . . . . . 44
8.1.1 Packet Delivery Fraction . . . . . . . . . . . . . . . . . . . 44
8.1.2 Throughput . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
8.2 Analysis of result . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

9 Conclusion and Future Work 50


9.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
9.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
List of Figures

1.1 Wireless Sensor Networks: A Structure . . . . . . . . . . . . . . . . 2


1.2 A Sensor Device: the Macro-Mote , developed at UCBerkeley. (Cour-
tesy of UCBerkeley.)[2] . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.1 Components of a Wireless Node [2] . . . . . . . . . . . . . . . . . . 7


2.2 Applications of WSN [2] . . . . . . . . . . . . . . . . . . . . . . . . 9

3.1 Different Energy Efficient Routing Protocols . . . . . . . . . . . . . 15


3.2 Working principle of ZEEP protocol . . . . . . . . . . . . . . . . . . 18

4.1 Security attacks in WSN [16] . . . . . . . . . . . . . . . . . . . . . . 21

5.1 Black hole Attack in AODV protocol . . . . . . . . . . . . . . . . . 26


5.2 Calculation of Mobility Factor (M.F) for ZEEP to select Zone Head 29
5.3 Black hole affected path Vs Normal path in case of ZEEP protocol . 30
5.4 Drop of packets due to black hole attack on ZEEP protocol . . . . . 31

6.1 Network Animator or NAM to show output for NS 2.35 . . . . . . . 34


6.2 Trace file analysis [29] . . . . . . . . . . . . . . . . . . . . . . . . . 35

7.1 NAODV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.2 BAODV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.3 NZEEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7.4 BZEEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

8.1 BAODV Vs BZEEP wrt packet delivery ratio . . . . . . . . . . . . 45


8.2 BAODV Vs BZEEP wrt throughput . . . . . . . . . . . . . . . . . 46
8.3 BZEEP Vs NZEEP wrt throughput . . . . . . . . . . . . . . . . . . 47
8.4 BAODV Vs NAODV wrt throughput . . . . . . . . . . . . . . . . . 47
8.5 NAODV Vs BAODV wrt pdr . . . . . . . . . . . . . . . . . . . . . 48
8.6 BZEEP Vs NZEEP wrt pdr . . . . . . . . . . . . . . . . . . . . . . 48
8.7 NAODV Vs NZEEP wrt energy consumption . . . . . . . . . . . . 49
Chapter 1

Introduction

In this new era of communication, the advent of mobile computing has revolu-
tionized our information society. The proliferation of new, powerful, efficient and
compact communicating devices like personnel digital assistants (PDAs), pagers,
laptops and cellular phones, having extraordinary processing power paved the way
for advance mobile connectivity. We are moving from the Personal Computer age
to the Ubiquitous Computing age in which a user utilizes, at the same time, sev-
eral electronic platforms through which he can access all the required information
whenever and wherever needed. The nature of ubiquitous devices makes wireless
networks the easiest solution for their interconnection and, as a consequence, the
wireless arena has been experiencing exponential growth in the past decade .
Among the numerous applications and services run by mobile devices, net-
work connections and corresponding data services are the most demanding ones
[1]. Currently, most of the connections among the wireless devices are achieved
via fixed Infra-structure based service provider, or private networks. While infra-
structure based networks provide a great way for mobile devices to provide network
services, it takes time and potentially high cost to set up the necessary infrastruc-
ture. There are, many situations where user required networking connections are
not available in a given geographic area, and providing the needed connectivity
and network services in these situations becomes a real challenge [2].
For all these reasons, combined with significance advances in technology and
standardization, new alternative ways to deliver mobile connectivity have been
emerging. These are focused around having the mobile devices connect to each
other in the transmission range through automatic configuration, setting up an ad
hoc mobile network that is both flexible and powerful.
AWireless Sensor Network (WSN) is a collection of relatively inexpensive
computational nodes that measure local environmental conditions like tempera-
ture, sound, pressure etc and forward such information to a base station for ap-
propriate processing [2]. WSN is somehow similar to ad hoc mobile network in

1
the sense that both are resource constrained, like the battery power, computation
capacity, communication range and memory. WSNs nodes (WNs) can sense the
environment, can communicate with neighboring nodes, and can, in many cases,
perform basic computations on the data being collected.
challenges:
Sensor nodes are deployed randomly in the application area, as a result of that,
the WSN has usually varying degrees of node density along its area. The probably
difference of node density among some regions of the network and the energy con-
straint of the sensor nodes cause nodes slowly die making the network less dense
[1].
Also it is quite common to deploy WSNs in harsh environment, what makes
many sensors faulty [3]. For that reason, these networks need to be fault-tolerant
so that the need for maintenance is minimized. Typically the network topology
is changing dynamically. The solution for this problem is to implement routing
protocols that perform efficiently and utilizing the less amount of energy as possible
for the communication among nodes.

Figure 1.1: Wireless Sensor Networks: A Structure

2
Applications of WSN :
WSNs support a wide range of useful applications, ranging from environmental
sensing to vehicle tracking, from perimeter security to inventory management, and
from habitat monitoring to battlefield management. With WSNs one can monitor
and control factories, offices, homes, vehicles, cities, the ambiance, and the envi-
ronment etc. For example, one can detect structural faults (e.g., fatigue-induced
cracks) in ships, aircraft,and buildings. Also applications like Volcanic eruption,
earthquake detection, and tsunami alerting that generally require Wireless Nodes
deployed in remote, even difficult-to-reach locations [2].

Inside structure of a Sensor Node: with memory , processor , sensing


and communication devices

Figure 1.2: A Sensor Device: the Macro-Mote , developed at UCBerkeley. (Cour-


tesy of UCBerkeley.)[2]

A Mobile wireless sensor network (MSN) can be defined as a wireless


sensor network (WSN) in which the sensor nodes are mobile. MSN is a smaller,
emerging field of research in contrast to their well-established predecessor.MSN is
much more versatile than static sensor networks as they can be deployed in any
scenario and cope with rapid topology changes. However, many of their applica-
tions are similar, such as environment monitoring or surveillance.Commonly the

3
nodes consist of a radio transceiver and a microcontroller powered by a battery.
As well as some kind of sensor for detecting light, heat, humidity, temperature,
etc and a mobilizer to move , that depends on application itself.
Challenges:
Broadly speaking there are two sets of challenges in MSN; hardware and en-
vironment [4].The main hardware constraints are limited battery power and low
cost requirements.The limited power means that it’s important for the nodes to be
energy efficient.For low cost requirement low complexity algorithms are used.The
major environmental factors are the shared medium and varying topology.The
shared medium dictates that channel access must be regulated in some way.This
is often done using a medium access control (MAC) scheme, such as carrier sense
multiple access (CSMA), frequency division multiple access (FDMA) or code di-
vision multiple access (CDMA).The varying topology of the network comes from
the mobility of nodes, which means that multihop paths from the sensors to the
sink are not stable. For routing purpose Ad-hoc protocols are preferred as they are
able to work in mobile environments, where WSN protocols often aren’t suitable.
Applications of MSN:
The advantage of allowing the sensors to be mobile increases the number of
applications beyond those for which static WSNs are used. Sensors can be attached
to people for health monitoring, which may include heart rate, blood pressure etc.
Animals can have sensors attached to them in order to track their movements for
migration patterns, feeding habits or other research purposes. Sensors may also
be attached to unmanned aerial vehicles (UAVs) for surveillance or environment
mapping [4].

1.1 Motivation behind this Thesis:


Due to the wireless nature of the sensor networks and constrained nature of re-
sources on the mobile sensor nodes, a variety of attacks are possible in Wireless
Networks, which means that security architectures used for traditional wireless
networks are not viable.
A Mobile Sensor Network (MSN) is composed of sensor nodes equipped with
a mobilizer[5].They can move randomly or as per specification of their application
or task.Early works in sensor network research has mainly focused on developing
an efficient routing mechanism in such a highly dynamic and resource-constrained
network, at present, several efficient routing protocols have been proposed for
MSN.They are closely related to Mobile Adhoc networks (MANETs) in a sense that
they not only involve multihop communication but there are unpredictable and fre-
quent topology changes due to mobility. Mobility brings many advance concepts
into perception and entirely shift the paradigm of research and development.Novel

4
approaches are required to address the issues raised due to unpredictable move-
ments of nodes.Frequent movements in MSN result in path breakage.Whenever
routing of packet is disrupted due to a path break, we need to reroute the data
through alternative path or the packets will be dropped, resulting in loss or de-
layed data delivery [5].For this we instantly need to repair the route or use any
backup path if available.Currently there is no standard for MSN, so often proto-
cols from MANETs are borrowed, such as Ad hoc On-Demand Distance Vector
Routing (AODV), Dynamic Source Routing (DSR) and Greedy Perimeter State-
less Routing (GPSR) these three protocols are standard for MSN.
Since there is no fixed topology in these networks, one of the greatest challenges is
routing data from its source to the destination. Generally these routing protocols
draw inspiration from two fields; WSN and mobile ad hoc networks (MANETs).
WSN routing protocols provide the required functionality but cannot handle the
high frequency of topology changes. Whereas, MANET routing protocols can deal
with mobility of the network [4].
Protocols designed specifically for MSN are almost always multihop and modifica-
tions of existing protocols.Most of these protocols assume a trusted and cooperative
environment. However, in the presence of malicious nodes, the networks are vul-
nerable to various kinds of attacks.This thesis work is based on one of the security
attack known as Black hole attack and how it affect zone based energy efficient
routing protocols.
In this thesis, we investigate the effect of Black hole attack on zone based energy
efficient routing protocol called ZEEP. This thesis details the working principles
of Black hole attack and analyses its effect in the presence of quality of service pa-
rameters that involves packet delivery ratio,throughput and energy consumption.
The extensive simulations performed over Black-hole affected ZEEP(BZEEP) proved
that BZEEP gives high packet delivery ratio, with less energy consumption by the
network,thereby increasing the network lifetime when compared to the Black-hole
affected Ad-hoc On Demand Distance Vector routing (BAODV) protocol.The sim-
ulations are performed over Network Simulator version 2.35(NS2.35).

1.2 Objective
The goal of this thesis is two-fold.

(i) It aims towards implementing and analyzing the effect of routing attack for
energy efficient routing protocols.
(ii) The results of simulation has shown that Black hole affected Zone based en-
ergy efficient routing protocol (BZEEP) has a better performance compared
to the black hole affected famous on demand based routing protocol Ad hoc

5
on demand distance vector routing protocol (BAODV) in terms of energy
consumption and packet delivery ratio of the network.

1.3 Organization of Thesis


This thesis is divided into nine chapters.

• Chapter 1, which is here, gives some introduction and motivation behind


what is WSN, what is MSN,their challenges , applications and why MSN is
vulnerable to routing attacks.

• In Chapter 2, we look at Wireless Sensor Networks and Mobile Sensor Net-


works in closer details,covering their specific characteristics.This is followed
by a classification of existing routing algorithms in it.

• Chapter 3, examines the characteristics of Zone based energy efficient routing


protocols.

• In Chapter 4, we identify the different kinds of threats and challenges sensor


network faces and motivation behind secure its communication.

• Chapter 5, presents the deadly Black hole attack in details .

• Chapter 6, gives you an idea about Network simulator .

• Chapter 7, presents the possible implementation and performance evaluation


of the proposed protocol through simulation work.

• In chapter 8, we analyze the result using different quality of service param-


eters by analyzing the graphs.

• We conclude the thesis in Chapter 9 with proposal for possible extension of


the work done.

6
Chapter 2

Mobile Sensor Network

2.1 Wireless Sensor Network Characteristics


A Wireless Sensor Network consists of sensor nodes capable of sensing physical
parameters like temperature, pressure, humidity, target tracking etc. The nodes
collect and aggregate these sensed information and route them towards the desired
destination device or sink through wireless channel. These small nodes have limited
sensing, computation, and wireless communications capabilities [2].Sensor nodes
are resource constraint type of network and contain very tiny size of irreplaceable
and not chargeable batteries. There are four basic components in a sensor net-
work: (1) an assembly of distributed or localized sensors; (2) an interconnecting
network (usually, but not always,wireless-based); (3) a central point of information
clustering; and (4) a set of computing resources at the central point (or beyond) to
handle data correlation, event trending, status querying, and data mining. Sensors
are very simple,battery powered electronic devices equipped with a tiny processor,
few kilobytes of storage memory, a radio transceiver and sometimes a mobilizer
depending upon the application.

Figure 2.1: Components of a Wireless Node [2]

7
2.1.1 Design Constraints
Although WSNs share many commonalities with wired and ad hoc networks, they
also exhibit a number of unique characteristics which set them apart from existing
networks. Meeting these design requirements presents a distinctive and unique set
of challenges [6].
These challenges can be attributed to multiple factors, including severe energy
constraints, limited computing and communication capabilities, the dynamically
changing environment within which sensors are deployed, and unique data traffic
models and application-level quality of service requirements.
1.Network Scale and Time-Varying Characteristics: There is a need for
self-organize sensor nodes to adjust their behavior constantly in response to their
current level of activity.Furthermore, sensor nodes may be required to adjust their
behavior in response to the erratic and unpredictable behavior of wireless con-
nections caused by high noise levels and radio-frequency interference, to prevent
severe performance degradation of the application supported.
2.Resource Constraints: Sensor nodes are designed with minimal complexity for
large-scale deployment at a reduced cost.Energy is a key concern in WSN, which
must achieve a long lifetime while operating on limited battery reserves.Multi-hop
packet transmission over wireless networks is a major source of power consump-
tion.The requirements of these applications are such that a predetermined level of
sensing and communication performance constraints must be maintained simulta-
neously.Therefore, a question arises as to how to design scalable routing algorithms
that can operate efficiently for a wide range of performance constraints and design
requirements.The development of these protocols is fundamental to the future of
WSN [7].
3.Sensor applications Data Models: The data model describes the flow of
information between the sensor nodes and the data sink.These models are highly
dependent on the nature of the application in terms of how data are requested and
used [4].
The need to support a variety of data models increases the complexity of the rout-
ing design problem. Optimizing the routing protocol for an applications specific
data requirements while supporting a variety of data models and delivering the
highest performance in scalability, reliability, responsiveness, and power efficiency
becomes a huge design and engineering problem .
And not only these there are many more routing challenges and design issues exist
like Node/Link Heterogeneity , Fault Tolerance , Scalability ,Network Dynam-
ics,Transmission media , Connectivity , Coverage , Data aggregation , Quality of
service etc.

8
2.1.2 WSN Applications

Figure 2.2: Applications of WSN [2]

Traditionally, sensor networks have been used in high-end applications such as


radiation and nuclear-threat detection systems, over-the-horizon weapon sensors
for ships, biomedical applications, habitat sensing, and seismic monitoring. More
recently, interest has focusing on networked biological and chemical sensors for
national security applications; furthermore, evolving interest extends to direct
consumer applications. Existing and potential applications of sensor networks
include,

• military sensing
• physical security
• air traffic control
• traffic surveillance
• video surveillance

9
• industrial and manufacturing automation
• process control
• inventory management
• distributed robotics
• weather sensing
• environment monitoring
• national border monitoring
• building and structures monitoring etc.

2.2 What is Mobile Sensor Network?


A MSN consists of sensor nodes which can move within the Network. A mobile
sensor node have three basic components like sensing subsystem, processing sub-
system and wireless communication subsystem. Studies show that introducing
mobility in WSN is advantageous [4].

2.2.1 How mobility can be achieved?


Mobility is achieved by equipping mobilizers or springs or wheels to nodes.These
nodes can be attached to transporters like animals, vehicle, robots etc.Sometimes
these nodes have to move due to the environment where they are placed.

2.2.2 Why we use mobile sensor network?


Recent research has proved that MSN outperformed the static WSN. Here some
advantages of MSN–
• Mobile nodes in MSN can be use to re-organize the network
• Lifetime of a sensor network can be increased using mobile nodes
• Mobility can reduce energy consumption during communication
• MSN have more channel capacity than static ones
• MSN can achieve better targetting
• By reducing number of hops, the probability of error decreases and data
fidelity can be achieved by MSN

10
2.2.3 Dis-advantages:
The introduction of mobility in WSN is a very challenging task due to path break-
age and node failure. Also frequent location changes can lead to drain of energy
and increase of collisions.

2.2.4 Applications of MSN:


There are quite a few applications where MSN can be used like environment mon-
itoring, search and rescue operations, bio-complexity research, intelligent traffic
system, E-voting etc. These applications require efficient and reliable routing pro-
tocols other than flooding based data sending procedures [4].
So when we need to design a mobile sensor network we should remember these
factors like node mobility, bandwidth restriction and resource scarcity.

2.3 Routing Challenges


Routing is the most challenging issue and direct concern to energy in MSN com-
parable with ad hoc and cellular networks [6].Clustering techniques for routing in
MSN is considered most suited based on its characteristics such as energy-efficient,
scalable,lower latency, etc.
But the problem with clustering is that in clustering,network is divided into sub
networks or clusters and each cluster has cluster head which is responsible to col-
lect the sensed data from his cluster and forward it to the base station [7]. Cluster
heads consumed more energy due to collecting and forwarding data from cluster
while remaining nodes in the clusters still have more energy.
This situation normally happened due to unbalanced energy assumption which
causes more drain of energy from nodes far from cluster heads in random fashion
from sensor nodes. To address this issue, several energy efficient routing algorithms
and protocols have been propose recently, The minimum energy routing problem
has been addressed in literatures [6].If sensor nodes consume energy more equi-
tably, they continue to provide connectivity for longer and the network lifetime
increases.
Routing plays an important role to identify paths and transfer data towards
base station in energy constraint sensor network.Energy is consumed more during
path finding and data transmission operations.Initially routes are defined by the
nodes then nodes become able to send or receive the data by using those rout-
ing paths [8].In case if sensed data is available to some segments of network but
network not able to transfer it to the destination due to the energy deplete of sen-
sor nodes for some segments. To solve these issues several routing protocols have

11
been developed recently to address the energy efficiency issue.In wireless networks
routing protocols normally specified in following three types:

• Flat routing Protocols


example : Directed Diffusion, Minimum cost forwarding algorithm

• Hierarchical routing Protocols


example : Low Energy Adaptive Clustering Hierarchy

• Location based routing Protocols


example :Zone Based Routing

12
Chapter 3

Energy Efficient Routing Protocol

3.1 Energy Efficient Routing Protocols in MSN


There are many energy efficient routing protocols are there in MSN , in this thesis
we will discuss only zone based energy efficient routing protocols like ZBR and
ZEEP.

3.1.1 What is energy efficient routing protocol ?


Energy efficient routing protocols are kind of routing techniques where sensor nodes
save their energy level by using different techniques to increase node and network
lifetime.
Energy efficiency is a critical issue in MSN. The existing energy-efficient routing
protocols often use residual energy, transmission power, or link distance as metrics
to select an optimal path.

3.1.2 Why energy efficient routing protocol is required ?


The distributed nature and dynamic topology of Mobile Sensor Networks (MSN)
introduces very special requirements in routing protocols. The most important
feature of a routing protocol, in order to be efficient for MSN, is the energy con-
sumption and the extension of the networks lifetime[9].

• The devices used in MSN are resource constrained, they have a low processing
speed, a low storage capacity and a limited communication bandwidth.

• Moreover, the network has to operate for long periods of time, but the nodes
are battery powered, so the available energy resources limit their overall

13
operation. To minimize energy consumption, most of the device components,
including the radio, should be switched off most of the time.

The main design goal of MSN is not only to transmit data from a source to a des-
tination, but also to increase the lifetime of the network [9]. This can be achieved
by employing energy efficient routing protocols.
Depending on the applications used, different architectures and designs have been
applied in MSN.The performance of a routing protocol depends on the architecture
and design of the network, and this is a very important feature of MSN. However,
the operation of the protocol can affect the energy spent for the transmission of
the data.

Most of the energy consumption, in MSN, is spent on three main activities:


sensing, data processing and communication.

All these factors are important and should be considered when developing
protocols for MSN. The communication of the sensor nodes is the major component
of the energy consumption.

3.1.3 Design goals behind Energy Efficient Protocols :


The on-going research in MSN is mostly concentrated on designing protocols that
use the less possible energy during the communication of the nodes.

I.The potential task of the protocols is not only to find the lowest energy path
from a source to a destination, but also to find the most efficient way to extend
the networks lifetime.

II.Routing algorithms, which are closely associated with dynamic program-


ming, can be based on different network analyses and graph theoretic concepts
in data communication systems including maximal flow, shortest-route, and min-
imum span problems.

III.The Shortest Path routing schemes figure out the shortest path from any
given node to the destination node. If the cost, instead of the link length, is asso-
ciated with each link, these algorithms can also compute the minimum cost routes.

IV.These algorithms can be centralized or decentralized. The usual way of


routing in MSN is to route packets on the minimum-cost path from the source to
the destination (sink or base station).
In case that the nodes generate data constantly and the bandwidth is constrained,

14
then routing data on the minimum-cost paths can overload wireless links close to
the base station. Therefore, a routing protocol must take into consideration the
wireless channel bandwidth limitation,otherwise,it might route the packets over
highly congested links and paths.

V.The efficient Dijkstra algorithm, which has polynomial complexity, and the
Bellman-Ford algorithm, which finds the path with the least number of hops are
the two very well known and well-defined algorithms for shortest path routing.

3.1.4 Classifications of Energy efficient routing protocols

Figure 3.1: Different Energy Efficient Routing Protocols

15
3.2 Types of Zone Based Energy Efficient Rout-
ing Protocols
3.2.1 Zone Routing Protocol (ZBR)
Zone Based Routing (ZBR) : The zone based routing scheme that is modified from
Adhoc Ondemand Distance Vector Routing protocol [11].The goal of this protocol
is to develop a routing protocol that offer reliability, improved error control mech-
anism, better link repair with low overhead in MSN [5].
PROTOCOL OPERATION:
In ZBR,after observing an event the member nodes transmit data to their respec-
tive zone head, which is always one hop neighbor of all member nodes. Zone head
performs the aggregation depending on the type of application and transmit the
aggregated or individual data to the base station. Route discovery, maintenance
and consistent availability of route for reliable data delivery are the core responsi-
bility of the zone head.
The protocol is divided into three phases which are individually addressed in the
following sections.
Mobility Factor and Zone Head Selection: Depending on the remaining
energy and the ratio of number of timesa node change it’s zone with respect to
total number of moves it perform during t seconds is used to calculate the Mobil-
ity factor for ZBR protocol.Each node keeps track of its mobility and records the
number of movements it has made and the energy spent in these movements.
Here, a move is considered as the change in location of node without a pause,
irrespective of the distance, destination and direction.A node may change its zone
as a result of a movement and joins a new zone as a member.
The zone head selection procedure starts with each node broadcasting its Mobility
factor( M.F). This broadcast is intended for the members of the same zone and is
discarded by others. Initially each node keeps its own M.F as the zone head M.F.
Once a broadcast is received, the node compares the zone head M.F with the one
received. If the received value is lower than the value already kept, the zone head
M.F and zone head identifier are appropriately updated.
At the end of the broadcast phase, each node has the knowledge of the node with
least mobility factor and hence the node is considered as a zone head.
The lowest values of M.F ensures that the node will serve as zone head for longer
duration and if participating in the route towards the base station the route will
be stable for maximum period of time[5].
Route Maintenance: This section describes the format of enhanced route re-
quest, route reply and the process of route creation and preservation for ZBR
protocol.

16
1) Route Request:
A zone head broadcast a Route request (RREQ) packet when it determines that
it needs a route to the base station and does not have any route.The broadcast
continues in the network until the request reaches the base station.The entire
network is devided into number of zones , each zone have a Zone ID and each
node have Node ID,these are unique.Each zone have a zone head which also have
a Node ID.
2)Route Reply:
When a node in the neighborhood receives a RREQ, it discards the RREQ if it is
not the zone head.Only the zone head of the respective zone upon receiving the
RREQ verifies that it has not received the same RREQ before.Thus reducing the
number of route requests in the network.
It then creates a reverse route to the sender of RREQ and rebroadcast the RREQ
or otherwise unicast a route for the destination back to the originator if it has a
route to the destination that is not expired.
The base station creates a reverse route with the sender and then generates a
Route reply(RREP) and unicast it toward the originator zone.
3) Route Creation:
When a zone head gets a request it then broadcast that request to it’s neighbour
zone heads by setting the hop count to zero. Neighboring zone heads receives
the RREQ, establish the reverse route with sending zone head, increment the hop
count and rebroadcast the RREQ as they have no route to the base station. The
RREQ is broadcasted in the entire network. Contrary to the normal operation of
AODV[11], this RREQ is of no concern to the member nodes. Only zone head are
the one responsible for receiving and replaying the RREQ making sure that same
RREQ is not accepted more than once. This reduces the amount of route requests
produced in the entire network.
The RREQ reaches the base station through the closest zone head to the base
station. The reverse route for The base station in turn caches nearest zone head
as the next hop in reverse route for sending zone head and generate the RREP
message.
In case the zone head from any zone had moved out to a different zone, it had
immediately been replaced by another node which had the least mobility factor at
that time. So as long as there is only one node in the zone, it is the zone head and
it is responsible for responding to the control packet. This fact concludes that the
movement in zone has no effect on the underlying routing information.
This scheme also helps in efficient topology maintenance.Since the zone head is
responsible for routing and route management as few zone members can be in
sleep state to conserve energy[5].

17
3.2.2 Zone Based Energy Efficient Routing Protocol (ZEEP)
In case of ZEEP also Mobility Factor is calculated to select the zone head.The
goal of this protocol is to reduce the number of control packets than ZBR.It has
two phases.

Figure 3.2: Working principle of ZEEP protocol

Phase 1. Zone Head Selection based on Mobility Factor– As introduced


in ZBR,ZEEP also, as it is based on, accounts for keeping track of a node’s mobility
factor.The mobility factor is the node’s remaining energy and the number of zone
changes it makes at a particular instant.A smaller value indicates less mobility and
therefore a good contestant for the zone head selection.

18
If a node with more remaining energy and lesser mobility factor is seen in
comparison to the current zone head, then this node becomes the new zone head.
The process of zone head selection is repeated periodically.
Phase 2. Packet Forwarding– Each node in the network,including zone
head and base station possesses a unique identifier and is named as Node ID. Each
node will keep track of its mobility factor; number of zone changes it made, the
zone size, and a zone table[10]. This table maps the zone ids and the corresponding
locations to which they are attached and a zone head. A maximum of 10 entries
is present in a zone table.
When a source node is ready to send the data it initially checks whether it is a
zone head or not.If it is not a zone head it sends a control packet to corresponding
zone head.That zone head send control packet to it’s nearest zone head towards
destination.
Once this control packet is received by the base station it sends acknowledge-
ment back to the source by considering the distance factor. Once the acknowl-
edgement is received by the source, the source starts sending the data. The base
station acknowledges for each and every packet.If the source node does not receive
any acknowledgement for the data packet it stops sending the data and sends
the control packet periodically until the control packet is delivered. This helps in
maintaining consistent path towards the base station[10].

19
Chapter 4

Security Issues in Wireless


Network

4.1 Attack Types


Wireless Sensor networks are vulnerable to security attacks due to the broadcast
nature of the transmission medium. Furthermore, wireless sensor networks have
an additional vulnerability because nodes are often placed in a hostile or danger-
ous environment where they are not physically protected. Basically attacks are
classified as active attacks and passive attacks.

Figure 4.1 shows the classification of attacks under general categories.

Due to their own nature a variety of attacks are possible in Wireless Networks.
These security attacks can be classified according to different criteria, such as
the domain of the attackers, or the techniques used in attacks[12].These security
attacks can be roughly classified by the following criteria:

• passive or active

• internal or external

• different protocol layer

• stealthy or non-stealthy

• cryptography or non cryptography related

20
Figure 4.1: Security attacks in WSN [16]

4.1.1 Active Attacks and Passive Attacks


Passive Attacks:In passive attacks the attacker does not send any message, but
just listens to the channel. Passive attacks are non disruptive but are information
seeking, which may be critical in the operation of a protocol[13]. Adversaries need
not be physically present to maintain surveillance; they can gather information at
low-risk in anonymous manner.
A passive attacker listens to the channel and packets containing secret information
(e.g., IP addresses, location of nodes, etc.) may be stolen, which violates confi-

21
dentiality paradigm. In a wireless environment it is normally impossible to detect
this kind of attack, as it does not produce any new traffic in the network.
Active Attacks:Active attacks may either be directed to disrupt the normal op-
eration of a specific node or target the operation of the whole network.
The action of an active attacker includes injecting packets to invalid destinations
into the network, deleting packets, modifying the contents of packets, and im-
personating other nodes which violates availability, integrity, authentication, and
non-repudiation paradigm.
Contrary to the passive attacks, active attacks can be detected and eventually
avoided by the legal nodes that participate in an ad-hoc network.

4.1.2 Passive Eavesdropping


Eavesdropping:An attacker can listen to any wireless network to know what is
going on in the network.It first listens to control messages to infer the network
topology to understand how nodes are located or are communicating with another.
Therefore, it can gather intelligent information about the network before attacking.
It may also listen to the information that is transmitted using encryption although
it should be confidential belonging to upper layer applications.
Eavesdropping is also a threat to location privacy[14]. An unauthorized node can
notice a wireless network that exists within a geographical area, just by detecting
radio signals. To combat this, traffic engineering techniques have been developed.

4.1.3 Gray Hole Attack (Routing Misbehavior)


Gray hole attacks is an active attack type, which lead to dropping of messages.
Attacking node first agrees to forward packets and then fails to do so. Initially
the node behaves correctly and replays true RREP messages to nodes that initiate
RREQ message. This way, it takes over the sending packets.
Afterwards, the node just drops the packets to launch a (DoS) denial of service
attack. If neighboring nodes that try to send packets over attacking nodes lose the
connection to destination then they may want to discover a route again, broad-
casting RREQ messages.
Attacking node establishes a route, sending RREP messages. This process goes on
until malicious node succeeds its aim (e.g. network resource consumption, battery
consumption). This attack is known as routing misbehavior[14].
Dropping packets is also one of the behaviors of failed or overloading nodes[15].
One should not evaluate every dropping packet action as a selective existence, gray
or black hole attack. Actually most routing protocols have no mechanism to detect
whether data packets have been forwarded, DSR being the only exception[20].

22
4.1.4 Impersonation Attack
Due to lack of authentication in ad-hoc networks, only MAC or IP addresses
uniquely identify hosts[16]. These addresses are not adequate to authenticate the
sender node. Therefore non repudiation is not provided for ad-hoc network proto-
cols. MAC and IP spoofing are the simplest methods to pretend as another node
or hide in the network. Malicious nodes achieve impersonation only by changing
the source IP address in the control message. Another reason for impersonation is
to persuade nodes to change their routing tables pretending to be a friendly node,
such as attacks against routing table.
One of the interesting impersonations is Man-in-the-middle attack[16]. Malicious
node performs this attack by combining spoofing and dropping attacks. Physi-
cally, it must be placed as the only node within the range for destination, in the
middle of the route or victim node must be prevented from receiving any other
route information to the destination.
Malicious node may also change the routing tables of the victim node to redirect
its packets, using attacks against the routing table. At this point, malicious node
waits for an RREQ message to the destination node from source node[18]. When
source node sends an RREQ message, malicious node drops the RREQ and replays
a spoofed RREP message to source node as if it is coming from the destination
node.
At the same time, malicious node sends a RREQ message to the destination node
and drops the RREP message from the destination node. By doing this; malicious
node manages to establish a route both to the source and the destination node and
attacker controls the communication between the source and destination. If the
communication is encrypted or entails an authentication as to MAC or IP address,
malicious node can easily get the up layer communication.

4.1.5 Sink Hole Attack


Attracting traffic to a specific node in called sinkhole attack. In this attack, the
adversarys goal is to attract nearly all the traffic from a particular area through
a compromised node. Sinkhole attacks typically work by making a compromised
node look especially attractive to surrounding nodes with respect to the routing
algorithm [16].

4.1.6 Worm Hole Attack


An adversary tunnels messages received in one part of the network over a low
latency link and replays them in a different part. The simplest instance of this
attack is a single node situated between two other nodes forwarding messages

23
between the two of them[17].

4.1.7 Sybil Attack


In a Sybil attack, a single node presents multiple identities to other nodes in
the network.The Sybil attack can significantly reduce the effectiveness of fault-
tolerant schemes and routes believed to be using disjoint nodes could in actuality
be using a single adversary presenting multiple identities[16].Sybil attacks also
pose a significant threat to geographic routing protocols.

4.1.8 Selective Forwarding Attack


Multi hop networks are based on the idea that participating nodes will faithfully
forward receive messages.In a selective forwarding attack, malicious nodes may
refuse to forward certain messages and simply drop them, ensuring that they
are not propagated any further in the network.Selective forwarding attacks are
typically most effective when the attacker is explicitly included on the path of a
data flow[16].

4.2 Motivation and Challenges behind security


As sensor networks can operate in an ad-hoc manner the security goals cover both
those of the traditional networks and goals suited to the unique constraints of ad-
hoc sensor networks.The security goals are classified as primary and secondary.The
primary goals are known as standard security goals such as Confidentiality, In-
tegrity, Authentication and Availability (CIAA)[19].The secondary goals
are Data Freshness, Self- Organization, Time Synchronization and Se-
cure Localization.
Challenges: The nature of large, wireless sensor networks presents significant
challenges in designing security schemes[18].A wireless sensor network is a spe-
cial network which has many constraint compared to a traditional computer net-
work.It’s main challenges are:
• Wireless Medium
• Ad-Hoc Deployment
• Hostile environment
• Resource scarcity
• Unreliable communication and limitation of power

24
Chapter 5

Black Hole Attack

5.1 What is Black Hole Attack


Black hole is one kind of security attack where a malicious node sends fake routing
information, claiming that it has an optimum route towards destination and causes
other good nodes to route data packets through the malicious one.This is a famous
ad-hoc routing attack where nodes are dropped.

5.1.1 How it Works for Ad hoc network ?


In this attack a malicious node uses the ad-hoc routing protocol (here we use
AODV) to advertise itself as having the shortest path to the node whose packets
it wants to intercept.As AODV is a broadcast based protocol,here if the malicious
reply reaches the requesting node before the reply from the actual node, a forged
route has been created. This malicious node then can choose whether to drop the
packets to perform a denial-of-service attack or to use its place on the route as the
first step in a man-in-the-middle attack[21].
For example,in AODV, the attacker can send a fake RREP(including a fake desti-
nation sequence number that is fabricated to be equal or higher than the one con-
tained in the RREQ) and decreasing hop-count value to the source node, claiming
that it has a sufficiently fresh route to the destination node.This causes the source
node to select the route that passes through the attacker. Therefore, all traffic will
be routed through the attacker and the attacker can drop the traffic[22].

25
Figure 5.1: Black hole Attack in AODV protocol

Figure 5.1 shows an example of a black-hole attack, here node1,which is a


source node wants to send data packets to destination node 4,and initiates the
route discovery process by broadcasting RREQ packets.We assume node 3 to be
a malicious node with no fresh enough route to destination node4.However,node3
claims that it has the route to node 4 whenever it receives RREQ packets from
1,by increasing its Destination sequence number and decreasing number of hop
counts towards 4 and sends the response to source node1.
The destination node and any other normal intermediate nodes that have the fresh
route to the destination may also give a reply.If the route reply from a normal node
reaches the source node of the RREQ first, there is no problem.But the reply from
malicious node3 could reach the source node first,as node3 is nearer to the source
node1.Moreover,node3 does not need to check its routing table when sending a
false message[21].
This makes node1 to think that route discovery process is complete, ignore all
other reply messages and begin to send data packets to node3.As a result of that
all packets through node3 are consumed or lost.Node3 forms a black-hole in the

26
network. And we call this problem is a Black-hole problem[23].In this way the
malicious node3 can easily misroute a lot of network traffic to itself, and could
cause an attack to the network with very little efforts on its part.

5.2 Mitigation Approaches of Black Hole Attack


In [24], the authors introduce the route confirmation request (CREQ) and route
confirmation reply (CREP) to avoid the black-hole attack. In this approach, the
intermediate node not only sends RREPs to the source node but also sends CREQs
to its next-hop node toward the destination node.
After receiving a CREQ, the next-hop node looks up its cache for a route to the
destination. If it has the route, it sends the CREP to the source. Upon receiving
the CREP, the source node can confirm the validity of the path by comparing the
path in RREP and the one in CREP. If both are matched, the source node judges
that the route is correct. One drawback of this approach is that it cannot avoid
the black-hole attack in which two consecutive nodes work in collusion, that is,
when the next-hop node is a colluding attacker sending CREPs that support the
incorrect path.
In [25], the authors proposed two solutions; the first one requires a source node
to wait until a RREP packet arrives from more than two nodes. Upon receiving
multiple RREPs, the source node checks whether there is a shared hop or not. If
there is, the source node judges that the route is safe. The main draw-back of
this solution is that it introduces time delay, because it must wait until multiple
RREPs arrive.
The second proposed solution exploits the packet sequence number included in any
packet header. The node in this situation needs to have two extra tables; the first
table consists of the sequence numbers of the last packet sent to the every node
in the network, and the second table for the sequence number received from every
sender.
During the RREP phase, the intermediate or the destination node must include
the sequence number of last packet received from the source that initiates RREQ.
Once the source receives this RREP, it will extract the last sequence number and
then compare it with the value saved in its table. If it matches the transmission
will take place. If not, this replied node is a malicious node, so an alarm message
will be broadcast to warn the network about this node.
Solution 1 has a longer delay and lower number of verified routes than Solution
2, but Solution 1 appears to be more secure than Solution 2 in the sense that, in
Solution 2, the attacker node can listen to the channel and update the tables for
the last packet sequence number.
In [26], the authors analyzed the black-hole attack and showed that a malicious

27
node must increase the destination sequence number sufficiently to convince the
source node that the route provided is sufficiently enough. Based on this analysis,
the authors propose a statistical based anomaly detection approach to detect the
black-hole attack, based on differences between the destination sequence numbers
of the received RREPs. The key advantage of this approach is that it can detect
the attack at low cost without introducing extra routing traffic, and it does not
require modification of the existing protocol. However, false positives are the main
drawback of this approach due to the nature of anomaly detection.
In [26], authors proposed two solutions to Black-hole attack .The first solution
to the black hole problem is to disable the ability to reply in a message of an
intermediate node, so all reply messages should be sent out only by the destination
node. This method can avoid the black hole problem and implement a secured
AODV protocol.
But there are two associated disadvantages. First, the routing delay is greatly
increased, especially for a large network. Second, a malicious node can take further
action such as fabricate a reply message on behalf of the destination node. The
source node cannot identify if the reply message is really from the destination
node or fabricated by the malicious node. In this case, the method may not be
adequate.
The second solution use one more route to the intermediate node that replays
the RREQ message to check whether the route from the intermediate node to the
destination node exists or not. If it exists, we can trust the intermediate node
and send out the data packets. If not, we just discard the reply message from
the intermediate node and send out alarm message to the network and isolate the
node from the network.

5.3 How Black Hole attack effect on Zone based


energy efficient routing protocol or ZEEP ?
To describe that first we have to describe how normal ZEEP works and then how
black hole attack effect on it’s operation.In ZEEP protocol first we have to calculate
the Mobility Factor (MF) for each node to select the zone head or ZH.Then only
corresonding zone head or ZH transfer the data towards the base station by first
sending the control packet to it’s nearest ZH then sending the data packet after
creating the route.
For that we first calculate the mobility factor from remaining energy and observing
the total number of moves and from those moves number of move causes zone
changes.

28
Figure 5.2: Calculation of Mobility Factor (M.F) for ZEEP to select Zone Head

Figure 5.2 gives you an idea about how to calculate the MF.For each node we
need to calculate the MF then for each zone compare the MF of each node with
other ones.The node which have Less MF will be the zone head (ZH).After selecting
ZH we can send the packet to base station by first create the route through control
packet then sending data packet along the path.
Now in case of Black-Hole Attack in ZEEP protocolthe malicious node show
it’s remaining energy high above than other nodes in it’s zone.For that it’s MF is
low than compared to remaining nodes in the zone.When a malicious node enter
the zone it enter as a normal node then show it’s MF and compare with ZH.
it’s obvious that this node have less MF than current ZH.This makes malicious

29
node current ZH.After becoimg the ZH it can able to communicate with source
node. Now if this malicious ZH is in the route of data packets send by source node
towards base station. It capture those packets and drop them.

Figure 5.3: Black hole affected path Vs Normal path in case of ZEEP protocol

Figure 5.3 shows you the black-hole affected path and normal route to send

30
the data packets.That blackhole affected path does not exist in reality.Malicious
ZH show this path to source zone head so that it can send it’s data packets along
this malicious node.

Figure 5.4: Drop of packets due to black hole attack on ZEEP protocol

Now in figure 5.4 you can see how the packets are dropping when packets
are passing through malicious ZH.This phenomenon affect the effectiveness of the
whole network.

31
Due to this attack the data packets can not reach the destination and packet de-
livery ratio along with throughput affected very much.Mobility cause path breaks
but black hole attck grasp all packets in the network causes energy waste and
dying of whole network.

Though ZEEP provide better packet overhead and causes longer route maintenance
due to dynamic forwarding ,it can affect badly due to black-hole attack.Harm the
throughput of whole network and eventually result in delay in delvery or packet
loss or dying of network.

32
Chapter 6

Network Simulator

6.1 NS Network Simulator


NS characteristics The network simulator NS is an discrete event driven network
simulator program, developed at the University of California Berkley, which in-
cludes many network objects such as protocols, applications and traffic source
behavior. The NS is a part of software of the VINT project[27] that is supported
by DARPA since 1995.
The network simulator covers a very large number of application of different
kind of protocols of different network types consisting of different network elements
and traffic models.Network simulator is a package of tools that simulates behavior
of networks such as creating network topologies, log events that happen under any
load,analyze the events and understand the network. Well the main aim of our
first experiment is to learn how to use network simulator and to get acquainted
with the simulated objects and understand the operations of network simulation
and we also need to analyze the behavior of the simulation object using network
simulation. Platform required to run network simulator Unix and Unix like sys-
tems Linux (Use Fedora or Ubuntu versions) Free BSD SunOS/Solaris Windows
95/98/NT/2000/XP Backend Environment .
In this work, i have tried to evaluate the effects of the Black Hole attacks in the
energy efficient routing protocol . And compare the performance of ZEEP with
AODV . To achieve this i have simulated the wireless scenarios which includes
Black Hole node using NS Network Simulator[28] program. In this chapter we
present NS and its characteristics .

33
Figure 6.1: Network Animator or NAM to show output for NS 2.35

At the simulation layer NS uses OTcl (Object oriented Tool Command Lan-
guage) programming language to interpret user simulation scripts. OTcl language
is in fact an object oriented extension of the Tcl Language. The Tcl language is
fully compatible with the C++ programming language. At the top layer, NS is an
interpreter of Tcl scripts of the users, they work together with C++ codes.

6.2 Tcl Language in NS


Tool Command Language is used by millions of users in world . It is a language
with very simple syntax and allows a very easy integration with other languages .
An OTcl script written by a user is interpreted by NS. While OTcl script is

34
being interpreted, NS creates two main analysis reports simultaneously. One of
them is NAM (Network Animator) object that shows the visual animation of the
simulation. The other is the trace object that consists of the behavior of all objects
in the simulation. Both of them are created as a file by NS. Former is .nam file
used by NAM software that comes along with NS. Latter is a .tr file that includes
all simulation traces in the text format[29].
NS project is normally distributed along with various packages (ns, nam, tcl,
otcl etc.) named as all-in-one package, but they can also be found and downloaded
separately. In this study we have used version 2.29 of ns all-in-one package and
installed the package in the Windows environment using Cygwin. After version 2,
NS is commonly using a NS-2 and in our thesis we shell refer to it as NS-2. We
have written the .tcl files in text editor and analyzed the results of the .tr file using
cat, awk, wc and grep commands of Unix Operating System. The implementation
phase of the Black hole behavior to the AODV protocol is written using C++.

6.3 Trace File Analysis

Figure 6.2: Trace file analysis [29]

The first field in figure 6.2 is an event.It gives you four possible symbols ’+’ ’-’ ’r’
’d’.These four symbols correspond respectively to enqueued, dequeued, received
and dropped.
The second field gives the time at which the event occurs.
The third field gives you the input node of the link at which the event occurs .
The fourth field gives you the the output node at which the event occurs.
The fifth field shows the information about the packet type.i.e whether the packet
is UDP or TCP.
The sixth field gives the packet size.
The seventh field give information about some flags.
The eight field is the flow id(fid) for IPv6 that a user can set for each flow in a tcl
script.It is also used for specifying the color of flow in NAM display .
The ninth field is the source address.

35
The tenth field is the destination address.
The eleventh field is the network layer protocol’s packet sequence number.
The last field shows the unique id of packet.

Following are trace of two events:


r 1.84471 2 1 cbr 210 ——- 1 3.0 1.0 195 600
r 1.84566 2 0 ack 40 ——- 2 3.2 0.1 82 602
The trace file can be viewed with the cat command: cat out.tr .

36
Chapter 7

Simulation of Black hole attack


and effects

7.1 Implementing AODV and ZEEP Protocol in


NS2.35 To Simulate Black Hole Behavior
First, we show how to test the Black Hole implementation and will present the
simulations of Black Hole Attack to demonstrate its effects. Then we will evaluate
the effects of Black Hole Attack in an Wireless Networks.
We have tested our implementation of the Black Hole[21]to see whether it is cor-
rectly working or not. To be ensure the implementation is correctly working, we
used the NAM (Network Animator) application of NS[29]. To test the implemen-
tation we used two simulations. In the first scenario we did not use any Black
Hole AODV Node 5 (the malicious node that exhibits the Black Hole Attack will
be called Black Hole Node). This AODV is named as NAODV or Normal AODV
.
In the second scenario we added a Black Hole AODV Node to the simulation. This
AODV is known as BAODV as Blackhole affected AODV. Then we compared the
results of the simulations using NAM. After that we do the same with ZEEP pro-
tocol like BZEEP and NZEEP. At the end we generate graphs by getting the data
from awk scripts and put them in the tables. From that table we generate graphs
using gnuplot tool .

37
7.2 Simulation Parameters and Measured Met-
rics
To take accurate results from the simulations, we used UDP protocol. The source
node keeps on sending out UDP packets, even if the malicious node drops them,
while the node finishes the connection if it uses TCP protocol. Therefore, we could
observe the connection flow between sending node and receiving node during the
simulation. Furthermore we were able to count separately the sent and received
packets since the UDP connection is not lost during the simulation[29]. If we had
used TCP protocol in our scenarios we could not count the sent or received packets
since the node that starts the TCP connection will finish the connection after a
while if it has not received the TCP ACK packet.
We generate a small size network that has 10 nodes and create a UDP connection
between Node 1 and Node 2, and attach CBR (Constant Bit Rate) application
that generates constant packets through the UDP connection. CBR packet size is
chosen to be 512 bytes long, data rate is set to 1 Mbyte. Duration of the scenarios
is 20 seconds and the CBR connections started at time equals to 1.0 seconds and
continue until the end of the simulation, in a 79 x 659 meter flat space. We
manually defined appropriate positions of the nodes to show the data flow and
also introduce a movement to Node 8 and Node 4 to show the changes of the data
flow in the network.

7.3 Evaluation of The Simulation


Simulation of Normal AODV protocol[11] : In this scenario where there is not
a Black Hole AODV Node, connection between Node 5 and Node 3 is correctly
flawed when we look at the animation of the simulation, using NAM. Figure 7.1
shows the data flow from Node 0 to Node 3.Here Node 5 is attacker node which is
disabled .Source node 0 and destination node 3.

38
Figure 7.1: NAODV

Simulation of Black-hole affected AODV protocol (BAODV) Here node 0 is the


source and node 3 is the destination node . Node 5 is attacker node which deop
all packets in the network .

39
Figure 7.2: BAODV

Simulation of Normal ZEEP protocol Here node 0 is the source node and node
2 is destination node , packets are passing through node 1 which is intermediate
one.

40
Figure 7.3: NZEEP

Simulation of Black-hole affected ZEEP In this simulation scenario Node 0 is


source node ,node 2 is destination one , node 1 is intermediate and attacker node
.

41
Figure 7.4: BZEEP

7.4 Examining The Trace File and Getting The


Results
We get the simulation results from output trace file of the Tcl scripts, which has
.tr extension. Trace files include all events in the simulation such as when the
packets are sent, which node generated them, which node has received, which type
of packet is sent, if it is dropped why it is dropped etc. In my simulation we
use new-trace file format that is especially used in wireless networks and includes
detailed event information. To get the results from the trace files i need only the
event type in Field 0, node id (-Ni) and trace level (-Nl) in Field 4, source address,
destination address and packet type in Field 5. To identify the above information
from the trace file i use cat command of UNIX and wrote its outputs to a file for
all trace files of the simulations.
Of all the outputs, we only need; s value of the event information in the Field
0, to count how many CBR packets are sent by the sending node
r value of the event information in the Field 0, to count how many CBR packets
are received by the receiving node
node id value of the node id information in the Field 4, for the sending nodes or

42
receiving nodes
MAC value of the trace level information in the Field 4, to filter MAC level.
source address and destination address values of the source and destination address
information in Field 5, to count the packets that goes from the sending node to
the receiving node .
cbr value of the packet type information in the Field 5, to filter CBR packets. To
filter this information we used grep command of UNIX reading the file generated
by cat command and gave its output to wc (word count) command of UNIX as an
input to count how much information is filtered and wrote the result to a new file.
For example; to count CBR packets sent by Node 0 (sending node) the command
grep s 0 MAC — 0.0 1.0 cbr is used.
On the other hand, to count CBR packets received by Node 1 (receiving node),
grep r 1 MAC — 0.0 1.0 cbr is used. These commands are applied for all nodes in
the all simulations and are written as a batch file.

7.5 Performance Metrics


We used Packet Delivery ratio (PDR), throughput (Thr) and energy conservation
as a performance metrics . Which we will describe in chapter 8.

43
Chapter 8

Results and Discussions

8.1 Evaluation of Results


The traffic sources are CBR (continuous bit rate). The source-destination pairs
are spread randomly over the network. The mobility model uses random waypoint
model in a rectangular filed of 900m x 900m with 50 nodes. During the simulation,
each node starts its journey from a random spot to a random chosen destination.
Once the destination is reached, the node takes a rest period of time in second
and another random destination is chosen after that pause time. This process
repeats throughout the simulation, causingcontinuous changes in the topology of
the underlying network. Different network scenario for different number of nodes
and pause times are generated.

8.1.1 Packet Delivery Fraction


Packet Delivery Ratio is the measured end-to-end successful transmission proba-
bility. This ratio is calculated by the number of data packets received by the sink
divided by number of data packets produced by the source.

8.1.2 Throughput
It is defined as total number of packets received by the destination. It is a measure
of effectiveness of a routing protocol. There is two representations of throughput
one is the amount of data transferred over the period of time expressed in kilobits
per second (Kbps). The other is the packet delivery percentage obtained from a
ratio of the number of data packets sent and the number of data packets received.

44
8.2 Analysis of result
First Graph :
From the first graph in figure 8.1 it is clear that black hole affected ZEEP
provide better packet delivery ratio than Black hole affected AODV .

Figure 8.1: BAODV Vs BZEEP wrt packet delivery ratio

Second Graph: From the second graph in figure 8.2 it is clear that black hole
affected ZEEP provide better throughput than Black hole affected AODV .Red
lines indicate BAODV where green line indicate BZEEP.

45
Figure 8.2: BAODV Vs BZEEP wrt throughput

Third Graph:

46
Figure 8.3: BZEEP Vs NZEEP wrt throughput

From the third graph in figure 8.3 it is clear that Normal ZEEP provide better
throughput than Black hole affected ZEEP.

Fourth Graph:

Figure 8.4: BAODV Vs NAODV wrt throughput

From the fourth graph in figure 8.4 it is clear that NAODV provide better

47
throughput than Black hole affected AODV .

Fifth Graph:

Figure 8.5: NAODV Vs BAODV wrt pdr

From the fifth graph in figure 8.5 we get the idea that Normal AODV provide
better packet delivery ratio than Black hole affected AODV.

Sixth Graph:

Figure 8.6: BZEEP Vs NZEEP wrt pdr

48
From the sixth graph in figure 8.6 we conclude that black Normal ZEEP provide
better packet delivery ratio than Black hole affected ZEEP.
Energy Conservation:
Total energy consumption of the network is evaluated on the basis of total amount
of control packets and data packets generated and successfully delivered. Energy
consumed also depends on the amount of energy spent during zone creation,
clustering, and leader selection in the algorithm.The Constant Bit Rate or
CBR flow is not continuous and varies with respect to time.The results are con-
sidered for both the protocols in the same scenario. As observed from the seventh
graphs, it is clearly seen that the total energy consumption of the network, whether
the nodes are stationary or mobile in ZEEP, is considerably less when compared
to AODV.
Seventh Graph:

Figure 8.7: NAODV Vs NZEEP wrt energy consumption

From the seventh graph in figure 8.7 based on energy conservation parameter,
it is clear that Normal AODV consume more energy than Normal ZEEP .

49
Chapter 9

Conclusion and Future Work

9.1 Conclusion
From the above graphs for simulation results has shown that ZEEP has a better
performance compared to AODV protocol in terms of energy consumption of the
network. Black hole affected ZEEP(BZEEP) provide better packet delivery ratio
and throughput than black hole affected AODV(BAODV).That means the effect
of black hole attack is more severe in case of AODV protocol than energy efficient
routing protocols.

9.2 Future Work


For future consideration the security of the system can be an important domain of
research.In this thesis we have not consider solution to Black hole affected ZEEP
protocol.In future we should come with some ideas about how to solve this kind
of attack in case of energy efficient routing protocols .

50
Bibliography

[1] C. S. Raghavendra, K. M. Sivalingam, T. Znati Eds., Wireless Sensor Net-


works, Kluwer Academic, New York, 2004.

[2] K Sohraby,D Minoli,T Znati, Wireless Sensor Networks , Technology, Pro-


tocols, and Applications.

[3] B. Krishnamachari, ”A Wireless Sensor Networks Bibliography,” Au-


tonomous Networks Research Group, University of Southern CaliforniaLos
Angeles, http://ceng.usc.edu/ anrg/SensorNetBib.html 0103.

[4] Getsy S Sara and D. Sridharan, Routing in mobile wireless sensor network:
a survey, Springer, Aug. 2013.

[5] Faisal Bashir Hussain, Usama Ahmed, ”Energy Efficient Routing Protocol
for Zone Based Mobile Sensor Networks ”, IEEE 2011, pp.1081-1086.

[6] Q. Cao, T. Abdelzaher, T. He, and R. Kravets, ”Cluster-Based Forward-


ing for Reliable End-to-End Delivery in Wireless Sensor Networks”, IEEE
Infocom07, May 2007.

[7] Younis, O , Fahmy, S, ”HEED: A hybrid, energy-efficient, distributed clus-


tering approach for ad hoc sensor networks”. IEEE Trans. Mob. Comput.
2004, 3, 366379.

[8] A. K. Sadek, W. Su, and K. J. R. Liu, Multinode cooperative communica-


tions in wireless networks, IEEE Trans. Signal Processing, vol. 55, no. 1,
pp. 341-355, 2007 .

[9] Nikolaos A. Pantazis, Stefanos A. Nikolidakis and Dimitrios D. Vergados ,


”Energy-Efficient Routing Protocols in Wireless Sensor Networks: A Sur-
vey” , IEEE Communications Surveys and Tutorials, VOL.15, NO. 2,Second
Quarter 2013.

51
[10] J R Srivastava, TSB Sudarshan ,ZEEP: Zone based Energy Efficient Rout-
ing Protocol for Mobile Sensor Networks , IEEE International Conference
on Advances in Computing, Communications and Informatics (ICACCl) ,
2013 .

[11] C. Perkins, E. Belding-Royer, S. R. Das,: ”Ad hoc On-Demand Distance


Vector (AODV) routing ”. rfc356J.txt (2003).

[12] Ray Hunt, Network Security: The Principles of Threats, Attacks and In-
trusions, part1 and part 2 ,” APRICOT, 2004.

[13] Undercoffer, J., Avancha, S., Joshi, A. and Pinkston, J, Security


for sensor networks. In Proceedings of the CADIP Research Sym-
posium, University of Maryland, Baltimore County, USA, year2002.
http://www.cs.sfu.ca/ angiez/personal/paper/sensor-ids.pdf

[14] P. Yau and C. J. Mitchell, Security Vulnerabilities in Adhoc Network.

[15] S. Marti, T. J. Giuli, K. Lai and M. Baker, Mitigating Routing Misbehavior


in Ad Hoc Networks, Proc. 6th Annual Intl. Conf. Mobile Comp. and Net.,
Boston, MA. pp. 255-265. August 2000.

[16] Chris Karlof, David Wagner, Secure Routing in Wireless Sensor Networks:
Attacks and Countermeasures, AdHoc Networks (elsevier), Page: 299-302,
year 2003.

[17] Zia, T.; Zomaya, A., Security Issues in Wireless SensorNetworks, Systems
and Networks Communications (ICSNC) Page(s):40 40, year 2006.

[18] G. Vigna, S. Gwalani and K. Srinivasan, An Intrusion Detection Tool for


AODV-Based Ad hoc Wireless Networks, Proc. of the 20th Annual Com-
puter Security Applications Conference (ACSAC04).

[19] G. Padmavathi and D. Shanmugapriya A Survey of Attacks, Security Mech-


anisms and Challenges in Wireless Sensor Networks.

[20] D. Johnson, D. Maltz and J. Broch, DSR the Dynamic Source Routing Pro-
tocol for Multihop Wireless Ad Hoc Networks. Ad Hoc networking, Chapter
5, page 139-172. Addison-Wesley, 2001.

[21] Deng, H., Li, W., Agrawal, D., ”Routing Security in Wireless Ad Hoc Net-
works” IEEE Communication Magazine (October 2002) pp. 70-75.

[22] Al-Shurman, M., Yoo, S., Park, S., ”Black hole Attack in Mobile Ad Hoc
Networks”, ACM Southeast Regional Conference (2004) pp. 96-97.

52
[23] Semih Dokurer , Y. M. Erten , Can Erkin Acar., Performance analysis of
ad-hoc networks under black hole attacks IEEE Southeast conference , 2007
.

[24] B Kannhavong, H Nakayama, Y Nemoto, N Kato, A Jamalipour, A Survey


Of Routing Attacks In Mobile Ad hoc Networks , IEEE Wireless Commu-
nications ( October 2007) .

[25] S. Lee, B. Han, and M. Shin, Robust Routing in Wireless Ad Hoc Networks,
2002 Intl. Conf. Parallel Processing Wksps., Vancouver, Canada, Aug. page
18-21, 2002.

[26] S. Kurosawa et al., Detecting Blackhole Attack on AODV-Based Mobile Ad


Hoc Networks by Dynamic Learning Method, Proc. Intl. J. Network Sec.,
2006.

[27] Virtual InterNetwork Testbed, http://www.isi.edu/nsnam/vint, 14 May


2006.

[28] The NS Manual, http://www.isi.edu/nsnam/ns/doc/nsdoc.pdf , 25 July


2005.

[29] http://www.isi.edu/nsnam/ns/.

53

View publication stats

Das könnte Ihnen auch gefallen