Batch B Group 15
Batch B Group 15
22AIE211
A THESIS ON
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
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.
Dr. K.P.Soman
Professor and Head CEN
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.
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 :
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 :
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.
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
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
12
2.5.2 Case II:
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
14
2.6.2 Case II :
15
2.6.3 Case III:
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
All the above scenario are simulated in the Contiki Cooja Simulator.
17
3 So ware Tool :
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.
18
Figure 17 So ware Parameters
4 Results
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
Equa on 3 E2E
20
4.2 Scenario 1
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