Commits

Jing Conan Wang  committed 265ed62

small revision of doc

  • Participants
  • Parent commits 1f59582

Comments (0)

Files changed (30)

File .DS_Store

Binary file added.
     1. going to NS3 path and type:
         $ ./waf shell
        you will enter ns3 waf-sh. Then in this shell, go back to this folder and type
-        $ ./simulator.py
+        $ ./simulate.py
     2. if you are lazy. just update the NS3_PATH value in settings.py and type
         $ ./sim

File core/.DS_Store

Binary file added.

File core/ns3/.DS_Store

Binary file added.

File core/ns3/Experiment.py

 NODE_NUM = 0
 
 class ImalseExperiment(object):
+    """ Base class for all ImalseExperiment
+    """
     server_id_set = [0]
     botmaster_id_set = [1]
     client_id_set = [2, 3, 4]
         node.cmd_set._trigger(*args, **kwargs)
 
     def start_nodes(self):
+        """specify when each node should start"""
         # start servers
         for i in self.server_id_set:
             print 'node [%i] type [%s] start at [%f]s'%(i, 'server', 0)
 # are clients
 import optparse
 class ImalseNetnsExperiment(ImalseExperiment, NetnsExperiment):
-    """Base Class for Imalse Experiment
-    It is based on the NetnsExperiment
+    """Base Class for Imalse Experiment in netns3 mode
     """
     def __init__(self, *args, **kwargs):
         # super(ImalseNetnsExperiment, self).__init__(*args, **kwargs)
-        NetnsExperiment.__init__(*args, **kwargs)
-        ImalseExperiment.__init__()
+        NetnsExperiment.__init__(self, *args, **kwargs)
+        ImalseExperiment.__init__(self)
         self._init()
 
     def initparser(self, parser):
 
     @staticmethod
     def event(time, func, *args, **kwds):
+        """schedule an event to simulator"""
         def run():
             func(*args, **kwds)
         ns.core.Simulator.Schedule(ns.core.Time(str(time)), run)
         for i in xrange(self.node_num):
             n = self.get_node(i)
             n.stop()
-
-

File core/ns3/Network.py

-from core.ns3.netns3 import *
-class Network:
-    def __init__(self, path):
-        print 'network config file [%s] loading...'%(path)
-        pass
-
-    def install(self, core):
-        print 'network installing...'
-        self.core = core
-        core.network = self

File core/ns3/SocketAdapter.py

Empty file removed.

File core/ns3/csma-ping.py

-#!/usr/bin/env python
-
-# Create a N node CSMA network and broadcast ping from the first node.
-
-from netns3 import *
-import sys
-
-class PingCsmaExperiment(CsmaExperiment):
-
-    @staticmethod
-    def ping(node, dst, count = 3):
-        cmd = ["ping", "-b", "-c", str(count), str(dst)]
-        print "%s: ping: %s" % (node.name, " ".join(cmd))
-        p, stdin, stdout, stderr = node.popen(cmd)
-        err = stderr.read()
-        out = stdout.read()
-        sys.stderr.write(err)
-        sys.stdout.write(out)
-
-    @staticmethod
-    def config(node):
-        node.cmd(["sysctl", "-w", "net.ipv4.icmp_echo_ignore_broadcasts=0"])
-        node.cmd(["ip", "route", "add", "default", "dev", "eth0"])
-
-    def initparser(self, parser):
-        CsmaExperiment.initparser(self, parser)
-        parser.set_defaults(simtime = 10, pingcount = 3)
-        parser.add_option("-c", "--pingcount", dest = "pingcount",
-                          help = "ping count; default = %s" %
-                          parser.defaults["pingcount"])
-
-    def setup(self):
-        CsmaExperiment.setup(self)
-        for n in self.nodes:
-            self.event(0, self.config, n)
-        if self.nodes:
-            self.event(1, self.ping, self.nodes[0],
-                       "255.255.255.255", self.options.pingcount)
-
-
-if __name__ == "__main__":
-    x = PingCsmaExperiment()
-    x.main()

File core/real/Node.py

 
     # def bind(self, sock, port):
     def bind(self, sock, addr_port):
+        print 'addr_port, ', addr_port
         sock.bind(addr_port)
         # sock.bind(("", port))
 
         ftp = FTP(host, user, password)
         print 'try to upload file %s'%(f)
         ftp.storbinary('STOR %s'%(os.path.basename(f)), open(f, 'rb'))
+        self.sleep(0.1)
+        print 'upload file finish %s'%(f)
+
 
     def stop_app(self, sock, app_name):
         if app_name == 'ping':

File doc/build/html/.doctrees/API.doctree

Binary file modified.

File doc/build/html/.doctrees/environment.pickle

Binary file modified.

File doc/build/html/.doctrees/index.doctree

Binary file modified.

File doc/build/html/API.html

 <p>This section contains the functions for NS3 support.</p>
 <dl class="class">
 <dt id="core.ns3.Experiment.ImalseExperiment">
-<em class="property">class </em><tt class="descclassname">core.ns3.Experiment.</tt><tt class="descname">ImalseExperiment</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/core/ns3/Experiment.html#ImalseExperiment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#core.ns3.Experiment.ImalseExperiment" title="Permalink to this definition">¶</a></dt>
-<dd><p>Base Class for Imalse Experiment
-It is based on the NetnsExperiment</p>
+<em class="property">class </em><tt class="descclassname">core.ns3.Experiment.</tt><tt class="descname">ImalseExperiment</tt><a class="reference internal" href="_modules/core/ns3/Experiment.html#ImalseExperiment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#core.ns3.Experiment.ImalseExperiment" title="Permalink to this definition">¶</a></dt>
+<dd><p>Base class for all ImalseExperiment</p>
 <dl class="method">
 <dt id="core.ns3.Experiment.ImalseExperiment.get_node">
 <tt class="descname">get_node</tt><big>(</big><em>i</em><big>)</big><a class="reference internal" href="_modules/core/ns3/Experiment.html#ImalseExperiment.get_node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#core.ns3.Experiment.ImalseExperiment.get_node" title="Permalink to this definition">¶</a></dt>
 <dd><p>print out the address of the server</p>
 </dd></dl>
 
+<dl class="method">
+<dt id="core.ns3.Experiment.ImalseExperiment.start_nodes">
+<tt class="descname">start_nodes</tt><big>(</big><big>)</big><a class="headerlink" href="#core.ns3.Experiment.ImalseExperiment.start_nodes" title="Permalink to this definition">¶</a></dt>
+<dd><p>specify when each node should start</p>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="core.ns3.Experiment.ImalseNetnsExperiment">
+<em class="property">class </em><tt class="descclassname">core.ns3.Experiment.</tt><tt class="descname">ImalseNetnsExperiment</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#core.ns3.Experiment.ImalseNetnsExperiment" title="Permalink to this definition">¶</a></dt>
+<dd><p>Base Class for Imalse Experiment in netns3 mode</p>
+<dl class="method">
+<dt id="core.ns3.Experiment.ImalseNetnsExperiment.get_node">
+<tt class="descname">get_node</tt><big>(</big><em>i</em><big>)</big><a class="headerlink" href="#core.ns3.Experiment.ImalseNetnsExperiment.get_node" title="Permalink to this definition">¶</a></dt>
+<dd><p>get ith nodes</p>
+</dd></dl>
+
 </dd></dl>
 
 <dl class="class">
 </dd></dl>
 
 <dl class="class">
-<dt id="core.ns3.PureSimExperiment.ImalsePureSimExperiment">
-<em class="property">class </em><tt class="descclassname">core.ns3.PureSimExperiment.</tt><tt class="descname">ImalsePureSimExperiment</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/core/ns3/PureSimExperiment.html#ImalsePureSimExperiment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#core.ns3.PureSimExperiment.ImalsePureSimExperiment" title="Permalink to this definition">¶</a></dt>
+<dt id="core.ns3.Experiment.ImalsePureSimExperiment">
+<em class="property">class </em><tt class="descclassname">core.ns3.Experiment.</tt><tt class="descname">ImalsePureSimExperiment</tt><a class="headerlink" href="#core.ns3.Experiment.ImalsePureSimExperiment" title="Permalink to this definition">¶</a></dt>
 <dd><p>Pure Sim Experiemtn Doesn&#8217;t depend on netns3 can run in simulated time</p>
+<dl class="staticmethod">
+<dt id="core.ns3.Experiment.ImalsePureSimExperiment.event">
+<em class="property">static </em><tt class="descname">event</tt><big>(</big><em>time</em>, <em>func</em>, <em>*args</em>, <em>**kwds</em><big>)</big><a class="headerlink" href="#core.ns3.Experiment.ImalsePureSimExperiment.event" title="Permalink to this definition">¶</a></dt>
+<dd><p>schedule an event to simulator</p>
+</dd></dl>
+
 </dd></dl>
 
 <div class="toctree-wrapper compound">

File doc/build/html/_images/client_fsm13.svg

Added
New image

File doc/build/html/_images/client_fsm14.svg

Added
New image

File doc/build/html/_images/genearal-structure22.png

Added
New image

File doc/build/html/_images/genearal-structure23.png

Added
New image

File doc/build/html/_images/imalse-abstract24.png

Added
New image

File doc/build/html/_images/imalse-abstract25.png

Added
New image

File doc/build/html/_sources/API.txt

 .. autoclass:: core.ns3.Experiment.ImalseExperiment
     :members:
 
+.. autoclass:: core.ns3.Experiment.ImalseNetnsExperiment
+    :members:
+
 .. autoclass:: core.ns3.Node.ImalseNetnsNode
     :members:
 
 .. autoclass:: core.ns3.Node.ImalseNetnsSimNode
     :members:
 
-.. autoclass:: core.ns3.PureSimExperiment.ImalsePureSimExperiment
+.. autoclass:: core.ns3.Experiment.ImalsePureSimExperiment
     :members:
 
-
 .. toctree::
    :maxdepth: 2
 
 * :ref:`genindex`
 * :ref:`modindex`
 * :ref:`search`
-

File doc/build/html/_sources/index.txt

 virtual functions.
 
 a command is a basic event in the botnet. **C**\ ommand **M**\ eta **D**\ escription defines a set of
-commands for a node, namely it defines what event a node can generate. There are three types of **CMD**\ s: 
+commands for a node, namely it defines what event a node can generate. There are three types of **CMD**\ s:
     1. Server **CMD**
     2. Client **CMD**
     3. Botmaster **CMD**
 support to real network, netns3 and NS3. User can create their own flavor of
 botnet by subclassing **ServerCMD**, **ClientCMD** and **BotmasterCMD**, each
 flavor is called a new **scenario**.
-implement
+
+The basic botnet mechanism can be described as **F**\ inite **S**\ tate **M**\
+achine. The **FSM** for the **ClientCMD** is as follows:
 
 .. image:: ./figure/client_fsm.svg
     :align: center 
     :height: 400px
 
+Scenario:
+++++++++++++++++++++++++++++++
+
+As a noted above, user can create their own flavor of **Botnet**, which is so
+called **scenario**. Currently, Imalse provides two sample **scenarios**: 
+
+    1. **ddos_ping_flooding**: in this scenario, botmaster can issue **send_pings** 
+           command to initiate a ddos ping flooding attack to a specific server.
+    2. **file_exfiltration**: in this scenario, botmaster can request bots to search
+           in the file system with any file that contains a certain pattern,
+           like **password**. Whenver an interesting is found, the bot will
+           upload the file to a ftp server.
+
+Experiment
+++++++++++++++++++++++++++++++
+
+Experiment is only used in **simulation mode**. Experiments need to do Topology and network
+configuration, user behaviour specification. This is usually the only part user need to code if he is 
+using an existing scenario. 
+
+Two types of experiments are avaliable in Imalse. 1. **ImalseNetnsExperiment** and 2. **ImalsePureSimExperiment**. 
+**ImalseNetnsExperiment** is for **netns3 mode** simulation. **ImalsePureSimExperiment** is
+for pure simulation. For both experiments, you can load topology. If you want to implement your own experiment, 
+you can subclass corresponding classes to implement different **mode**.
+
+The experiments folder contains several examples of experiment
+    1. **StaticRouteExperiment**
+    2. **TopoExperiment.py**
+
+Demo:
+------------------------------
+this is the link for a demo
+`video <http://www.youtube.com/watch?v=CZ91McFlIvo&feature=plcp>`_
+
+
 
 
 Extension:
 .. toctree::
    :maxdepth: 3
 
-    api
-
 Contents:
 
 Indices and tables

File doc/build/html/genindex.html

 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%" valign="top"><dl>
     <dt><a href="API.html#core.Client.ClientCMD.echo">echo() (core.Client.ClientCMD method)</a></dt>
+    <dt><a href="API.html#core.Server.ServerCMD.echo_bots">echo_bots() (core.Server.ServerCMD method)</a></dt>
 </dl></td>
   <td style="width: 33%" valign="top"><dl>
-    <dt><a href="API.html#core.Server.ServerCMD.echo_bots">echo_bots() (core.Server.ServerCMD method)</a></dt>
+    <dt><a href="API.html#core.ns3.Experiment.ImalsePureSimExperiment.event">event() (core.ns3.Experiment.ImalsePureSimExperiment static method)</a></dt>
 </dl></td>
 </tr></table>
 
 </dl></td>
   <td style="width: 33%" valign="top"><dl>
     <dt><a href="API.html#core.ns3.Experiment.ImalseExperiment.get_node">get_node() (core.ns3.Experiment.ImalseExperiment method)</a></dt>
+    <dd><dl>
+      <dt><a href="API.html#core.ns3.Experiment.ImalseNetnsExperiment.get_node">(core.ns3.Experiment.ImalseNetnsExperiment method)</a></dt>
+  </dl></dd>
 </dl></td>
 </tr></table>
 
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%" valign="top"><dl>
     <dt><a href="API.html#core.ns3.Experiment.ImalseExperiment">ImalseExperiment (class in core.ns3.Experiment)</a></dt>
+    <dt><a href="API.html#core.ns3.Experiment.ImalseNetnsExperiment">ImalseNetnsExperiment (class in core.ns3.Experiment)</a></dt>
     <dt><a href="API.html#core.ns3.Node.ImalseNetnsNode">ImalseNetnsNode (class in core.ns3.Node)</a></dt>
     <dt><a href="API.html#core.ns3.Node.ImalseNetnsSimNode">ImalseNetnsSimNode (class in core.ns3.Node)</a></dt>
-    <dt><a href="API.html#core.ns3.PureSimExperiment.ImalsePureSimExperiment">ImalsePureSimExperiment (class in core.ns3.PureSimExperiment)</a></dt>
 </dl></td>
   <td style="width: 33%" valign="top"><dl>
+    <dt><a href="API.html#core.ns3.Experiment.ImalsePureSimExperiment">ImalsePureSimExperiment (class in core.ns3.Experiment)</a></dt>
     <dt><a href="API.html#core.ns3.Topology.InetTopologyReader">InetTopologyReader (class in core.ns3.Topology)</a>, <a href="API.html#core.ns3.Topology.InetTopologyReader">[1]</a></dt>
     <dt><a href="API.html#core.Server.ServerCMD.initialize">initialize() (core.Server.ServerCMD method)</a></dt>
     <dt><a href="API.html#core.CMD.install">install() (core.CMD method)</a></dt>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%" valign="top"><dl>
     <dt><a href="API.html#core.Server.ServerCMD">ServerCMD (class in core.Server)</a></dt>
+    <dt><a href="API.html#core.CMD.start">start() (core.CMD method)</a></dt>
 </dl></td>
   <td style="width: 33%" valign="top"><dl>
-    <dt><a href="API.html#core.CMD.start">start() (core.CMD method)</a></dt>
+    <dt><a href="API.html#core.ns3.Experiment.ImalseExperiment.start_nodes">start_nodes() (core.ns3.Experiment.ImalseExperiment method)</a></dt>
 </dl></td>
 </tr></table>
 

File doc/build/html/index.html

 <li><strong>hybrid approach</strong>: of pure ns3 mode and netns3 mode</li>
 </ul>
 </div></blockquote>
-<img alt="_images/imalse-abstract23.png" class="align-center" src="_images/imalse-abstract23.png" />
+<img alt="_images/imalse-abstract25.png" class="align-center" src="_images/imalse-abstract25.png" />
 <div class="section" id="typical-use-case">
 <h3>Typical Use Case<a class="headerlink" href="#typical-use-case" title="Permalink to this headline">¶</a></h3>
 <p>Suppose Conan is a Ph.D student who has proposed a novel anomaly
 <p>To support the variety of modes noted above, Imalse design in a way that to
 seperate the botnet mechanism and the network.</p>
 <p>The general structure of Imalse is shown in the following figure:</p>
-<img alt="_images/genearal-structure21.png" class="align-center" src="_images/genearal-structure21.png" />
+<img alt="_images/genearal-structure23.png" class="align-center" src="_images/genearal-structure23.png" />
 <p><strong>Node</strong> and <strong>C</strong>ommand <strong>M</strong>eta <strong>D</strong>escription are the two key concepts in the design.
 <strong>Node</strong> is the abstraction of a real computer. A node should support:</p>
 <blockquote>
 <p>In <strong>core</strong> module, imalse provides a basic framework for the botnet and the
 support to real network, netns3 and NS3. User can create their own flavor of
 botnet by subclassing <strong>ServerCMD</strong>, <strong>ClientCMD</strong> and <strong>BotmasterCMD</strong>, each
-flavor is called a new <strong>scenario</strong>.
-implement</p>
-<div align="center" class="align-center"><object data="_images/client_fsm12.svg" height="400px" type="image/svg+xml"><embed height="400px" src="_images/client_fsm12.svg" type="image/svg+xml" /></object>
+flavor is called a new <strong>scenario</strong>.</p>
+<p>The basic botnet mechanism can be described as <strong>F</strong>inite <strong>S</strong>tate <strong>M</strong>achine. The <strong>FSM</strong> for the <strong>ClientCMD</strong> is as follows:</p>
+<div align="center" class="align-center"><object data="_images/client_fsm14.svg" height="400px" type="image/svg+xml"><embed height="400px" src="_images/client_fsm14.svg" type="image/svg+xml" /></object>
 </div>
 </div>
+<div class="section" id="scenario">
+<h3>Scenario:<a class="headerlink" href="#scenario" title="Permalink to this headline">¶</a></h3>
+<p>As a noted above, user can create their own flavor of <strong>Botnet</strong>, which is so
+called <strong>scenario</strong>. Currently, Imalse provides two sample <strong>scenarios</strong>:</p>
+<blockquote>
+<div><ol class="arabic">
+<li><dl class="first docutils">
+<dt><strong>ddos_ping_flooding</strong>: in this scenario, botmaster can issue <strong>send_pings</strong></dt>
+<dd><p class="first last">command to initiate a ddos ping flooding attack to a specific server.</p>
+</dd>
+</dl>
+</li>
+<li><dl class="first docutils">
+<dt><strong>file_exfiltration</strong>: in this scenario, botmaster can request bots to search</dt>
+<dd><p class="first last">in the file system with any file that contains a certain pattern,
+like <strong>password</strong>. Whenver an interesting is found, the bot will
+upload the file to a ftp server.</p>
+</dd>
+</dl>
+</li>
+</ol>
+</div></blockquote>
+</div>
+<div class="section" id="experiment">
+<h3>Experiment<a class="headerlink" href="#experiment" title="Permalink to this headline">¶</a></h3>
+<p>Experiment is only used in <strong>simulation mode</strong>. Experiments need to do Topology and network
+configuration, user behaviour specification. This is usually the only part user need to code if he is
+using an existing scenario.</p>
+<p>Two types of experiments are avaliable in Imalse. 1. <strong>ImalseNetnsExperiment</strong> and 2. <strong>ImalsePureSimExperiment</strong>.
+<strong>ImalseNetnsExperiment</strong> is for <strong>netns3 mode</strong> simulation. <strong>ImalsePureSimExperiment</strong> is
+for pure simulation. For both experiments, you can load topology. If you want to implement your own experiment,
+you can subclass corresponding classes to implement different <strong>mode</strong>.</p>
+<dl class="docutils">
+<dt>The experiments folder contains several examples of experiment</dt>
+<dd><ol class="first last arabic simple">
+<li><strong>StaticRouteExperiment</strong></li>
+<li><strong>TopoExperiment.py</strong></li>
+</ol>
+</dd>
+</dl>
+</div>
+</div>
+<div class="section" id="demo">
+<h2>Demo:<a class="headerlink" href="#demo" title="Permalink to this headline">¶</a></h2>
+<p>this is the link for a demo
+<a class="reference external" href="http://www.youtube.com/watch?v=CZ91McFlIvo&amp;feature=plcp">video</a></p>
 </div>
 <div class="section" id="extension">
 <h2>Extension:<a class="headerlink" href="#extension" title="Permalink to this headline">¶</a></h2>
 </li>
 <li><a class="reference internal" href="#description">Description:</a><ul>
 <li><a class="reference internal" href="#basic-botnet-mechanism">Basic Botnet Mechanism:</a></li>
+<li><a class="reference internal" href="#scenario">Scenario:</a></li>
+<li><a class="reference internal" href="#experiment">Experiment</a></li>
 </ul>
 </li>
+<li><a class="reference internal" href="#demo">Demo:</a></li>
 <li><a class="reference internal" href="#extension">Extension:</a><ul>
 </ul>
 </li>

File doc/build/html/objects.inv

Binary file modified.

File doc/build/html/searchindex.js

-Search.setIndex({objects:{core:{CMD:[1,2,1]},"core.Server":{ServerCMD:[1,2,1]},"core.Client.ClientCMD":{recv_disconn_req:[1,1,1],request_connect:[1,1,1],recv_ack:[1,1,1],echo:[1,1,1],request_time_out:[1,1,1],connection_refused:[1,1,1]},"core.ns3":{Topology:[1,0,1]},"core.ns3.Topology":{TopologyReaderHelper:[1,2,1],TopologyNet:[1,2,1],TopologyReader:[1,2,1],InetTopologyReader:[1,2,1]},"core.CMD":{start:[1,1,1],dispatcher:[1,1,1],install:[1,1,1]},"core.BaseNode.BaseNode":{close_socks:[1,1,1]},"core.ns3.Experiment":{ImalseExperiment:[1,2,1]},"core.BaseNode":{BaseNode:[1,2,1]},"core.Server.ServerCMD":{initialize:[1,1,1],echo_bots:[1,1,1],recv_request_conn:[1,1,1],dispatcher:[1,1,1],verify_master:[1,1,1]},"core.ns3.Node":{ImalseNetnsNode:[1,2,1],ImalseNetnsSimNode:[1,2,1],PhyNode:[1,2,1]},"core.ns3.PureSimExperiment":{ImalsePureSimExperiment:[1,2,1]},"core.Client":{ClientCMD:[1,2,1]},"core.ns3.Node.ImalseNetnsSimNode":{add_msg:[1,3,1],dispatcher:[1,1,1],after:[1,1,1],connect:[1,1,1],get_msg:[1,3,1]},"core.ns3.Experiment.ImalseExperiment":{print_srv_addr:[1,1,1],node_run:[1,1,1],get_node:[1,1,1]},"core.ns3.Node.PhyNode":{close_socks:[1,1,1]}},terms:{all:[0,1],concept:0,botmastercmd:0,consum:0,tapbridg:0,code:0,sleep:0,edu:1,follow:0,request_timeout:1,decid:0,depend:1,set_master_sock:[],send:[0,1],under:0,"_type":1,sourc:1,string:1,far:1,phynod:1,reader:1,imalsenetnsnod:1,util:0,ident:1,mechan:0,veri:0,level:[0,1],cmd:[0,1],escript:0,emul:[0,1],pleas:0,fortun:0,request_connect:1,seper:0,past:0,second:[0,1],puresimexperi:1,design:0,port:[],even:1,index:[0,1],what:0,botmast:0,addr:[],section:1,overload:0,access:0,"new":0,method:[0,1],iteritem:[],gener:[0,1],behaviour:0,connection_refus:1,address:[0,1],sinc:0,wait:1,search:[0,1],bot:1,behav:0,implement:[0,1],socks_seq_set:1,modul:[0,1],add_msg:1,api:[0,1],instal:[0,1],select:0,plot:0,from:[0,1],describ:0,commun:0,two:[0,1],few:0,music:0,msg:1,type:[0,1],inet:1,more:[0,1],peopl:0,umich:1,accept:1,ommand:0,compani:0,ware:0,none:1,join:0,alia:[],work:0,netsecur:0,del:[],can:[0,1],def:[],control:0,claim:1,process:0,indic:[0,1],want:0,cours:0,ping:0,write:0,how:0,"__init__":[],pure:[0,1],verifi:1,sim:[0,1],confid:0,after:[0,1],usabl:1,befor:0,mai:[0,1],data:[0,1],mal:0,physic:1,welcom:0,clientcmd:[0,1],read:[0,1],bind:1,abstract_method:[],maintain:1,combin:0,secnario:0,includ:0,netn:1,least:0,help:0,ith:1,echo_bot:1,imul:0,paper:0,through:0,still:0,paramet:0,setacceptcallback:1,disconnect:1,nodecr:1,unknowneventexcept:1,"return":1,machinc:0,thei:0,python:[0,1],dai:0,initi:[0,1],framework:0,botnet:[0,1],instead:0,now:0,introduct:0,name:[0,1],realist:0,good:0,mode:[0,1],each:[0,1],debug:[],complet:0,netns3:[0,1],approari:1,meta:1,"static":1,connect:[0,1],verify_mast:1,event:[0,1],out:[0,1],ftp:[],shown:0,network:[0,1],research:0,content:[0,1],netnsexperi:1,adapt:1,internet:0,print:1,srv_port:1,forth:0,base:[0,1],ask:0,recv:1,care:0,client_sock:1,thread:[],launch:0,refus:1,turn:0,think:0,first:0,softwar:0,reimplement:1,onc:0,independ:0,echo:1,request_time_out:1,alreadi:0,done:0,messag:1,open:0,topologyreaderhelp:1,differ:0,system:0,construct:[0,1],attack:0,master:1,scheme:0,listen:[],malwar:0,namespac:[0,1],tool:0,copi:0,pars:1,recv_ack:1,exactli:0,than:0,serv:0,enjoi:0,recv_disconn_req:1,provid:[0,1],structur:0,exampl:1,project:0,imals:[0,1],comput:0,have:0,tabl:[0,1],need:0,close_sock:1,techniqu:0,callback:1,self:1,note:0,pybindgen:1,take:0,which:0,call_back:[],deploy:0,who:0,deploi:0,"class":[0,1],"_set_logg":[],don:0,setlevel:[],request:[0,1],schedu:1,base_nod:[],socks_set:[],hack:1,onli:0,ns3:[0,1],"_input":1,"_format":1,solut:0,forev:0,should:[0,1],suppos:0,analyz:0,rich:0,folder:0,get:[0,1],becaus:0,cannot:1,mulat:0,requir:[0,1],topolog:[0,1],whether:0,common:0,contain:1,set:[0,1],packet:1,result:0,arg:1,close:1,detect:0,kei:[0,1],figur:0,enclosur:1,experi:1,approach:0,servercmd:[0,1],extend:0,get_msg:1,extens:0,lazi:0,succeed:1,recv_request_conn:1,satisfi:0,eta:0,whole:0,compromis:0,simpli:1,point:0,schedul:0,topologyread:1,dispatch:1,linux:[0,1],imalsepuresimexperi:1,quit:0,anomali:0,three:0,been:[0,1],json:1,much:[0,1],basic:[0,1],"abstract":[0,1],node_run:1,"case":0,novel:0,properti:[],defin:[0,1],outcom:0,abov:0,intranet:0,imalsetoposimexperi:0,addr_port:1,convinc:0,worri:0,kwarg:1,incom:0,sever:0,demostr:0,perform:0,make:0,format:1,start_act:1,member:[],create_sock:[],create_tim:[],document:[0,1],higher:0,finish:0,http:1,imalseexperi:1,experiemtn:1,rais:1,user:0,student:0,typic:0,scenario:0,ntegrat:0,client:[0,1],command:[0,1],thi:[0,1],model:0,propos:0,just:[0,1],less:0,print_srv_addr:1,topologynet:1,flavor:0,characterist:0,had:0,littl:0,sock_seq_set:1,logger:[],save:0,botmster:0,transit:1,real:[0,1],applic:[0,1],transpar:0,handl:1,testb:0,traffic:0,bit:0,password:1,inettopologyread:1,desc:1,like:0,specif:1,filenam:1,imalsenetnssimnod:1,server:[0,1],collect:0,specifii:0,page:[0,1],eec:1,srv_addr:1,some:0,back:1,though:0,subclass:0,when:1,ddo:0,refer:0,machin:[0,1],core:[0,1],object:[],run:[0,1],sendto:[],get_nod:1,about:0,actual:0,socket:[0,1],ack:1,simul:[0,1],backlog:[],fals:[],block:1,own:0,ddos_ping_attack:0,encod:1,automat:0,bufsiz:[],log:[],wai:[0,1],support:[0,1],question:0,start:1,techiniqu:0,lot:[0,1],call:[0,1],"function":[0,1],enough:0,translat:0,icmp:[],basicconfig:[],"default":0,basenod:[0,1],autoclass:[],record:0,otherwis:1,inform:0,app_nam:[],creat:0,classic:0,flow:0,dure:0,doesn:[0,1],conan:0,file:[0,1],hybrid:0,virtual:[0,1],other:0,varieti:0,test:0,you:0,stop_app:[],node:[0,1],matur:[0,1],relat:[],sequenc:1,receiv:1,sock:1,descript:[0,1],potenti:0,time:[0,1],getlogg:[],prototyp:0},objtypes:{"0":"py:module","1":"py:method","2":"py:class","3":"py:staticmethod"},titles:["Welcome to IMALSE&#8217;s documentation!","API Documentation"],objnames:{"0":"Python module","1":"Python method","2":"Python class","3":"Python static method"},filenames:["index","API"]})
+Search.setIndex({objects:{core:{CMD:[1,2,1]},"core.ns3.Experiment.ImalseNetnsExperiment":{get_node:[1,1,1]},"core.Client.ClientCMD":{recv_disconn_req:[1,1,1],request_connect:[1,1,1],recv_ack:[1,1,1],echo:[1,1,1],request_time_out:[1,1,1],connection_refused:[1,1,1]},"core.ns3.Experiment.ImalsePureSimExperiment":{event:[1,3,1]},"core.ns3":{Topology:[1,0,1]},"core.ns3.Topology":{TopologyReaderHelper:[1,2,1],TopologyNet:[1,2,1],TopologyReader:[1,2,1],InetTopologyReader:[1,2,1]},"core.CMD":{start:[1,1,1],dispatcher:[1,1,1],install:[1,1,1]},"core.BaseNode.BaseNode":{close_socks:[1,1,1]},"core.ns3.Experiment":{ImalseExperiment:[1,2,1],ImalsePureSimExperiment:[1,2,1],ImalseNetnsExperiment:[1,2,1]},"core.BaseNode":{BaseNode:[1,2,1]},"core.Server.ServerCMD":{initialize:[1,1,1],echo_bots:[1,1,1],recv_request_conn:[1,1,1],dispatcher:[1,1,1],verify_master:[1,1,1]},"core.ns3.Node":{ImalseNetnsNode:[1,2,1],ImalseNetnsSimNode:[1,2,1],PhyNode:[1,2,1]},"core.Client":{ClientCMD:[1,2,1]},"core.ns3.Node.ImalseNetnsSimNode":{add_msg:[1,3,1],dispatcher:[1,1,1],after:[1,1,1],connect:[1,1,1],get_msg:[1,3,1]},"core.ns3.Experiment.ImalseExperiment":{print_srv_addr:[1,1,1],node_run:[1,1,1],get_node:[1,1,1],start_nodes:[1,1,1]},"core.ns3.Node.PhyNode":{close_socks:[1,1,1]},"core.Server":{ServerCMD:[1,2,1]}},terms:{all:[0,1],concept:0,botmastercmd:0,consum:0,tapbridg:0,code:0,sleep:0,edu:1,follow:0,topoexperi:0,request_timeout:1,decid:0,depend:1,set_master_sock:[],send:[0,1],init:0,under:0,"_type":1,sourc:1,string:1,far:1,phynod:1,reader:1,imalsenetnsnod:1,util:0,ident:1,mechan:0,veri:0,level:[0,1],cmd:[0,1],upload:0,escript:0,emul:[0,1],pleas:0,fortun:0,request_connect:1,seper:0,past:0,second:[0,1],puresimexperi:[],design:0,port:[],even:1,index:[0,1],what:0,botmast:0,addr:[],section:1,overload:0,access:0,"new":0,method:[0,1],iteritem:[],gener:[0,1],behaviour:0,connection_refus:1,address:[0,1],sinc:0,wait:1,search:[0,1],bot:[0,1],behav:0,implement:[0,1],socks_seq_set:1,modul:[0,1],ask:0,api:[0,1],instal:[0,1],select:0,plot:0,from:[0,1],describ:0,commun:0,two:[0,1],few:0,music:0,handl:1,msg:1,type:[0,1],inet:1,more:[0,1],peopl:0,umich:1,accept:1,ommand:0,compani:0,ware:0,none:1,join:0,alia:[],work:0,netsecur:0,del:[],can:[0,1],def:[],control:0,claim:1,process:0,indic:[0,1],want:0,cours:0,ping:0,write:0,how:0,"__init__":[],pure:[0,1],verifi:1,sim:[0,1],confid:0,after:[0,1],usabl:1,befor:0,mai:[0,1],data:[0,1],mal:0,physic:1,welcom:0,clientcmd:[0,1],bind:1,file_exfiltr:0,issu:0,abstract_method:[],maintain:1,combin:0,secnario:0,includ:0,netn:1,least:0,help:0,ith:1,echo_bot:1,imul:0,paper:0,through:0,still:0,paramet:0,setacceptcallback:1,disconnect:1,onc:0,nodecr:1,unknowneventexcept:1,"return":1,machinc:0,thei:0,python:[0,1],dai:0,initi:[0,1],framework:0,botnet:[0,1],instead:0,now:0,introduct:0,name:[0,1],realist:0,good:0,mode:[0,1],each:[0,1],debug:[],found:0,complet:0,netns3:[0,1],approari:1,meta:1,"static":1,connect:[0,1],verify_mast:1,event:[0,1],out:[0,1],ftp:0,shown:0,network:[0,1],research:0,content:[0,1],netnsexperi:[],adapt:1,internet:0,print:1,srv_port:1,forth:0,base:[0,1],achin:0,recv:1,care:0,client_sock:1,thread:[],launch:0,imalsenetnsexperi:[0,1],refus:1,turn:0,think:0,first:0,softwar:0,reimplement:1,staticrouteexperi:0,independ:0,echo:1,request_time_out:1,alreadi:0,done:0,messag:1,open:0,topologyreaderhelp:1,differ:0,start_nod:1,tate:0,system:0,construct:[0,1],attack:0,master:1,scheme:0,listen:[],malwar:0,namespac:[0,1],tool:0,copi:0,specifi:1,part:0,pars:1,recv_ack:1,exactli:0,than:0,serv:0,enjoi:0,recv_disconn_req:1,provid:[0,1],structur:0,exampl:[0,1],project:0,video:0,comput:0,ani:0,correspond:0,have:0,tabl:[0,1],need:0,close_sock:1,techniqu:0,callback:1,self:1,note:0,pybindgen:1,take:0,which:0,call_back:[],addr_port:1,deploy:0,who:0,deploi:0,"class":[0,1],"_set_logg":[],don:0,setlevel:[],request:[0,1],schedu:1,usual:0,base_nod:[],socks_set:[],hack:1,current:0,onli:0,ns3:[0,1],"_input":1,"_format":1,configur:0,solut:0,forev:0,should:[0,1],suppos:0,analyz:0,rich:0,folder:0,get:[0,1],becaus:0,cannot:1,mulat:0,requir:[0,1],topolog:[0,1],whether:0,common:0,contain:[0,1],set:[0,1],packet:1,result:0,arg:1,close:1,detect:0,kei:[0,1],pattern:0,figur:0,enclosur:1,experi:[0,1],approach:0,servercmd:[0,1],extend:0,get_msg:1,extens:0,lazi:0,succeed:1,imals:[0,1],recv_request_conn:1,satisfi:0,eta:0,whole:0,compromis:0,simpli:1,kwd:1,point:0,schedul:[0,1],topologyread:1,dispatch:1,linux:[0,1],imalsepuresimexperi:[0,1],quit:0,anomali:0,three:0,been:[0,1],json:1,much:[0,1],interest:0,basic:[0,1],"abstract":[0,1],both:0,func:1,node_run:1,"case":0,novel:0,properti:[],defin:[0,1],outcom:0,abov:0,intranet:0,imalsetoposimexperi:0,ddos_ping_flood:0,demo:0,convinc:0,worri:0,kwarg:1,incom:0,sever:0,demostr:0,perform:0,make:0,format:1,start_act:1,member:[],create_sock:[],create_tim:[],document:[0,1],higher:0,finish:0,http:1,imalseexperi:1,experiemtn:1,rais:1,user:0,student:0,whenver:0,typic:0,scenario:0,ntegrat:0,client:[0,1],command:[0,1],thi:[0,1],model:0,propos:0,load:0,just:[0,1],less:0,print_srv_addr:1,topologynet:1,flavor:0,characterist:0,had:0,littl:0,sock_seq_set:1,logger:[],save:0,botmster:0,transit:1,real:[0,1],applic:[0,1],transpar:0,read:[0,1],avali:0,testb:0,traffic:0,send_p:0,bit:0,password:[0,1],add_msg:1,inettopologyread:1,desc:1,like:0,specif:[0,1],filenam:1,imalsenetnssimnod:1,server:[0,1],collect:0,specifii:0,page:[0,1],eec:1,srv_addr:1,some:0,back:1,certain:0,sampl:0,though:0,subclass:0,when:1,ddo:0,refer:0,machin:[0,1],core:[0,1],object:[],run:[0,1],sendto:[],get_nod:1,about:0,actual:0,socket:[0,1],ack:1,simul:[0,1],backlog:[],fals:[],block:1,own:0,ddos_ping_attack:0,encod:1,automat:0,bufsiz:[],your:0,log:[],wai:[0,1],support:[0,1],question:0,start:1,techiniqu:0,lot:[0,1],call:[0,1],"function":[0,1],enough:0,link:0,translat:0,icmp:[],basicconfig:[],"default":0,basenod:[0,1],autoclass:[],record:0,otherwis:1,inform:0,app_nam:[],creat:0,classic:0,flow:0,dure:0,doesn:[0,1],conan:0,file:[0,1],exist:0,hybrid:0,virtual:[0,1],flood:0,other:0,varieti:0,test:0,you:0,stop_app:[],node:[0,1],matur:[0,1],relat:[],sequenc:1,receiv:1,sock:1,descript:[0,1],fsm:0,potenti:0,time:[0,1],getlogg:[],prototyp:0},objtypes:{"0":"py:module","1":"py:method","2":"py:class","3":"py:staticmethod"},titles:["Welcome to IMALSE&#8217;s documentation!","API Documentation"],objnames:{"0":"Python module","1":"Python method","2":"Python class","3":"Python static method"},filenames:["index","API"]})

File doc/source/.DS_Store

Binary file added.

File doc/source/API.rst

 .. autoclass:: core.ns3.Experiment.ImalseExperiment
     :members:
 
+.. autoclass:: core.ns3.Experiment.ImalseNetnsExperiment
+    :members:
+
 .. autoclass:: core.ns3.Node.ImalseNetnsNode
     :members:
 
 .. autoclass:: core.ns3.Node.ImalseNetnsSimNode
     :members:
 
-.. autoclass:: core.ns3.PureSimExperiment.ImalsePureSimExperiment
+.. autoclass:: core.ns3.Experiment.ImalsePureSimExperiment
     :members:
 
-
 .. toctree::
    :maxdepth: 2
 
 * :ref:`genindex`
 * :ref:`modindex`
 * :ref:`search`
-

File doc/source/index.rst

 virtual functions.
 
 a command is a basic event in the botnet. **C**\ ommand **M**\ eta **D**\ escription defines a set of
-commands for a node, namely it defines what event a node can generate. There are three types of **CMD**\ s: 
+commands for a node, namely it defines what event a node can generate. There are three types of **CMD**\ s:
     1. Server **CMD**
     2. Client **CMD**
     3. Botmaster **CMD**
 configuration, user behaviour specification. This is usually the only part user need to code if he is 
 using an existing scenario. 
 
-Two types of experiments are avaliable in Imalse. 1. **NetnsExperiment** and 2. **PureSimExeperiment**. 
-**NetnsExperiment** is for **netns3 mode** simulation. **PureSimExeperiment** is
+Two types of experiments are avaliable in Imalse. 1. **ImalseNetnsExperiment** and 2. **ImalsePureSimExperiment**. 
+**ImalseNetnsExperiment** is for **netns3 mode** simulation. **ImalsePureSimExperiment** is
 for pure simulation. For both experiments, you can load topology. If you want to implement your own experiment, 
 you can subclass corresponding classes to implement different **mode**.
 
 The experiments folder contains several examples of experiment
-    1. **ImalseTopoSimExperiment**
-    2. **ImalseTopoExperiment**
-    3. **ImalseStaticRouteExperiment**
-    4. **ImalseStaticRouteSimExperiment**
-    5. **ImalsePingCsmaExperiment**
+    1. **StaticRouteExperiment**
+    2. **TopoExperiment.py**
 
-
-
+Demo:
+------------------------------
+this is the link for a demo
+`video <http://www.youtube.com/watch?v=CZ91McFlIvo&feature=plcp>`_
 
 
 
 .. toctree::
    :maxdepth: 3
 
-    api
-
 Contents:
 
 Indices and tables

File experiments/.DS_Store

Binary file added.

File experiments/TopoExperiment.py

 import os
 
 NETWORK_BASE = "10.0.0.0"
-SERVER_ADDR = "10.0.0.1"
+# SERVER_ADDR = "10.0.0.1"
+SERVER_ADDR = "127.0.0.1"
 IP_MASK = "255.255.255.0"
 
 class TopoExperiment(BaseClass):