LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-23-2015, 07:39 AM   #1
absharma
LQ Newbie
 
Registered: Feb 2015
Posts: 1

Rep: Reputation: 0
grayhole attack in ns2 using aodv protocol


i am getting the folowing error while running the tcl script:-
can't read "source1": no such variable
while executing
"set source1"
(file "gray.tcl" line 109)
abhishek@ubuntu:~/Ns2$ ns gray.tcl
num_nodes is set 9
INITIALIZE THE LIST xListHead
can't read "source=1": no such variable
while executing
"set source=1"
(file "gray.tcl" line 109)
 
Old 02-24-2015, 12:47 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

`gray.tclŽ : Unknown file.
Please attach the file as gray.tcl.txt

* Attachments : The paper clip tool in the 'Advanced Editor'.
 
Old 04-06-2015, 07:55 AM   #3
alexa999
LQ Newbie
 
Registered: Apr 2015
Posts: 6

Rep: Reputation: Disabled
hii excuse me, please help me haow to implement idsaodv with grayholeaodv in ns2?
 
Old 04-06-2015, 12:22 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post #3, @alexa999 : Welcome to LQ.

idsAODV info https://groups.google.com/forum/?fro...aodv|sort:date

grayholeAODV info
. http://www.dokurer.net/files/others/
. http://www.dcs.warwick.ac.uk/~adhoc1/malicious.html


New patches :

grayholeaodv_ns235.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing

idsAODV_ns235.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing

grayholeaodv-for-idsAODV-patched_ns235.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing


-

Last edited by knudfl; 04-06-2015 at 12:54 PM.
 
Old 04-20-2015, 04:26 AM   #5
alexa999
LQ Newbie
 
Registered: Apr 2015
Posts: 6

Rep: Reputation: Disabled
hi knudfl

thank you for grayhole.zip but i'm still learn how to make grayhole and idsaodv, I have problems in making .tcl grayhole and .tcl idsaodv. may I ask grayhole.tcl and idsaodv.tcl ?? please sent in

Last edited by alexa999; 04-20-2015 at 07:19 AM.
 
Old 04-20-2015, 05:22 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #5.

Please delete your email address. To prevent your address getting harvested by spammers.
We already have "Send email to alexa999"
http://www.linuxquestions.org/questi...mber&u=1007257
* Editing post #5 : The 'Edit' button in post #5.
Besides that, all technical discussions are supposed to happen in the Forum`s:
Then all readers can benefit from the solutions.
So generally : We don't use email for information / attachments.
And file attachments too big for this site are uploaded to e.g. 'Google Docs'.


Grayhole : Please read some information :
https://www.google.com/webhp?hl=all&...rayhole+attack

The file idsaodv2.tcl is attached here, '29 March 2015' ...
https://groups.google.com/forum/?fro...E/79QZwlbdecsJ


-
 
Old 04-20-2015, 07:31 AM   #7
alexa999
LQ Newbie
 
Registered: Apr 2015
Posts: 6

Rep: Reputation: Disabled
thanks knudfl
but i'm have any error when execute this grayhole.tcl. how i do?

root@harlan-VirtualBox:/home/harlan/gray# ns sample21.tcl
num_nodes is set 9
INITIALIZE THE LIST xListHead
can't read "xx(0)": no such variable
while executing
"$node_($i) set X_ $xx($i)"
("for" body line 5)
invoked from within
"for {set i 0} {$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) ..."
(file "sample21.tcl" line 97)
root@harlan-VirtualBox:/home/harlan/gray#

Last edited by alexa999; 04-20-2015 at 07:33 AM.
 
Old 04-20-2015, 07:43 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #7.

xx is not defined.

The two lines with some settings are commented with a # :
#set xx($i) [expr rand()*$val(x)]
#set yy($i) [expr rand()*$val(y)]
Which turns the settings into "not to be used".

Any questions ? Then please attach sample21.tcl as sample21.tcl.txt .
Attachments : The paper clip tool in the 'Advanced Editor'.

-

Last edited by knudfl; 04-20-2015 at 07:44 AM.
 
Old 04-21-2015, 05:22 AM   #9
alexa999
LQ Newbie
 
Registered: Apr 2015
Posts: 6

Rep: Reputation: Disabled
Smile grayhole

thanks knudfl this the sample21 as txt. please correction this sample21.tcl.txt
Attached Files
File Type: txt sample21.tcl.txt (5.3 KB, 136 views)
 
Old 04-21-2015, 06:48 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #9.

`sample21.tcl' : You will have to define the "not defined variables".
( Besides un - commenting the xx, yy settings.)

Variable`s not defined :
"count(1)"
"n(1-0)" ?

*** The file is not complete.
http://slogix.in/how-to-create-grayh...ns2/index.html
""Sample Code Segment""


Example "Template" :
Code:
# start with these lines :

set ns [new Simulator]
set nf [open out.nam w]
$ns namtrace-all $nf

proc finish {} {
        global ns nf
        $ns flush-trace
        close $nf
        exec nam out.nam &
        exit 0
}

#######################
#
#    Write all other commands here.
#
#######################

# end with :

$ns at 5.0 "finish"
$ns run
 
Old 05-04-2015, 03:39 AM   #11
alexa999
LQ Newbie
 
Registered: Apr 2015
Posts: 6

Rep: Reputation: Disabled
thank you knudfl
i'm also questions about, how to implement cooperative network intrussion detection system (CNIDS) in mobile adhoc network based on DSR?

whether ids can be implemented into protocols other than AODV like a idsaodv?

Last edited by alexa999; 05-04-2015 at 03:48 AM.
 
Old 05-04-2015, 07:44 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #11.

As you can read : Google https://www.google.com/webhp?hl=all&...+system+(CNIDS)
... there isn't much info in those 15 hits ....... Sorry.

-
 
Old 05-05-2015, 07:28 AM   #13
alexa999
LQ Newbie
 
Registered: Apr 2015
Posts: 6

Rep: Reputation: Disabled
thank you knudfl
i'm also questions about, how to implement wormhole attack in aodv with secure ids aodv?
 
Old 05-05-2015, 08:38 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #13.

Wormhole attack + idsAODV : May be.

Example wormhole.tcl by @Mellia , post #18 here ..
http://www.linuxquestions.org/questi...714/page2.html
.. And my test : $ ns-byzantine-attack+aodvuu wormhole-Mellia.tcl
.. I.e. the attack module (Byzantine-attack) works OK.

( It was a year ago, I don't even remember that we got {byzantine + aodvuu} to work.)


-

Last edited by knudfl; 05-05-2015 at 08:42 AM.
 
Old 05-07-2015, 10:08 AM   #15
davidnursaputro
LQ Newbie
 
Registered: May 2015
Posts: 2

Rep: Reputation: Disabled
sorry sir knudfl byzantine attack include wormhole attack or rushing attack thanks before
 
  


Reply

Tags
grayhole, idsaodv, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem in simulating Black Hole Attack in AODV Protocol through NS2 in FC8 shyan Linux - Newbie 3 02-17-2015 04:21 PM
blackhole attack implementation using AODV protocol in manet in NS2 liya Ravi Linux - Networking 3 02-16-2015 01:14 AM
[SOLVED] How can I implement cooperative black hole attack in AODV protocol? eikhin Linux - Newbie 1 09-18-2013 10:03 AM
manet in ns2-wormhole attack(modifying aodv) indumit18 Linux - Software 2 02-02-2012 04:12 AM
black hole attack in aodv protocol my3ram Linux - Wireless Networking 0 12-29-2011 09:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:57 PM.

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