LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-29-2016, 12:25 PM   #1
neda_71
Member
 
Registered: Jul 2016
Location: Oregon, USA
Distribution: Lubuntu 14.04, ns2
Posts: 32

Rep: Reputation: Disabled
Detection and Prevention of Blackhole Attack, Wormhole Attack in MANET Using ACO in ns2


i want to simulate Wormhole Attack in MANET .i want wormhole patch or .tcl
could any one help me?
the article is https://www.ijeas.org/download_data/IJEAS0301046.pdf
 
Old 07-29-2016, 03:43 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,656

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
No, thanks. We are happyto HELP you, but we aren't going to look things up for you, write code for you, or email you things.

Read the "Quest Guidelines" and the LQ Rules. You opened yet ANOTHER duplicate thread, and have been asking such things for a while now:

http://www.linuxquestions.org/questi...de-4175585365/
http://www.linuxquestions.org/questi...me-4175584280/
http://www.linuxquestions.org/questi...k-help-921787/
http://www.linuxquestions.org/questi...ns-2-a-799095/

How many times are you going to ask for handouts, and when are you going to try to do SOMETHING for yourself?

Last edited by TB0ne; 07-29-2016 at 04:30 PM.
 
Old 07-29-2016, 07:49 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
INFO, wormhole http://www.linuxquestions.org/questions/tags/wormhole/

A related ns2 add is Byzantine-attacks :
The most versatile patch is "rushing-attacks" : rushing-attacks-jellyfish-and-byzantine
http://wirelessnetworksecurity11.blo...byzantine.html
. http://www.linuxquestions.org/questi...ing%20attacks/
. https://groups.google.com/forum/?fro...ack|sort:date/
. http://network-simulator-ns-2.7690.n...tack&sort=date


Detection and Prevention of Blackhole Attack : That's idsAODV →
"idsAODV-2-for-blackhole2013-patched_ns235.patch"
. http://www.linuxquestions.org/questions/tags/blackhole/
. http://www.linuxquestions.org/questions/tags/idsaodv/


-
 
Old 08-13-2016, 02:39 PM   #4
neda_71
Member
 
Registered: Jul 2016
Location: Oregon, USA
Distribution: Lubuntu 14.04, ns2
Posts: 32

Original Poster
Rep: Reputation: Disabled
i want simulate "Detection and Prevention of Blackhole Attack, Wormhole Attack in MANET Using ACO"
i detect the Blackhole Attack in ns2.35
but i have problem in detection of wormhole attack
please help me to solve it !
attach picture of error
use sample22.tcl in bin when use ns sample22.tcl have some error
Attached Thumbnails
Click image for larger version

Name:	01wormhole.png
Views:	80
Size:	131.1 KB
ID:	22730   Click image for larger version

Name:	wormhole2.png
Views:	63
Size:	120.2 KB
ID:	22731  
 
Old 08-13-2016, 02:41 PM   #5
neda_71
Member
 
Registered: Jul 2016
Location: Oregon, USA
Distribution: Lubuntu 14.04, ns2
Posts: 32

Original Poster
Rep: Reputation: Disabled
i use ns2-35 ,vmware 10 , ubuntu 12


#Filename: sample22.tcl



# 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) 14 ;# number of mobilenodes

set val(rp) AODV ;# routing protocol

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

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

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

set sender 0 ;# Sender

set receiver 9 ;# Receiver



#-------Event scheduler object creation--------#



set ns [new Simulator]





# set up topography object

set topo [new Topography]

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



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



# unity gain, omni-directional antennas

# set up the antennas to be centered in the node and 1.5 meters above it

Antenna/OmniAntenna set X_ 0

Antenna/OmniAntenna set Y_ 0

Antenna/OmniAntenna set Z_ 1.5

Antenna/OmniAntenna set Gt_ 1.0

Antenna/OmniAntenna set Gr_ 1.0



# Initialize the SharedMedia interface with parameters to make

# it work like the 914MHz Lucent WaveLAN DSSS radio interface

Phy/WirelessPhy set CPThresh_ 10.0

Phy/WirelessPhy set CSThresh_ 1.559e-11

Phy/WirelessPhy set RXThresh_ 3.652e-10 ;#250m

Phy/WirelessPhy set Rb_ 2*1e6

Phy/WirelessPhy set Pt_ 0.2818

Phy/WirelessPhy set freq_ 914e+6

Phy/WirelessPhy set L_ 1.0



#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) \

-channelType $val(chan) \

-topoInstance $topo \

-agentTrace ON \

-routerTrace ON \

-macTrace OFF \

-movementTrace ON



# unity gain, omni-directional antennas

# set up the antennas to be centered in the node and 1.5 meters above it

Antenna/OmniAntenna set X_ 0

Antenna/OmniAntenna set Y_ 0

Antenna/OmniAntenna set Z_ 1.5

Antenna/OmniAntenna set Gt_ 1.0

Antenna/OmniAntenna set Gr_ 1.0



# Initialize the SharedMedia interface with parameters to make

# it work like the 914MHz Lucent WaveLAN DSSS radio interface

Phy/WirelessPhy set CPThresh_ 10.0

Phy/WirelessPhy set CSThresh_ 1.559e-11

Phy/WirelessPhy set RXThresh_ 3.652e-10 ;#250m

Phy/WirelessPhy set Rb_ 2*1e6

Phy/WirelessPhy set Pt_ 0.2818

Phy/WirelessPhy set freq_ 914e+6

Phy/WirelessPhy set L_ 1.0











$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) \

-channelType $val(chan) \

-topoInstance $topo \

-agentTrace ON \

-routerTrace ON \

-macTrace OFF \

-movementTrace ON



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

set node_($i) [$ns node]

}











set udp [new Agent/UDP]

$ns attach-agent $node_(0) $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_(1) $null



$ns connect $udp $null

$ns at 2.0 "$cbr start"

$ns at 10.0 "$cbr stop"



$ns at 2.0 "$ns trace-annotate "Sender sends the data to the receiver through the selected router which is attacker""

$ns at 2.1 "$ns trace-annotate "Attacker 3 and 8 forms wormhole""





set udp [new Agent/UDP]

$ns attach-agent $node_(1) $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_(3) $null



$ns connect $udp $null

$ns at 3.0 "$cbr start"

$ns at 10.0 "$cbr stop"

$ns at 3.0 "$ns trace-annotate "Attacker forwards the data to Attacker 8 which does not forward the data to receiver""
 
Old 08-13-2016, 02:43 PM   #6
neda_71
Member
 
Registered: Jul 2016
Location: Oregon, USA
Distribution: Lubuntu 14.04, ns2
Posts: 32

Original Poster
Rep: Reputation: Disabled
Click image for larger version

Name:	wormhole.PNG
Views:	100
Size:	90.1 KB
ID:	22732i want simulate like picture
 
  


Reply

Tags
article, blackhole, ns2, wormhole



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Detection and Prevention of Blackhole Attack, Wormhole Attack in MANET Using ACO in ns2 neda_71 Linux - Virtualization and Cloud 1 07-30-2016 06:15 AM
blackhole attack implementation using AODV protocol in manet in NS2 liya Ravi Linux - Networking 3 02-16-2015 12:14 AM
How to assign Trust value in NS2 for simulating Blackhole attack in AODV in MANET? Rashmi Narahari Linux - Newbie 4 02-17-2014 11:43 AM
manet in ns2-wormhole attack(modifying aodv) indumit18 Linux - Software 2 02-02-2012 03:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration