Example #1
0
 def __init__(self):
     TCPLayerOperator.__init__(self, "TCPBadChecksum", "TCP segment with bad checksum & payload")
     self.add_param(IntParam("numseg", 2, "Segment with bad checksum & payload", 1))
     pos_list = ["before", "after", "last"]
     self.add_param(
         KeyListParam("position", pos_list[0], pos_list, "position of overlapping fragment => before | after | last")
     )
Example #2
0
	def __init__(self):
		TCPLayerOperator.__init__(self,'TCPBadHeaderLength','Bad Header Length & Payload')
		#min header length = 20 byte, 5 word	
		self.add_param(IntParam('numseg',2,'Segment with bad header length & Payload',1))
		self.add_param(IntParam('thl', 1, 'TCP header length', 1))
		pos_list = ["before", "after", "last"]
		self.add_param(KeyListParam('position',pos_list[0], pos_list, 'position of overlapping fragment => before | after | last'))		
Example #3
0
	def __init__(self, size=1):
		TCPLayerOperator.__init__(self,'TCPBadFlags','TCP packet with bad flags configuration')	
		self.add_param(IntParam('numseg',5,'Segment with bad flag and payload',1))
		#FSRPAU			
		flags_conf = [ "F", "U", "FS", "SR", "FR", "FRA", "FRPA", "FSP", "FSR", "FSRP" ]
		self.add_param(KeyListParam('flags',flags_conf[3], flags_conf, 'TCP flags for bad segment'))
		pos_list = ["before", "after", "last"]
		self.add_param(KeyListParam('position',pos_list[0], pos_list, 'position of overlapping segment => before | after | last'))
Example #4
0
	def __init__(self):
		TCPLayerOperator.__init__(self,'TCPBadOption','TCP packet with wrong option and payload')
		self.add_param(IntParam('numseg',2,'Segmnent with wrong option and payload',1))
		
		options = [ "mss", "wscale", "timestamp", "sackok" ]
		p = KeyListParam('opt', options[3], options, 'Option to set mss | wscale | timestamp | sackok')
		#p.set_multiple_values(options)
		self.add_param(p)
		#self.add_param(KeyListParam('opt', options[0], options, 'Option to set mss | wscale | timestamp | sackok'))
		
		pos_list = ["before", "after", "last"]
		self.add_param(KeyListParam('position',pos_list[2], pos_list, 'position of overlapping segment => before | after | last'))
Example #5
0
	def __init__(self):
		TCPLayerOperator.__init__(self,'TCP3whsRST','Reset conn. after 3whs and reconnect with different seq. numbers')	
		self.add_param(IntParam('offset',150000,'offset for seq. number', 1))
Example #6
0
	def __init__(self):
		TCPLayerOperator.__init__(self,'TCPOverlap','Overlapping TCP segment with bad payload')	
		self.add_param(IntParam('numseg',2,'Segment with bad payload',1))
		pos_list = ["before", "after"]
		self.add_param(KeyListParam('position',pos_list[1], pos_list, 'position of overlapping fragment => before | after'))
Example #7
0
	def __init__(self, size=1):
		TCPLayerOperator.__init__(self,'TCPBadPacketNoAck','TCP packet with ack flag cleared')	
		self.add_param(IntParam('numseg',2,'Segmnent with ack cleared',1))
		pos_list = ["before", "after", "last"]
		self.add_param(KeyListParam('position',pos_list[0], pos_list, 'position of overlapping fragment => before | after | last'))		
Example #8
0
	def __init__(self, size=1):
		TCPLayerOperator.__init__(self,'TCPDuplicate','TPC packet duplicated')	
		self.add_param(IntParam('numseg', 2,'Segment to duplicate',1))
		self.add_param(IntParam('pos', 3, 'Position of duplicated packet', 1))
Example #9
0
	def __init__(self):
		TCPLayerOperator.__init__(self,'TCPNo3whs','Send TCP packets without 3whs')	
Example #10
0
	def __init__(self):
		TCPLayerOperator.__init__(self,'TCPOutOfOrder2','TCP segments sent out of order')	
Example #11
0
	def __init__(self, size=1):
		TCPLayerOperator.__init__(self,'TCPOutofOrder','TPC packet swapped with the next')	
		self.add_param(IntParam('numseg',2,'Segment to be swapped',1))
Example #12
0
 def __init__(self, size=1):
     TCPLayerOperator.__init__(self, "TCPRetarder", "Send TCP packet waiting the specified timeout")
     self.add_param(IntParam("numseg", 4, "Position of  segmnet", 1))
     self.add_param(IntParam("timer", 20, "Timeout for segment", 0))
Example #13
0
	def __init__(self):
		TCPLayerOperator.__init__(self,'TCPSynData','Send data in SYN packet')	
Example #14
0
	def __init__(self, size=1):
		TCPLayerOperator.__init__(self,'TCPClearAck','TCP packet with ack flag cleared')	
		self.add_param(IntParam('numseg',1,'Segmnent with ack cleared',0))
Example #15
0
	def __init__(self, size=1):
		TCPLayerOperator.__init__(self,'TCPInterleavedSyn','Insert SYN packets')	
		self.add_param(IntParam('seq_offset',527600,'seq number offset for bad syn segments',1))
Example #16
0
	def __init__(self, size=1):
		TCPLayerOperator.__init__(self,'TCPBadSeqNumbers','Insert TCP packets (payload 1 byte) with bad seq number ')	
		self.add_param(IntParam('seq_offset',120000,'seq number offset for bad tcp segments',1))
Example #17
0
	def __init__(self, size=1):
		TCPLayerOperator.__init__(self,'TCPFakeRstBadSeq','TCP packet with rst flag & bad seq. number')	
		self.add_param(IntParam('numseg',1,'Position of bad rst segmnet',1))
		self.add_param(IntParam('offset',150000,'offset for seq. number', 1))
		self.add_param(IntParam('timer',2,'Timeout of segment after reset',0))
Example #18
0
	def __init__(self, size=1):
		TCPLayerOperator.__init__(self,'TCPFakeRstChecksum','TCP packet with rst flag & bad checksum')	
		self.add_param(IntParam('numseg',1,'Position of bad rst segmnet',1))
		self.add_param(IntParam('timer',0,'Timeout of segment after reset',0))
Example #19
0
	def __init__(self, size=10):
		TCPLayerOperator.__init__(self,'TCP-Split','Split a TCP packet in multiple little packets')	
		self.add_param(IntParam('size',10,'Data size of each packet',1))
		self.size = size