Blackhole attack

300 views
Skip to first unread message

nadbo

unread,
May 26, 2015, 12:56:55 PM5/26/15
to ns-u...@googlegroups.com
Hi everyone,

I'm trying to implement the blackhole attack with ns2.34  i followed steps by http://www.dokurer.net/files/documents/thesis.pdf  but when i run the tcl example i get the following error:

(_o14 cmd line 1)
    invoked from within
"_o14 cmd addr"
    invoked from within
"catch "$self cmd $args" ret"
    invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
    (procedure "_o14" line 2)
    (SplitObject unknown line 2)
    invoked from within
"_o14 addr"
    ("eval" body line 1)
    invoked from within
"eval $node addr $args"
    ("default" arm line 2)
    invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
    (procedure "_o3" line 14)
    (Simulator create-wireless-node line 14)
    invoked from within
"_o3 create-wireless-node"
    ("eval" body line 1)
    invoked from within
"eval $self create-wireless-node $args"
    (procedure "_o3" line 23)
    (Simulator node line 23)
    invoked from within
"$ns node"
    invoked from within
"set mnode_(0) [$ns node]"


Can you please help me fix this


Thank you

knudfl

unread,
May 27, 2015, 8:42:01 AM5/27/15
to ns-u...@googlegroups.com
Hi .

The "thesis.pdf"  http://www.dokurer.net/files/documents/thesis.pdf
( Or http://acikarsiv.atilim.edu.tr/eng/browse/160/172.pdf?show )
... is about ``idsAODV´´ +  blackholeAODV.

INFO :  http://www.linuxquestions.org/questions/tags/idsaodv/

Build example : 
cd ns-allinone-2.34/
patch
-p0 < idsAODV+blackholeaodv_ns234.patch
https
://drive.google.com/file/d/0B7S255p3kFXNMTZjNE0xV3QxRW8/view?usp=sharing
patch
-p0 < patch -p0 < ns234_gcc49.patch
./install
cd ns
-2.34/
cp ns ns234
-idsAODV-blackhole
sudo cp ns234
-idsAODV-blackhole  /usr/local/bin/

Simulation :   ns234-idsAODV-blackhole  blackholeaodv__idsAODV__dokurer.tcl
... is OK, the files sim1forBlackHole.nam and sim1forBlackHole.tr are created.

P.S. : The file scen1forAODV-n20-t500-x750-y750.txt :
Please rename to scen1forAODV-n20-t500-x750-y750

-
cbr
blackholeaodv__idsAODV__dokurer.tcl
ns234_gcc49.patch
idsaodv2.tcl
scen1forAODV-n20-t500-x750-y750.txt

knudfl

unread,
May 27, 2015, 8:44:15 AM5/27/15
to ns-u...@googlegroups.com
Correction :   patch -p0 < ns234_gcc49.patch

-

nadbo

unread,
May 27, 2015, 7:54:56 PM5/27/15
to ns-u...@googlegroups.com
Thank you sir

nadbo

unread,
May 29, 2015, 2:34:58 PM5/29/15
to ns-u...@googlegroups.com
Hello sir,

Can you please tell me how to generate a grayhole attack, and if there is a tcl example of how to apply it. Thanks a lot

Best regards

knudfl

unread,
May 29, 2015, 8:19:55 PM5/29/15
to ns-u...@googlegroups.com

nadbo

unread,
May 30, 2015, 3:46:24 PM5/30/15
to ns-u...@googlegroups.com
Hi sir,

I have downloaded the grayholeaodv.zip but the problem is they don't indicate how to add it in ns2 (we don't have instructions as for blackholeaodv). i'll appreciate it if i can get any help on that.

Best Wishes

knudfl

unread,
May 31, 2015, 6:49:27 AM5/31/15
to ns-u...@googlegroups.com
Hi .

The patches ....  post #4 here 
( which you will know if you followed  the links in my above post )
http://www.linuxquestions.org/questions/linux-newbie-8/grayhole-attack-in-ns2-using-aodv-protocol-4175534857/#4

Build example, grayhole only ...
tar xvf ns-allinone-2.35_gcc482.tar.gz
cd ns-allinone-2.35/
patch -p0 < grayholeaodv_ns235.patch
./install

-

nadbo

unread,
May 31, 2015, 2:07:34 PM5/31/15
to ns-u...@googlegroups.com
Thank you sir for your help. I just have a something to ask about: does this patch create a new protocol grayholeaodv (as for blackholeaodv), if so how do we define a grayhole attacker in TCL file (do we add $ns node-config -adhocRouting grayholeAODV) ??

Best Wishes
Reply all
Reply to author
Forward
0 new messages