Home | Trees | Index | Help |
|
---|
Package sulley :: Module sessions :: Class session |
|
object
--+ |graph
--+ | session
Method Summary | |
---|---|
Extends pgraph.graph and provides a container for architecting protocol dialogs. | |
Add a pgraph node to the graph. | |
Add a target to the session. | |
pgraph.edge |
Create a connection between the two requests (nodes) and register an optional callback to process in between transmissions of the source and destination request. |
Dump various object values to disk. | |
Call this routine to get the ball rolling. | |
Load varous object values from disk. | |
If the supplied message falls under the current log level, print the specified message to screen. | |
Integer |
Number of total mutations in the graph. |
If thet pause flag is raised, enter an endless loop until it is lowered. | |
Poll the PED-RPC endpoints (netmon, procmon etc...) for the target. | |
Overload or replace this routine to specify actions to run prior to each fuzz request. | |
Overload or replace this routine to specify actions to run affter to each fuzz request. | |
Restart the fuzz target. | |
Called by fuzz() on first run (not on recursive re-entry) to initialize variables, web interface, etc... | |
Render and transmit a node, process callbacks accordingly. | |
Inherited from graph | |
Add a pgraph cluster to the graph. | |
Add a pgraph edge to the graph. | |
Alias of graph_cat(). | |
Remove a cluster from the graph. | |
Remove an edge from the graph. | |
Alias of graph_sub(). | |
Remove a node from the graph. | |
List |
Enumerate the edges from the specified node. |
List |
Enumerate the edges to the specified node. |
Mixed |
Find and return the cluster with the specified attribute / value pair. |
Mixed |
Find and return the cluster that contains the node with the specified attribute / value pair. |
Mixed |
Find and return the edge with the specified attribute / value pair. |
Mixed |
Find and return the node with the specified attribute / value pair. |
Concatenate the other graph into the current one. | |
pgraph.graph |
Create a new graph, looking down, from the specified node id to the specified depth. |
Remove all elements from the current graph that do not exist in the other graph. | |
pgraph.graph |
Create a proximity graph centered around the specified node. |
Remove the elements shared between the current graph and other graph from the current graph. | |
pgraph.graph |
Create a new graph, looking up, from the specified node id to the specified depth. |
String |
Render the GML graph description. |
pydot.Dot |
Render the graphviz graph structure. |
String |
Render the uDraw graph description. |
String |
Render the uDraw graph update description. |
List |
Return a list of the nodes within the graph, sorted by id. |
Simply updating the id attribute of a node will sever the edges to / from the given node. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Class Variable Summary | |
---|---|
Inherited from graph | |
list |
clusters = []
|
dict |
edges = {}
|
NoneType |
id = None |
dict |
nodes = {}
|
Method Details |
---|
__init__(self,
session_filename=None,
skip=0,
sleep_time=1.0,
log_level=2,
proto='tcp',
restart_interval=0,
timeout=5.0,
web_port=26000,
crash_threshold=3)
Extends pgraph.graph and provides a container for architecting
protocol dialogs.
|
add_node(self, node)Add a pgraph node to the graph. We overload this routine to automatically generate and assign an ID whenever a node is added.
|
add_target(self, target)Add a target to the session. Multiple targets can be added for parallel fuzzing.
|
connect(self, src, dst=None, callback=None)Create a connection between the two requests (nodes) and register an optional callback to process in between transmissions of the source and destination request. Leverage this functionality to handle situations such as challenge response systems. The session class maintains a top level node that all initial requests must be connected to. Example:sess = sessions.session() sess.connect(sess.root, s_get("HTTP"))If given only a single parameter, sess.connect() will default to attaching the supplied node to the root node. This is a convenient alias and is identical to the second line from the above example: sess.connect(s_get("HTTP"))If you register callback method, it must follow this prototype: def callback(session, node, edge, sock)Where node is the node about to be sent, edge is the last edge along the current fuzz path to "node", session is a pointer to the session instance which is useful for snagging data such as sesson.last_recv which contains the data returned from the last socket transmission and sock is the live socket. A callback is also useful in situations where, for example, the size of the next packet is specified in the first packet. As another example, if you need to fill in the dynamic IP address of the target register a callback that snags the IP from sock.getpeername()[0].
|
export_file(self)Dump various object values to disk.
|
fuzz(self, this_node=None, path=[])Call this routine to get the ball rolling. No arguments are necessary as they are both utilized internally during the recursive traversal of the session graph.
|
import_file(self)Load varous object values from disk.
|
log(self, msg, level=1)If the supplied message falls under the current log level, print the specified message to screen.
|
num_mutations(self, this_node=None, path=[])Number of total mutations in the graph. The logic of this routine is identical to that of fuzz(). See fuzz() for inline comments. The member varialbe self.total_num_mutations is updated appropriately by this routine.
|
pause(self)If thet pause flag is raised, enter an endless loop until it is lowered. |
poll_pedrpc(self, target)Poll the PED-RPC endpoints (netmon, procmon etc...) for the target.
|
post_send(self, sock)Overload or replace this routine to specify actions to run prior to each fuzz request. The order of events is as follows:pre_send() - req - callback ... req - callback - post_send()When fuzzing RPC for example, register this method to establish the RPC bind.
|
pre_send(self, sock)Overload or replace this routine to specify actions to run affter to each fuzz request. The order of events is as follows:pre_send() - req - callback ... req - callback - post_send()When fuzzing RPC for example, register this method to tear down the RPC request.
|
restart_target(self, target, stop_first=True)Restart the fuzz target. If a VMControl is available revert the snapshot, if a process monitor is available restart the target process. Otherwise, do nothing.
|
server_init(self)Called by fuzz() on first run (not on recursive re-entry) to initialize variables, web interface, etc... |
transmit(self, sock, node, edge, target)Render and transmit a node, process callbacks accordingly.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Jul 27 17:40:03 2007 | http://epydoc.sf.net |