SSF.App.DDoS
Class DDoSSession

java.lang.Object
  |
  +--SSF.OS.ProtocolSession
        |
        +--SSF.App.DDoS.DDoSSession
All Implemented Interfaces:
com.renesys.raceway.DML.Configurable

public class DDoSSession
extends ProtocolSession

This does NOT has many features in DDoSSessionRand, please use DDoSSessionRand instead unless the user wants to have full control of the attacking relay network.

. In the configuration, the user needs to specify the whole relay network of attacker, masters and agents. It can be a burden when one wants to use a lot of hijacked hosts.

Notice: each host running it must have interface "0" connected.

See Also:
DDoSSessionRand

Field Summary
static int ATTACKER
          level constants, so are "MASTER" and "ZOMBIE"
static int ATTACKING
           
protected  int attackMethod
          attack method
protected  int attackParam
          parameter of attacking
protected  int[] children
          array of IP addresses of children that are directly under control of this master or attacker
protected static com.renesys.raceway.DML.Configuration controlTreeConfig
           
protected static java.lang.String controlTreeFile
          control tree config file
protected  int endAttackTime
          attack ending time (second).
static int INSTALLED
           
protected  IP ipSess
          IP on this host
protected  int level
          level variable, it shows where in the control tree this host locates.
static int MASTER
           
protected  Timer myTimer
          timer
static int NOT_INSTALLED
          status constants, so are "INSTALLED" and "ATTACKING"
protected static RandomStream rng
          random stream
protected  int startAttackTime
          attack starting time (second).
 int status
          status variable, default is "INSTALLED"
static int SYN
          attack method constant
protected  int targetIP
          target IP
protected  int targetPort
          target port
static java.lang.String VIRTUAL_INTERFACE
          virtual interface that is assumed to be on at every host
static int ZOMBIE
           
 
Fields inherited from class SSF.OS.ProtocolSession
name, use
 
Constructor Summary
DDoSSession()
           
 
Method Summary
 void config(com.renesys.raceway.DML.Configuration cfg)
          config the status and level of this DDoSSession instance
protected  void endAttack(DDoSMessage msg)
           
 void init()
          Initialization routine, called by the ProtocolGraph after instantiation.
protected  void initAttacker(com.renesys.raceway.DML.Configuration cfg)
           
protected  void initLevel(java.lang.String evals)
           
protected  void initMaster(com.renesys.raceway.DML.Configuration cfg)
           
protected  void initStatus(java.lang.String evals)
           
protected  void initZombie(com.renesys.raceway.DML.Configuration cfg)
           
protected  void install(DDoSMessage msg)
           
 boolean push(ProtocolMessage message, ProtocolSession fromSession)
          Routine to call when a message is being sent to ("pushed into") this ProtocolSession by another ProtocolSession.
protected  void sendACK(DDoSMessage msg)
           
protected  void startAttack(DDoSMessage msg)
           
 
Methods inherited from class SSF.OS.ProtocolSession
close, closed, debugIdentifier, inGraph, open, opened, pushAfterDelay, pushAfterDelayFailed, setGraph, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_INSTALLED

public static final int NOT_INSTALLED
status constants, so are "INSTALLED" and "ATTACKING"

See Also:
Constant Field Values

INSTALLED

public static final int INSTALLED
See Also:
Constant Field Values

ATTACKING

public static final int ATTACKING
See Also:
Constant Field Values

ATTACKER

public static final int ATTACKER
level constants, so are "MASTER" and "ZOMBIE"

See Also:
Constant Field Values

MASTER

public static final int MASTER
See Also:
Constant Field Values

ZOMBIE

public static final int ZOMBIE
See Also:
Constant Field Values

VIRTUAL_INTERFACE

public static final java.lang.String VIRTUAL_INTERFACE
virtual interface that is assumed to be on at every host

See Also:
Constant Field Values

SYN

public static final int SYN
attack method constant

See Also:
Constant Field Values

status

public int status
status variable, default is "INSTALLED"


level

protected int level
level variable, it shows where in the control tree this host locates.


startAttackTime

protected int startAttackTime
attack starting time (second). It must be initialized for ATTACKER


endAttackTime

protected int endAttackTime
attack ending time (second). It must be initialized for ATTACKER


targetIP

protected int targetIP
target IP


targetPort

protected int targetPort
target port


attackMethod

protected int attackMethod
attack method


attackParam

protected int attackParam
parameter of attacking


children

protected int[] children
array of IP addresses of children that are directly under control of this master or attacker


ipSess

protected IP ipSess
IP on this host


controlTreeFile

protected static java.lang.String controlTreeFile
control tree config file


controlTreeConfig

protected static com.renesys.raceway.DML.Configuration controlTreeConfig

myTimer

protected Timer myTimer
timer


rng

protected static RandomStream rng
random stream

Constructor Detail

DDoSSession

public DDoSSession()
Method Detail

config

public void config(com.renesys.raceway.DML.Configuration cfg)
            throws com.renesys.raceway.DML.configException
config the status and level of this DDoSSession instance

Specified by:
config in interface com.renesys.raceway.DML.Configurable
Overrides:
config in class ProtocolSession
com.renesys.raceway.DML.configException

init

public void init()
          throws ProtocolException
Description copied from class: ProtocolSession
Initialization routine, called by the ProtocolGraph after instantiation. The order of initialization of a set of protocols is unspecified, so other methods (like open()) may be called before init(). Resources (like connection tables) that may be needed by open() should therefore be created in the ProtocolSession constructor.

Overrides:
init in class ProtocolSession
ProtocolException

push

public boolean push(ProtocolMessage message,
                    ProtocolSession fromSession)
             throws ProtocolException
Description copied from class: ProtocolSession
Routine to call when a message is being sent to ("pushed into") this ProtocolSession by another ProtocolSession. The pusher sends a reference to itself in the second argument. This push happens immediately, without any simulation time elapsing, regardless of other activities taking place in the ProtocolGraph.

If you desire "safe" interaction with other CPU activities, even though your push() consumes no measurable/modelable CPU cycles, define the "cpudelay true" attribute for the ProtocolGraph and use pushAfterDelay(message,fromSession,0.0). This will guarantee proper ordering; that is, the framework will wait until the CPU is free before proceeding with the requested push().

Specified by:
push in class ProtocolSession
ProtocolException

install

protected void install(DDoSMessage msg)

sendACK

protected void sendACK(DDoSMessage msg)
                throws ProtocolException
ProtocolException

startAttack

protected void startAttack(DDoSMessage msg)

endAttack

protected void endAttack(DDoSMessage msg)

initStatus

protected void initStatus(java.lang.String evals)
                   throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException

initLevel

protected void initLevel(java.lang.String evals)
                  throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException

initAttacker

protected void initAttacker(com.renesys.raceway.DML.Configuration cfg)
                     throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException

initMaster

protected void initMaster(com.renesys.raceway.DML.Configuration cfg)
                   throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException

initZombie

protected void initZombie(com.renesys.raceway.DML.Configuration cfg)
                   throws com.renesys.raceway.DML.configException
com.renesys.raceway.DML.configException