S-LogixS-Logix
S-Logix
S-Logix – Research Foundation in Chennai
  • Home
  • Projects
    • Final Year Projects
    • JAVA Projects
      • Machine Learning Projects
      • Data Mining Projects
      • Big Data Projects
      • Network Security Projects
      • Mobile Computing Projects
      • IoT Projects
      • Web Technology Projects
      • Semantic Web Projects
      • Social Network Projects
      • Web Services Projects
      • Hadoop Projects
      • Spark Projects
      • Cloud Security Projects
    • NS2 Projects
      • WSN Projects
      • MANET Projects
      • VANET Projects
      • CRN Projects
      • Wired Network Projects
    • Cloud Computing Projects
      • CloudSim Projects
      • Fog computing Projects
      • Edge computing Projects
      • Cloud Security Projects
    • Python Projects
      • Machine learning Projects
      • Data Mining Projects
      • Big Data Projects
    • R Projects
      • Machine learning Projects
      • Data Mining Projects
    • IoT Projects
      • Cooja Projects
      • NS2 Projects
      • Java Projects
    • Mobile Computing Projects
    • Ph.D Projects
    • Training
      • NS2 Training
      • PHP Training
      • Project Internship
      • JAVA J2EE Training
      • Android Training
      • Hadoop Training
      • Inplant Training
      • Workshops
      • Application Projects
    • Research & Development
    • Software Development
  • Research
    • PHD Guidance
    • PHD Consulting
    • PHD Projects
    • PHD Research Proposal
    • PHD Process
    • PHD Support Services
    • PHD Resources
    • PHD Courses in India
    • Top Journals in Computer Science
    • Research Books
  • Source Code
    • JAVA Source Code
      • Hadoop Source Code
      • Spark Source Code
      • HBase Source Code
    • NS2 Simulation Samples
      • NS2 Tutorial for Beginners
      • NS2 sample source code for Mobile Ad hoc Network
      • NS2 sample source code for Wireless Networks
      • NS2 sample source code for Wireless Sensor Networks
      • NS2 sample source code for vehicular ad hoc network
      • NS2 sample source code for Cognitive Radio Networks
      • NS2 sample source code for Wired Networks
    • IoT Contiki Source Code
    • Python Source Code
      • Python Programming Sample Source Code
      • Python Machine Learning Sample Source Code
      • Python Deep Learning Sample Source Code
      • Python Spark Sample Source Code
      • Python Natural Language Processing Source Code
      • Python Data science & Visualization Sample Source Code
    • R Programming Source Code
      • R Programming Sample Source Code
      • R Machine Learning Sample Source Code
      • R Deep Learning Sample Source Code
      • R Spark Source Code
      • R Data science & Visualization Sample Source Code
      • R Natural Language Processing Source Code
    • Cloud Computing Source code
      • OpenNebula Sample Source Code
      • CloudSim Sample Source Code
      • iFog Computing Source Code
      • EdgeCloudSim Source Code
  • Domains
    • Internet of Things(IOT)
    • Networks
      • Wired Networks
      • Mobile Ad Hoc Networks
      • Wireless Sensor Network
      • Vehicular Ad Hoc Networks
      • Mobile Wireless Networks
      • Cognitive Radio Networks
      • Wireless Security
    • Network Security
    • Machine Learning
    • Cloud
      • Cloud Computing
      • Fog Computing
      • Edge Computing
      • Cloud Security
    • Big Data
    • Digital Forensics
    • Cybersecurity
    • Artificial Intelligence
    • Blockchain Technology
    • Mobile Computing
    • WWW
      • Web Technology
      • Semantic Web
      • Social Network
      • Web Mining
      • Web Services
    • Data Base
    • Data Mining
  • Blogs
  • Contact
  • Home
  • Projects
    • Final Year Projects
    • JAVA Projects
      • Machine Learning Projects
      • Data Mining Projects
      • Big Data Projects
      • Network Security Projects
      • Mobile Computing Projects
      • IoT Projects
      • Web Technology Projects
      • Semantic Web Projects
      • Social Network Projects
      • Web Services Projects
      • Hadoop Projects
      • Spark Projects
      • Cloud Security Projects
    • NS2 Projects
      • WSN Projects
      • MANET Projects
      • VANET Projects
      • CRN Projects
      • Wired Network Projects
    • Cloud Computing Projects
      • CloudSim Projects
      • Fog computing Projects
      • Edge computing Projects
      • Cloud Security Projects
    • Python Projects
      • Machine learning Projects
      • Data Mining Projects
      • Big Data Projects
    • R Projects
      • Machine learning Projects
      • Data Mining Projects
    • IoT Projects
      • Cooja Projects
      • NS2 Projects
      • Java Projects
    • Mobile Computing Projects
    • Ph.D Projects
    • Training
      • NS2 Training
      • PHP Training
      • Project Internship
      • JAVA J2EE Training
      • Android Training
      • Hadoop Training
      • Inplant Training
      • Workshops
      • Application Projects
    • Research & Development
    • Software Development
  • Research
    • PHD Guidance
    • PHD Consulting
    • PHD Projects
    • PHD Research Proposal
    • PHD Process
    • PHD Support Services
    • PHD Resources
    • PHD Courses in India
    • Top Journals in Computer Science
    • Research Books
  • Source Code
    • JAVA Source Code
      • Hadoop Source Code
      • Spark Source Code
      • HBase Source Code
    • NS2 Simulation Samples
      • NS2 Tutorial for Beginners
      • NS2 sample source code for Mobile Ad hoc Network
      • NS2 sample source code for Wireless Networks
      • NS2 sample source code for Wireless Sensor Networks
      • NS2 sample source code for vehicular ad hoc network
      • NS2 sample source code for Cognitive Radio Networks
      • NS2 sample source code for Wired Networks
    • IoT Contiki Source Code
    • Python Source Code
      • Python Programming Sample Source Code
      • Python Machine Learning Sample Source Code
      • Python Deep Learning Sample Source Code
      • Python Spark Sample Source Code
      • Python Natural Language Processing Source Code
      • Python Data science & Visualization Sample Source Code
    • R Programming Source Code
      • R Programming Sample Source Code
      • R Machine Learning Sample Source Code
      • R Deep Learning Sample Source Code
      • R Spark Source Code
      • R Data science & Visualization Sample Source Code
      • R Natural Language Processing Source Code
    • Cloud Computing Source code
      • OpenNebula Sample Source Code
      • CloudSim Sample Source Code
      • iFog Computing Source Code
      • EdgeCloudSim Source Code
  • Domains
    • Internet of Things(IOT)
    • Networks
      • Wired Networks
      • Mobile Ad Hoc Networks
      • Wireless Sensor Network
      • Vehicular Ad Hoc Networks
      • Mobile Wireless Networks
      • Cognitive Radio Networks
      • Wireless Security
    • Network Security
    • Machine Learning
    • Cloud
      • Cloud Computing
      • Fog Computing
      • Edge Computing
      • Cloud Security
    • Big Data
    • Digital Forensics
    • Cybersecurity
    • Artificial Intelligence
    • Blockchain Technology
    • Mobile Computing
    • WWW
      • Web Technology
      • Semantic Web
      • Social Network
      • Web Mining
      • Web Services
    • Data Base
    • Data Mining
  • Blogs
  • Contact

Evaluating the Impact of Wormhole Attack in MANET

What is Wormhole Attack

In aim of gaining sensitive information or disrupt the communication in the network, two attacker nodes collaboratively forms the tunnel and launches the attack known as wormhole attack.

Types and capacity of Wormhole Attack

There are two types of wormhole attacks.

  • Hidden Attack
  • Exposed Attack

In Hidden attack, genuine routers involved in the data transmission are unaware of the presence of malicious nodes in the path. In exposed attack, existence of the malicious nodes are known to the genuine routers but their malicious behavior is not known.

Two attackers are located in far way distance from each other and can be communicated directly with high transmission power capacity or they can communicate with each other normally in multihop manner.

How it is launched

In hidden attack case, attackers do not include their ID during the transmission of route request packet (RREQ). Hence source and destination consider themselves as direct neighbor to each other.

In exposed attack case, both attackers are located in multihop. During RREQ transmission second attackers modify the hop count field in RREQ packet to least value and pretends like both are direct neighbors so that data transmission can be initiated through them.

How it degrades the network performance

Wormhole attacker either can drop the data or redirect the data to other nodes in the network. Hence it affects the packet delivery ratio and throughput in the network. In some cases, if the wormhole attackers deliver the data to destination it will be reached with certain delay due to the creation long path by wormhole attackers.

How to create wormhole attack in NS2

Mobile Adhoc network is created with the number of nodes as run time argument. Each node is configured with wireless node configuration options. Node 0 is source and Node 1 is destination. Node2 and 3 are wormhole attackers and they are configured to be located far away from each other and Exposed attack is launched here. Routing agent corresponding to the attacker nodes are configured as wormhole1 and wormhole2. AODV routing protocol is used at the network layer. Regarding c++ part, aodv.cc file is modified in such a way that during route discovery process, attacker decreases the hopcount value in RREQ packet and also when the data is transmitted via attacker1 forwards it to attacker2 which drops the data without forwarding to nexthop or destination.

Sample code & Screenshots

Sample Code

TCL part:

if {$argc != 1} {

error "\nCommand: ns test.tcl \n\n "

}

# Define options

set val(chan) Channel/WirelessChannel ;                             # channel type

set val(prop) Propagation/TwoRayGround ;                            # radio-propagation model

set val(netif) Phy/WirelessPhy ;                                    # network interface type

set val(mac) Mac/802_11 ;                                           # MAC type

set val(ifq) Queue/DropTail/PriQueue ;                              # interface queue type

set val(ll) LL ;                                                    # link layer type

set val(ant) Antenna/OmniAntenna ;                                  # antenna model

set val(ifqlen) 50 ;                                                # max packet in ifq

set val(nn) [lindex $argv 0] ;                                      # number of mobilenodes

set val(rp) AODV ;                                                   # routing protocol

set val(x) 1000 ;                                                    # X dimension of topography

set val(y) 1000 ;                                                    # Y dimension of topography

set val(stop) 40 ;                                                   # time of simulation end

# Event scheduler object creation

set ns [new Simulator]

# Creating trace file and nam file

set tracefd [open test.tr w]

set namtrace [open test.nam w]

set r [open Normal_path.tr w]

set s [open Wormhole_path.tr w]

set t [open Routers_Between_Wormhole.tr w]

set ad [open delayhop.tr w]

#set to [open topology.tr w]

$ns trace-all $tracefd

$ns namtrace-all-wireless $namtrace $val(x) $val(y)

# set up topography object

set topo [new Topography]

$topo load_flatgrid $val(x) $val(y)

set god_ [create-god $val(nn)]

set chan_1_ [new $val(chan)]

#configure the nodes

$ns node-config -adhocRouting $val(rp) \

-llType $val(ll) \

-macType $val(mac) \

-ifqType $val(ifq) \

-ifqLen $val(ifqlen) \

-antType $val(ant) \

-propType $val(prop) \

-phyType $val(netif) \

-topoInstance $topo \

-channel $chan_1_ \

-agentTrace ON \

-routerTrace ON \

-macTrace OFF \

-movementTrace ON \

set node_(0) [$ns node]

set node_(1) [$ns node]

set node_(2) [$ns node]

set node_(3) [$ns node]

#configure the nodes

$ns node-config -adhocRouting $val(rp) \

-llType $val(ll) \

-macType $val(mac) \

-ifqType $val(ifq) \

-ifqLen $val(ifqlen) \

-antType $val(ant) \

-propType $val(prop) \

-phyType $val(netif) \

-topoInstance $topo \

-channel $chan_1_ \

-agentTrace ON \

-routerTrace ON \

-macTrace OFF \

-movementTrace ON \

for {set i 4} {$i < $val(nn)} { incr i } {

set node_($i) [$ns node]

}

# Initial node color plus labeling color

for {set i 0} {$i < $val(nn) } {incr i } {

$node_($i) color black

$ns at 0.0 "$node_($i) color black"

}

# Provide initial location of mobile nodes

$node_(0) set X_ 0

$node_(0) set Y_ 0

$node_(0) set Z_ 0.0

$node_(1) set X_ 1000

$node_(1) set Y_ 1000

$node_(1) set Z_ 0.0

$node_(2) set X_ 10

$node_(2) set Y_ 287

$node_(2) set Z_ 0.0

$node_(3) set X_ 705

$node_(3) set Y_ 944

$node_(3) set Z_ 0.0

set xx(0) 0

set yy(0) 0

set xx(1) 1000

set yy(1) 1000

set xx(2) 24

set yy(2) 258

set xx(3) 705

set yy(3) 944

for {set i 4} {$i < $val(nn) } { incr i } {

set xx($i) [expr rand()*$val(x)]

set yy($i) [expr rand()*$val(y)]

$node_($i) set X_ $xx($i)

$node_($i) set Y_ $yy($i)

}

set Sender 0

set Receiver 1

set Attacker1 2

set Attacker2 3

$ns at 0.0 "[$node_($Attacker1) set ragent_] wormhole1"

$ns at 0.0 "[$node_($Attacker2) set ragent_] wormhole2"

set udp [new Agent/UDP]

$ns attach-agent $node_($Sender) $udp

set cbr [new Application/Traffic/CBR]

$cbr set packetSize_ 1024

$cbr set interval_ 0.1

$cbr attach-agent $udp

set null [new Agent/Null]

$ns attach-agent $node_($Receiver) $null

$ns connect $udp $null

$ns at 1.0 "$cbr start"

$ns at 30.0 "$cbr stop"

$ns at 0.1 "$node_(0) label Sender"

$ns at 0.1 "$node_(1) label Receiver"

$ns at 0.1 "$node_(2) label Wormhole_attacker1"

$ns at 0.1 "$node_(3) label Wormhole_attacker2"

$ns at 0.1 "$node_(0) color blue"

$ns at 0.1 "$node_(1) color blue"

$ns at 0.1 "$node_(2) color red"

$ns at 0.1 "$node_(3) color red"

# Define node initial position in nam

$ns initial_node_pos $node_(0) 70

$ns initial_node_pos $node_(1) 70

for {set i 2} {$i < $val(nn) } { incr i } {

$ns initial_node_pos $node_($i) 50

}

# telling nodes when the simulation ends

for {set i 0} {$i < $val(nn) } { incr i } {

$ns at $val(stop) "$node_($i) reset";

}

# Ending nam and the simulation

$ns at $val(stop) "$ns nam-end-wireless $val(stop)"

$ns at $val(stop) "stop"

$ns at 40.01 "puts \"end simulation\"";

#stop procedure:

proc stop {} {

global ns tracefd namtrace val

$ns flush-trace

close $tracefd

close $namtrace

exec nam test.nam &

exit 0

}

$ns run

Screenshots

Network Animation Result

Related Projects

  • MAODV:Modified Wormhole Detection AODV Protocol, IEEE Transactions on Network Security, 2013 [NS2]
  • Wormholes No More? Localized Wormhole Detection And Prevention In Wireless Networks, IEEE International Conference on Distributed Computing in Sensor Systems, 2010 [NS2].
Share this post
FacebookTwitterGoogle+PinterestLinkedIn
Related posts
Applying Bio-Inspired Optimization Algorithms for Routing Protocols in Mobile Ad-Hoc NETworks
October 4, 2017
Evaluating the Impact of Blackhole Attack in MANET
May 27, 2016
Leave Comment

Cancel reply

Your email address will not be published. Required fields are marked *

clear formSubmit

Search
Recent Posts
  • nmnm July 23, 2019
  • Internet of Things October 9, 2017
  • How to Ensure Security to the IoT Technologies? October 9, 2017
  • How the Internet of Things Significantly Change Lives through its Potential Applications? October 9, 2017
  • Classification of QoS routing in WMN October 9, 2017
  • How to apply Bio-Inspired Optimization Algorithms to Routing Protocols in Wireless Sensor Networks October 9, 2017
  • How to build trust and security into the IoT devices ? October 4, 2017
  • What are the Pitfalls in the Design of IoT Routing Protocols October 4, 2017
  • Applying Bio-Inspired Optimization Algorithms for Routing Protocols in Mobile Ad-Hoc NETworks October 4, 2017
  • Cognitive Radio Networks June 30, 2016

S-Logix (OPC) Private Limited

Find us on:

       


  • Registered Office
  • #5,  First Floor, 4th Street
  • Dr. Subbarayan Nagar
  • Kodambakkam, Chennai-600 024
  • Landmark : Samiyar Madam
  • GSTIN:33AAXCS2730H1Z5

  • Research Projects
  • E-mail: pro@slogix.in
  • Mobile: +91- 81240 01111
  • Inquiry: Project Inquiry
  • IoT Projects
  • Python Projects
  • NS2 Projects

  • Ph.D Guidance & Consulting
  • E-mail: phd@slogix.in
  • Mobile: +91- 97109 99001
  • Enquiry: Ph.D Inquiry
  • PHD Guidance
  • PHD Consulting

  • About US
  •  Job Openings
  •  

  • Resumes: jobs@slogix.in
  • S-Logix image Gallery
  • Post Your Suggestions / Feedbacks

All Rights Reserved. Designed By: Firstsoft Technologies (P) Limited.
DISCLAIMER