0% found this document useful (0 votes)
9 views26 pages

Batch B Group 15

Uploaded by

Ãyûsh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views26 pages

Batch B Group 15

Uploaded by

Ãyûsh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

INTRODUCTION TO COMMUNICATION AND IoT

22AIE211
A THESIS ON

Blackhole Attack Simulation and Analysis


Submitted by
Ayush Kumar Rai
(CB.EN.U4AIE22111)
Kiran Patil GT
(CB.EN.U4AIE22127)
Nandana
(CB.EN.U4AIE22138)
Snegha
(CB.EN.U4AIE22163)

in partial fulfilment for the award of the degree of


BACHELOR OF TECHNOLOGY
IN
CSE(AI)

Centre for Computational Engineering and Networking


AMRITA SCHOOL OF ARTIFICIAL
INTELLIGENCE
AMRITA
VISHWAVIDYAPEETHAM
COIMBATORE - 641112 (INDIA)
JUNE – 2024

1
AMRITA SCHOOL OF ARTIFICIAL INTELLIGENCE
AMRITA VISHWA VIDYAPEETHAM
COIMBATORE - 641112

BONAFIDE CERTIFICATE

This is to certify that the thesis entitled “Analysis and simulation of Black-hole Attack in

6LowPan” submitted by Ayush Kumar Rai(CB.EN.U4AIE22111), Kiran Patil

GT(CB.EN.U4AIE22127), Nandana(CB.EN.U4AIE22138),Snegha(CB.EN.U4AIE22163) for

the award of the Degree of Bachelor of Technology in the “CSE(AI) ” is a Bonafede record of

the work carried out by them under our guidance and supervision at Amrita School of Artificial

Intelligence, Coimbatore.

Mr. Jai Sooraj J


Project Guide

Dr. K.P.Soman
Professor and Head CEN

Submitted for the university examination held on 03-06-2024

2
AMRITA SCHOOL OF ARTIFICIAL INTELLIGENCE
AMRITA VISHWA VIDYAPEETHAM
COIMBATORE - 641112

DECLARATION
We, Ayush Kumar Rai (CB.EN.U4AIE22111), Kiran Patil GT(CB.EN.U4AIE22127),
Nandana(CB.EN.U4AIE22138), Snegha (CB.EN.U4AIE22163), hereby declare that this
thesis entitled “Blackhole Attack Simulation and Analysis”, is the record of the original work
done by us under the guidance of Mr. Jai Sooraj J, Assistant Professor, Centre for
Computational Engineering and Networking, Amrita School of Artificial Intelligence,
Coimbatore. To the best of our knowledge this work has not formed the basis for the award of
any degree/diploma/ associate ship/fellowship/or a similar award to any candidate in any
University.

Group Members Roll Number

Ayush Kumar Rai - CB.EN.U4AIE22108

Kiran Patil GT - CB.EN.U4AIE22109

Nandana - CB.EN.U4AIE22138

Snegha - CB.EN.U4AIE22163

Place: Coimbatore
Date: 3 June 2024

3
Acknowledgement:

We would like to express our special thanks of gratitude to our teacher (Mr. Jai Sooraj J sir),
who gave us the golden opportunity to do this wonderful project and we came to know about
so many new things. We are thankful for the opportunity given.
We would also like to thank our group members, as without their cooperation, we would not
have been able to complete the project within the prescribed time

4
ABSTRACT:

This project sets out to explore the disruptive effects of two common network attacks,
Blackhole and Flood attacks, on 6LoWPAN networks. Blackhole attacks involve malicious
nodes discarding forwarded packets, while Flood attacks flood the network with excessive
packets, overwhelming its capacity. We examine various scenarios for each attack, considering
single and colluding instances, to understand their impact on network performance metrics
such as Packet Delivery Ratio (PDR), delay, power consumption, and the number of control
messages exchanged. By simulating these attacks and analyzing their consequences, we aim to
provide insights into the vulnerabilities of 6LoWPAN networks.

5
TABLE OF CONTENT
1 Introduc on : .................................................................................................................................. 8
2 Modules : ........................................................................................................................................ 9
2.1 DODAG Forma on in RPL ........................................................................................................ 9
2.2 Blackhole A ack ...................................................................................................................... 9
2.3 Project Methodology ............................................................................................................ 10
2.4 Scenario 1.............................................................................................................................. 11
2.5 Scenario 2.............................................................................................................................. 12
2.5.1 Case I: ............................................................................................................................ 12
2.5.2 Case II: ........................................................................................................................... 13
2.6 Scenario 3.............................................................................................................................. 14
2.6.1 Case I: ............................................................................................................................ 14
2.6.2 Case II : .......................................................................................................................... 15
2.6.3 Case III: .......................................................................................................................... 16
2.7 Scenario 4.............................................................................................................................. 16
3 So ware Tool : .............................................................................................................................. 18
3.1 Con ki Cooja Simulator......................................................................................................... 18
4 Results ........................................................................................................................................... 19
4.1 Observa ons : ....................................................................................................................... 19
4.1.1 Power Consump on : .................................................................................................... 19
4.1.2 Packet delivery Ratio(PDR) .......................................................................................... 20
4.1.3 End to End Delay(E2E) ................................................................................................... 20
4.2 Scenario 1.............................................................................................................................. 21
4.3 Scenario 2.............................................................................................................................. 22
4.4 Scenario 3.............................................................................................................................. 23
5 Conclusion : ................................................................................................................................... 25
6 References : ................................................................................................................................... 26

6
LIST OF FIGURES
Figure 1 :BlackHole Diagram ................................................................................................................. 10
Figure 2 :Methodology .......................................................................................................................... 10
Figure 3:Scenario 1................................................................................................................................ 11
Figure 4:Scenario 1 connec on Graph .................................................................................................. 11
Figure 5:Scenario 2................................................................................................................................ 12
Figure 6:Scenario 2 connec on graph .................................................................................................. 12
Figure 7:Scenario 2 Case 2 .................................................................................................................... 13
Figure 8:Scenario 2 case 2 connec on graph........................................................................................ 13
Figure 9:Scenario 3................................................................................................................................ 14
Figure 10:Scenario 3 connec on graph ................................................................................................ 14
Figure 11:Scenario 3 case 2 ................................................................................................................... 15
Figure 12:Scenario 3 case 2 connec on graph...................................................................................... 15
Figure 13:Scenario 3 case 3 ................................................................................................................... 16
Figure 14 :Scenario 3 case 3 connec on graph .................................................................................... 16
Figure 15 :Scenario 4............................................................................................................................. 17
Figure 16 :Scenario 4 connec on graph................................................................................................ 17
Figure 17 So ware Parameters ............................................................................................................. 19
Figure 18 Scenario 1 Results ................................................................................................................. 21
Figure 19:Scenario 2 Results ................................................................................................................. 23
Figure 20:Scenario 3 Results ................................................................................................................ 24

LIST OF EQUATIONS
Equa on 1 Power consump on ............................................................................................................ 19
Equa on 2 PDR...................................................................................................................................... 20
Equa on 3 E2E ...................................................................................................................................... 20

7
1 Introduc on :

The Internet of Things is a network of interconnected devices with limited resources


and can be connected over noisy and lossy links via the Routing Protocol for Low
Power and Lossy Networks (RPL). The RPL can meet low routing requirements while
supporting various communication modes, including multipoint-to-multipoint, point-
to-multipoint, and multipoint-to-point. The RPL has long been known to be vulnerable
to various internal attacks.

Attacks classified into three categories


1. The first category includes attacks aimed at depleting network resources (energy,
memory, and power) which are significantly damaging constrained networks.
2. The second category of attacks includes those targeted at the RPL network topology,
impairing the network's regular operation in two ways: the topology may be sub-
optimized, or a set of RPL nodes may be isolated from the network.
3. The third category includes attacks on network traffic, such as eavesdropping and
data misappropriation.

Blackhole attack is an isolation attack in which a malicious node discards all packets intended
for forwarding. If the attacker is placed strategically in the graph, it can isolate many nodes
from the network. This project investigated the impact of a Blackhole attack on the RPLbased
IPv6 over Low-Power Wireless Personal Area Networks (6LoWPAN) network using four
different scenarios, each with its own set of test cases.

Our Project discusses each scenarios and simulation is performed on Contiki Cooja Software,
Wireshark which helps to simulate different attack and gain insights.

8
2 Modules :

2.1 DODAG Forma on in RPL


RPL creates an efficient network topology for IPconnected IoT devices using the
DODAG composed of single root and several sensor nodes.
DODAG is established and maintained using three primary ICMPv6 control
messages:

1. DODAG Information Object (DIO)


2. DODAG Information Solicitation (DIS)
3. DODAG Advertisement Object (DAO)

2.2 Blackhole A ack


Each node in RPL has a predefined upward path to the BR after forming an optimal
DODAG. The route is made up of nodes and their preferred parents. During
DODAG formation, a malicious node falsely claims to have an efficient route to the
BR node to compose a Blackhole attack; these malicious nodes become part of the
network and the preferred parent over most of the network's active nodes. When
such a malicious node receives packets from other network nodes, it drops them
silently, forming a Blackhole

Figure below shows the Single active Blackhole

9
Figure 1 :BlackHole Diagram

The presence of a single active Blackhole attack is depicted in Figure, with the green
colored node as root and the red coloured with Blackhole. The nodes coloured with
brown are isolated as they drop the packets received from the neighbours. In the
above case there is no alternative paths hence isolated.

2.3 Project Methodology

Figure 2 :Methodology

10
2.4 Scenario 1

In this scenario consisting of single sink node with other nodes. It acts as the
Reference Topology as it resembeles 6LoWPAN network without attacker nodes.

Figure 3:Scenario 1

Figure 4:Scenario 1 connec on Graph

11
2.5 Scenario 2

In this scenario of Two test cases I,II each which contains sink node, nodes and a
malicious node. In the figure 1 the node is placed outside the sink node’s range.
The second case the malicious node is placed within the range of the sink.

2.5.1 Case I:

Figure 5:Scenario 2

Figure 6:Scenario 2 connec on graph

12
2.5.2 Case II:

Figure 7:Scenario 2 Case 2

Figure 8:Scenario 2 case 2 connec on graph

13
2.6 Scenario 3

This scenario consist of three test cases I,II,III. In the first test case two malicious
nodes are placed outside of the range of the sink node as shown. The second case
one of the malicious code is placed within the range of the sink node, the other
outside of the range of sink node. In the third case both the malicious code is placed
within the range of the sink.

2.6.1 Case I:

Figure 9:Scenario 3

Figure 10:Scenario 3 connec on graph

14
2.6.2 Case II :

Figure 11:Scenario 3 case 2

Figure 12:Scenario 3 case 2 connec on graph

15
2.6.3 Case III:

Figure 13:Scenario 3 case 3

Figure 14 :Scenario 3 case 3 connec on graph

2.7 Scenario 4

This scenario is examines more than two malicious node causing Colliding
Blackhole attack. Two malicious code are placed within the range of the Sink and
other malicious node outside of the sink range.

16
Figure 15 :Scenario 4

Figure 16 :Scenario 4 connec on graph

All the above scenario are simulated in the Contiki Cooja Simulator.

17
3 So ware Tool :

3.1 Con ki Cooja Simulator

Features of the Software :


1. Cooja is widely used by the Low-Power and Lossy Networks (LLN) and Internet of
Things (IoT) research community. This widespread adoption provides a strong
foundation and validation for using this simulator in research projects.

2. The UDGM (Unit Disk Graph Medium) environment within Cooja was used to
introduce lossiness into the wireless medium, considering the relative distances
between nodes. This capability is crucial for accurately simulating real-world
conditions in wireless sensor networks.

3. Provides a graphical user interface (GUI) that simplifies the setup and configuration
of simulations.

4. Offers visualization tools for monitoring and analyzing network behavior in real-time.

5. Includes energy consumption models for simulating battery-powered IoT devices,


helps in evaluating the energy efficiency of protocols and applications.

18
Figure 17 So ware Parameters

4 Results

4.1 Observa ons :

4.1.1 Power Consump on :


The term "power consumption" refers to the amount of energy consumed by nodes in a
network throughout the network's existence, and it is the sum of the energy consumed
by each node. Power consumption can be calculated by adding the power consumed by
the LPM (during sleep), the CPU (during processing), the radio listen (power consumed
to receive data), and the radio transmit (power consumed to transmit data).

Equa on 1 Power consump on

19
4.1.2 Packet delivery Ratio(PDR)
The PDR has defined the ratio of successfully delivered data packets to the destination
to the total number of packets transmitted by the source and calculated using equation

Equa on 2 PDR

 pr - is the total number of packets received by the sink node


 pgi- is the total number of packets generated by source nodes
 n - is the total number of sensor nodes

4.1.3 End to End Delay(E2E)


The end-to-end delay metric quantifies the average of the delays associated with each
data packet received by the sink node and each data packet sent by the sensor nodes.
The endto-end delay (E2ED) is calculated using equation

Equa on 3 E2E

Tr - denotes the me at which the sink node receives data packets

Tg - denotes the me at which each source node generates data packets.

20
4.2 Scenario 1

Figure 18 Scenario 1 Results

21
4.3 Scenario 2

22
Figure 19:Scenario 2 Results

4.4 Scenario 3

23
Figure 20:Scenario 3 Results

24
5 Conclusion :

This Project concludes that the RPL-based 6LoWPAN network is vulnerable to Blackhole
colluding Blackhole attacks. A Blackhole attack has a significant detrimental effect on the
performance of a network. The network metrics such as packet delivery ratio, end-to-end
delay, power consumption, and DIO message overhead are significantly affected when the
number of Blackhole attackers is increased and the attacker nodes are deployed in various
locations. This Project examined both single and colluding blackhole attacks.
With a single Blackhole attacker node, the PDR decreases by up to 7.72%, the delay
increases by 372.62%, the average power consumption increases by 122.58%, and the
number of DIO messages increases 19.35% compared to the reference topology.
Compared to the reference topology, the colluding Blackhole attack increases 9.12% in
PDR, a 549.65% increase in delay, a 170.98% increase in average power consumption,
and a 25.6% increase in the number of DIO messages.

25
6 References :
1. https://github.com/crond-jaist/iotrain-
sim/tree/master/database/contiki/examples/ipv6/rpl-collect

2. Detection and Prevention of Black Hole Attack in RPL Protocol Based on the
Threshold Value of Nodes in the Internet of Things Networks: Retrieval Number:
I30600789S319/2019©BEIESP DOI: 10.35940/ijitee.I3060.0789S319

26

You might also like