|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
simnet.Application
simnet.WormModel
An application which models worms in a subnet.
| Nested Class Summary | |
private class |
WormModel.Subnet
A /24 subnet for modeling worm propagation. |
| Field Summary | |
(package private) AggregateRouter |
ar
|
(package private) BPF |
bpf
|
(package private) int |
exist
|
(package private) static boolean |
globalInit
Global Lookup Tables |
(package private) int |
infected
|
static byte |
INFECTED
|
(package private) static int |
infectionSource
|
private static java.lang.Object |
LOCK
|
static byte |
NON_EXISTENT
|
static byte |
NOT_VULNERABLE
|
(package private) int |
packets
|
static double |
PROBE_IN_A
|
static double |
PROBE_IN_B
Rate to send a probe within the class B and A. |
(package private) java.util.Random |
random
|
static double |
RATE
Probes to send (RATE probes per WINDOW ms per infected host; window is automaticallty adjusted as needed). |
protected static int |
round_counter
|
protected static java.lang.Object |
ROUND_LOCK
|
boolean |
showInfo
|
static boolean |
slowDown
Should global slowdown be used? |
(package private) static long |
startTime
|
(package private) WormModel.Subnet[] |
subnets
A Note about verbosity levels: 0 = core info (infections at time t) 1 = new infections (specific ips) [commented out] 2 = worm probes [commented out] |
(package private) static int |
T_ASexist
|
(package private) static int |
T_ASinfected
|
(package private) static java.util.Vector |
targets
|
(package private) java.util.Vector |
targetsInA
Local lookup Tables |
(package private) static int |
Texist
|
(package private) static int |
Tinfected
|
(package private) static int |
Tpackets
|
(package private) static int |
Tvulnerable
|
(package private) java.util.Vector |
victims
|
(package private) int |
vulnerable
|
static byte |
VULNERABLE
|
| Fields inherited from class simnet.Application |
appid, appstart, frame, initialized, node, NODE_ID, pid, sim, win |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
WormModel()
|
|
| Method Summary | |
void |
customInit()
This is where an application can do any application-specific initializeation it requires. |
void |
disableSlowDown()
|
void |
enableSlowDown()
|
protected double |
getCost_A()
Return the cost in "credits" of sending a probe to a victim in this class A (including us) |
protected double |
getCost_B()
Return the cost in "credits" of sending a probe to a victim in this class B (us) |
protected double |
getCost_X()
Return the cost in "credits" of sending a probe to a victim the address space of existing class B's |
protected double |
getCost(double p)
|
void |
hideWormInfo()
|
void |
inBPF(int bpf_id,
IP_Packet ip_packet)
Look at incoming traffic for worms. |
boolean |
infect(int ip)
Attempt to infect the specified IP. |
protected int |
pickIP_A()
|
protected int |
pickIP_B()
|
protected int |
pickIP_X()
|
boolean |
prePlugout(java.lang.Object replacement)
WormModel can be removed by getting rid of the bpf rule, or replaced by transferring the BPF rule. |
void |
run()
Wait for the first infection, and then keep going... |
void |
sendProbe(int ip,
java.lang.String desc)
Send a probe packet to the specified IP (with short circuting). |
void |
setTargetA(java.lang.Integer p)
|
void |
setTargetB(java.lang.Integer p)
|
void |
setTargetRate(java.lang.Integer r)
|
void |
showWormInfo()
|
void |
startWorm()
Start a worm by randomly infecting a vulnerable host. |
void |
WaitForNearCompletion()
|
void |
WormStatus()
Print out the worm's status - add a check if we haven't yet started (don't print out time). |
| Methods inherited from class simnet.Application |
closeWindow, finalize, getTitleString, initialize, plugoutNotification, printout, printout, processWindowCommand, rawOut, window |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final byte NON_EXISTENT
public static final byte NOT_VULNERABLE
public static final byte VULNERABLE
public static final byte INFECTED
public static double RATE
public static double PROBE_IN_B
public static double PROBE_IN_A
public static boolean slowDown
AggregateRouter ar
BPF bpf
java.util.Random random
static boolean globalInit
static java.util.Vector targets
java.util.Vector targetsInA
java.util.Vector victims
protected static java.lang.Object ROUND_LOCK
protected static int round_counter
WormModel.Subnet[] subnets
int exist
int vulnerable
int infected
int packets
public boolean showInfo
private static java.lang.Object LOCK
static long startTime
static int infectionSource
static int Tpackets
static int Texist
static int Tvulnerable
static int Tinfected
static int T_ASexist
static int T_ASinfected
| Constructor Detail |
public WormModel()
| Method Detail |
public void customInit()
Application
customInit in class Applicationpublic void setTargetRate(java.lang.Integer r)
public void setTargetB(java.lang.Integer p)
public void setTargetA(java.lang.Integer p)
public void WormStatus()
public void startWorm()
public boolean infect(int ip)
public void showWormInfo()
public void hideWormInfo()
public void enableSlowDown()
public void disableSlowDown()
protected double getCost(double p)
protected int pickIP_B()
protected double getCost_B()
protected int pickIP_A()
protected double getCost_A()
protected int pickIP_X()
protected double getCost_X()
public void run()
run in interface java.lang.Runnablerun in class Applicationpublic void WaitForNearCompletion()
public void sendProbe(int ip,
java.lang.String desc)
public void inBPF(int bpf_id,
IP_Packet ip_packet)
inBPF in interface BPFConsumerbpf_id - the ID of the BPF rule that the ip_packet matchedip_packet - incoming ip_packet from BPFpublic boolean prePlugout(java.lang.Object replacement)
prePlugout in interface Pluggable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||