How to use unreach method in fMBT

Best Python code snippet using fMBT_python

infoAndErrorAttacks.py

Source:infoAndErrorAttacks.py Github

copy

Full Screen

1#!/usr/bin/python2import sys3import re, uuid4import os5import readline6from pprint import pprint7from commands import *8from echoReply import *9from destinationUnreach import *10from packetTooBig import *11from timeExceeded import *12from parameterProblem import *13from echoRequest import *14"""15This is general class to start Informational and Error ICMPv6 message type tests.16"""17class InfoAndErrorAttacks:18 def __init__(self, iface):19 self.iface = iface20 self.name = 'InfoAndErrorAttacks'21 def startSystem(self):22 Commands.setInfoAndErrorAttacksHistory()23 running = 124 while running:25 readline.parse_and_bind("tab: complete")26 #we receive data from the keyboard 27 command = raw_input(self.name + ' >>')28 #help command29 if re.match('help', command):30 self.showHelp()31 #quit module command32 elif re.match('quit', command):33 running = 034 Commands.setAttackingChannelHistory()35 elif re.match('execEchoReplyRemoteWin', command):36 er = EchoReply()37 er.execModuleEchoReplyWin(self.iface)38 elif re.match('execDestUnreachAllWin', command):39 du = DestinationUnreach() 40 du.execAllWindows(self.iface)41 elif re.match('execDestUnreachAllLinux', command):42 du = DestinationUnreach()43 du.execAllLinux(self.iface)44 elif re.match('execDestUnreachBadCodeWin', command):45 du = DestinationUnreach() 46 du.execDestUnreachBadCodeWin(self.iface)47 elif re.match('execDestUnreachBadCodeLinux', command):48 du = DestinationUnreach()49 du.execDestUnreachBadCodeLinux(self.iface)50 elif re.match('execDestUnreachDifferentLengthLinux', command):51 du = DestinationUnreach()52 du.execDestUnreachLengthLinux(self.iface)53 elif re.match('execDestUnreachDifferentLengthWin', command):54 du = DestinationUnreach()55 du.execDestUnreachLengthWin(self.iface)56 elif re.match('execDestUnreachNoRouteWin', command):57 du = DestinationUnreach()58 du.execDestUnreachNoRouteToDestWin(self.iface)59 elif re.match('execDestUnreachNoRouteLinux', command):60 du = DestinationUnreach()61 du.execDestUnreachNoRouteToDestLinux(self.iface)62 elif re.match('execDestUnreachAdrUnreachWin', command):63 du = DestinationUnreach()64 du.execDestUnreachAdrUnreachWin(self.iface)65 elif re.match('execDestUnreachAdrUnreachLinux', command):66 du = DestinationUnreach()67 du.execDestUnreachAdrUnreachLinux(self.iface)68 elif re.match('execDestUnreachPortUnreachWin', command):69 du = DestinationUnreach()70 du.execDestUnreachPortUnreachWin(self.iface)71 elif re.match('execDestUnreachPortUnreachLinux', command):72 du = DestinationUnreach()73 du.execDestUnreachPortUnreachLinux(self.iface)74 elif re.match('execDestUnreachComAdminProhibWin', command):75 du = DestinationUnreach()76 du.execDestUnreachCommDstAdminProhibitedWin(self.iface)77 elif re.match('execDestUnreachComAdminProhibLinux', command):78 du = DestinationUnreach()79 du.execDestUnreachCommDstAdminProhibitedLinux(self.iface)80 elif re.match('execDestUnreachBeyondScopeWin', command):81 du = DestinationUnreach()82 du.execDestUnreachBeyondScopeSrcAdrWin(self.iface)83 elif re.match('execDestUnreachBeyondScopeLinux', command):84 du = DestinationUnreach()85 du.execDestUnreachBeyondScopeSrcAdrLinux(self.iface)86 elif re.match('execDestUnreachSrcFailedPolicyWin', command):87 du = DestinationUnreach()88 du.execDestUnreachSrcFailedPolicyWin(self.iface)89 elif re.match('execDestUnreachSrcFailedPolicyLinux', command):90 du = DestinationUnreach()91 du.execDestUnreachSrcFailedPolicyLinux(self.iface)92 elif re.match('execDestUnreachRejectRouteWin', command):93 du = DestinationUnreach()94 du.execDestUnreachRejectRouteWin(self.iface)95 elif re.match('execDestUnreachRejectRouteLinux', command):96 du = DestinationUnreach()97 du.execDestUnreachRejectRouteLinux(self.iface)98 elif re.match('execPacketTooBigMTUBigWin', command):99 ptb = PacketTooBig()100 ptb.execModulePacketTooBigMTUBigWin(self.iface)101 elif re.match('execPacketTooBigMTUBigLinux', command):102 ptb = PacketTooBig()103 ptb.execModulePacketTooBigMTUBigLinux(self.iface)104 elif re.match('execPacketTooBigMTUSmallWin', command):105 ptb = PacketTooBig()106 ptb.execModulePacketTooBigMTUSmallWin(self.iface)107 elif re.match('execPacketTooBigMTUSmallLinux', command):108 ptb = PacketTooBig()109 ptb.execModulePacketTooBigMTUSmallLinux(self.iface)110 elif re.match('execPacketTooBigMTUWin', command):111 ptb = PacketTooBig()112 ptb.execModulePacketTooBigMTUWin(self.iface)113 elif re.match('execPacketTooBigMTULinux', command):114 ptb = PacketTooBig()115 ptb.execModulePacketTooBigMTULinux(self.iface)116 elif re.match('execPacketTooBigBadCodeWin', command):117 ptb = PacketTooBig()118 ptb.execModulePacketTooBigMTUWin(self.iface)119 elif re.match('execPacketTooBigBadCodeLinux', command):120 ptb = PacketTooBig()121 ptb.execModulePacketTooBigMTULinux(self.iface)122 elif re.match('execTimeExceededBadCodeWin', command):123 te = TimeExceeded()124 te.execModuleTimeExceededBadCodeWin(self.iface)125 elif re.match('execTimeExceededBadCodeLinux', command):126 te = TimeExceeded()127 te.execModuleTimeExceededBadCodeLinux(self.iface)128 elif re.match('execTimeExceededHopLimitWin', command):129 te = TimeExceeded()130 te.execModuleTimeExceededHopLimitWin(self.iface)131 elif re.match('execTimeExceededHopLimitLinux', command):132 te = TimeExceeded()133 te.execModuleTimeExceededHopLimitLinux(self.iface)134 elif re.match('execTimeExceededFragmentReassemblyWin', command):135 te = TimeExceeded()136 te.execModuleTimeExceededFragmentReassemblyWin(self.iface)137 elif re.match('execTimeExceededFragmentReassemblyLinux', command):138 te = TimeExceeded()139 te.execModuleTimeExceededFragmentReassemblyLinux(self.iface)140 elif re.match('execTimeExceededLengthWin', command):141 te = TimeExceeded()142 te.execModuleTimeExceededLengthWin(self.iface)143 elif re.match('execTimeExceededLengthLinux', command):144 te = TimeExceeded()145 te.execModuleTimeExceededLengthLinux(self.iface)146 elif re.match('execParameterProblemBadCodeWin', command):147 pp = ParameterProblem()148 pp.execModuleParameterProblemBadCodeWin(self.iface)149 elif re.match('execParameterProblemBadCodeLinux', command):150 pp = ParameterProblem()151 pp.execModuleParameterProblemBadCodeLinux(self.iface)152 elif re.match('execParameterProblemFloodPointerWin', command):153 pp = ParameterProblem()154 pp.execModuleParameterProblemFloodPointerWin(self.iface)155 elif re.match('execParameterProblemFloodPointerLinux', command):156 pp = ParameterProblem()157 pp.execModuleParameterProblemFloodPointerLinux(self.iface)158 elif re.match('execParameterProblemFloodHighPointerWin', command):159 pp = ParameterProblem()160 pp.execModuleParameterProblemFloodHighPointerWin(self.iface)161 elif re.match('execParameterProblemFloodHighPointerLinux', command):162 pp = ParameterProblem()163 pp.execModuleParameterProblemFloodHighPointerLinux(self.iface)164 elif re.match('execParameterProblemErrHeaderWin', command):165 pp = ParameterProblem()166 pp.execModuleParameterProblemErrHeaderWin(self.iface)167 elif re.match('execParameterProblemErrHeaderLinux', command):168 pp = ParameterProblem()169 pp.execModuleParameterProblemErrHeaderLinux(self.iface)170 elif re.match('execParameterProblemUnrecHeaderWin', command):171 pp = ParameterProblem()172 pp.execModuleParameterProblemUnrecHeaderWin(self.iface)173 elif re.match('execParameterProblemUnrecHeaderLinux', command):174 pp = ParameterProblem()175 pp.execModuleParameterProblemUnrecHeaderLinux(self.iface)176 elif re.match('execParameterProblemUnrecIPOptionWin', command):177 pp = ParameterProblem()178 pp.execModuleParameterProblemUnrecIPOptionrWin(self.iface)179 elif re.match('execParameterProblemUnrecIPOptionLinux', command):180 pp = ParameterProblem()181 pp.execModuleParameterProblemUnrecIPOptionLinux(self.iface)182 elif re.match('execEchoRequestNeighCacheExhaustionDstVictimWin', command):183 er = EchoRequest()184 er.execModuleEchoRequestNeighCacheExhaustionDstVictimWin(self.iface)185 elif re.match('execEchoRequestNeighCacheExhaustionDstVictimLinux', command):186 er = EchoRequest()187 er.execModuleEchoRequestNeighCacheExhaustionDstVictimLinux(self.iface)188 elif re.match('execEchoRequestNeighCacheExhaustionSrcVictimWin', command):189 er = EchoRequest()190 er.execModuleEchoRequestNeighCacheExhaustionSrcVictimWin(self.iface)191 elif re.match('execEchoRequestNeighCacheExhaustionSrcVictimLinux', command):192 er = EchoRequest()193 er.execModuleEchoRequestNeighCacheExhaustionSrcVictimLinux(self.iface)194 elif re.match('execEchoReplyRemoteWin', command):195 er = EchoReply()196 er.execModuleEchoReplyWin(self.iface)197 elif re.match('execEchoReplyRemoteLinux', command):198 er = EchoReply()199 er.execModuleEchoReplyWin(self.iface)200 201 def showHelp(self):202 for entry in Help.getInfoAndErrorAttacksHelp():...

Full Screen

Full Screen

destinationUnreach.py~

Source:destinationUnreach.py~ Github

copy

Full Screen

1#!/usr/bin/python2from scapy.all import *3"""4the class build Destination Unreachable messages5"""6class DestinationUnreach:7 8 def __init__(self):9 print 'Destination Unreachable'10 self.win = "2001:abcd:acad:2:b485:2aec:9447:fd83"11 self.linux = "2001:abcd:acad:2:a00:27ff:fe84:bb37"12 self.attacker = "2001:abcd:acad:1::2"13 self.firewall = "2001:abcd:acad:2::1"14 def buildPacketDestUnreach(self, ipAdr, code):15 data = "abcdefghijklmnopqrstuvwabcdefghi"16 return IPv6(dst=ipAdr,src=self.firewall)/ICMPv6DestUnreach(code=code)/IPv6(dst=self.firewall,src=ipAdr,hlim=128)/ICMPv6EchoRequest(id=0,seq=0)/data17 18 def execModuleDestUnreachCode0(self, exitIface, ipAdr):19 packetContainer = self.buildPacketDestUnreach(ipAdr, 0)20 send(packetContainer, iface=exitIface, verbose=False)21 def execModuleDestUnreachCode1(self, exitIface, ipAdr):22 packetContainer = self.buildPacketDestUnreach(ipAdr, 1)23 send(packetContainer, iface=exitIface, verbose=False)24 def execModuleDestUnreachCode2(self, exitIface, ipAdr):25 packetContainer = self.buildPacketDestUnreach(ipAdr, 2)26 send(packetContainer, iface=exitIface, verbose=False)27 def execModuleDestUnreachCode3(self, exitIface, ipAdr):28 packetContainer = self.buildPacketDestUnreach(ipAdr, 3)29 send(packetContainer, iface=exitIface, verbose=False)30 def execModuleDestUnreachCode4(self, exitIface, ipAdr):31 packetContainer = self.buildPacketDestUnreach(ipAdr, 4)32 send(packetContainer, iface=exitIface, verbose=False)33 def execModuleDestUnreachCode5(self, exitIface, ipAdr):34 packetContainer = self.buildPacketDestUnreach(ipAdr, 5)35 send(packetContainer, iface=exitIface, verbose=False)36 def execModuleDestUnreachCode6(self, exitIface, ipAdr):37 packetContainer = self.buildPacketDestUnreach(ipAdr, 6)38 send(packetContainer, iface=exitIface, verbose=False)39 40 def execAllLinux(self, exitIface):41 self.execModuleDestUnreachCode0(exitIface, self.linux)42 self.execModuleDestUnreachCode1(exitIface, self.linux)43 self.execModuleDestUnreachCode2(exitIface, self.linux)44 self.execModuleDestUnreachCode3(exitIface, self.linux)45 self.execModuleDestUnreachCode4(exitIface, self.linux)46 self.execModuleDestUnreachCode5(exitIface, self.linux)47 self.execModuleDestUnreachCode6(exitIface, self.linux)48 def execAllWindows(self, exitIface):49 self.execModuleDestUnreachCode0(exitIface, self.win)50 self.execModuleDestUnreachCode1(exitIface, self.win)51 self.execModuleDestUnreachCode2(exitIface, self.win)52 self.execModuleDestUnreachCode3(exitIface, self.win)53 self.execModuleDestUnreachCode4(exitIface, self.win)54 self.execModuleDestUnreachCode5(exitIface, self.win)55 self.execModuleDestUnreachCode6(exitIface, self.win)56 def execDestUnreachBadCodeWin(self,exitIface):57 for code in range(7,256):58 packetContainer = self.buildPacketDestUnreach(self.win, code)59 send(packetContainer, iface=exitIface, verbose=False)60 def execDestUnreachBadCodeLinux(self,exitIface):61 for code in range(7,256):62 packetContainer = self.buildPacketDestUnreach(self.linux, code)63 send(packetContainer, iface=exitIface, verbose=False)64 def execDestUnreachLengthLinux(self, exitIface):65 data = "abcdefghijklmnopqrstuvwabcdefghi"66 for length in range(0,256):67 packet = IPv6(dst=self.linux,src=self.firewall)/ICMPv6DestUnreach(code=0,length=length)/IPv6(dst=self.firewall,src=self.linux,hlim=64)68 send(packet, iface=exitIface, verbose=False)69 def execDestUnreachLengthWin(self, exitIface):70 data = "abcdefghijklmnopqrstuvwabcdefghi"71 for length in range(0,256):72 packet = IPv6(dst=self.win,src=self.firewall)/ICMPv6DestUnreach(code=0,length=length)/IPv6(dst=self.firewall,src=self.win,hlim=128)73 send(packet, iface=exitIface, verbose=False)74 def execDestUnreachNoRouteToDestWin(self, exitIface):75 data = "abcdefghijklmnopqrstuvwabcdefghi"76 for x in range(0,500):77 packet = IPv6(dst=self.win,src=self.attacker)/ICMPv6DestUnreach(code=0)/IPv6(dst=self.attacker,src=self.win,hlim=128)/ICMPv6EchoRequest(id=0,seq=1)/data78 send(packet, iface=exitIface, verbose=False)79 def execDestUnreachNoRouteToDestLinux(self, exitIface):80 data = "abcdefghijklmnopqrstuvwabcdefghi"81 for x in range(0,500):82 packet = IPv6(dst=self.linux,src=self.attacker)/ICMPv6DestUnreach(code=0)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/ICMPv6EchoRequest(id=0,seq=1)/data83 send(packet, iface=exitIface, verbose=False)84 def execDestUnreachAdrUnreachWin(self, exitIface):85 for x in range(0,500):86 packet = IPv6(dst=self.win,src=self.attacker)/ICMPv6DestUnreach(code=3)/IPv6(dst=self.attacker,src=self.win,hlim=128)/TCP(dport=80,flags="S")87 send(packet, iface=exitIface, verbose=False)88 def execDestUnreachAdrUnreachLinux(self, exitIface):89 for x in range(0,500):90 packet = IPv6(dst=self.linux,src=self.attacker)/ICMPv6DestUnreach(code=3)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/TCP(dport=80,flags="S")91 send(packet, iface=exitIface, verbose=False)92 def execDestUnreachPortUnreachWin(self, exitIface):93 for x in range(0,500):94 packet = IPv6(dst=self.win,src=self.attacker)/ICMPv6DestUnreach(code=4)/IPv6(dst=self.attacker,src=self.win,hlim=128)/TCP(dport=80,flags="S")95 send(packet, iface=exitIface, verbose=False)96 def execDestUnreachPortUnreachLinux(self, exitIface):97 for x in range(0,500):98 packet = IPv6(dst=self.linux,src=self.attacker)/ICMPv6DestUnreach(code=4)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/TCP(dport=80,flags="S")99 send(packet, iface=exitIface, verbose=False)100 def execDestUnreachCommDstAdminProhibitedWin(self, exitIface):101 for x in range(0,500):102 packet = IPv6(dst=self.win,src=self.firewall)/ICMPv6DestUnreach(code=1)/IPv6(dst=self.attacker,src=self.win,hlim=128)/TCP(dport=80,sport=49255,flags="S")103 send(packet, iface=exitIface, verbose=False)104 def execDestUnreachCommDstAdminProhibitedLinux(self, exitIface):105 for x in range(0,500):106 packet = IPv6(dst=self.linux,src=self.firewall)/ICMPv6DestUnreach(code=1)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/TCP(dport=80,sport=49255,flags="S")107 send(packet, iface=exitIface, verbose=False)108 def execDestUnreachBeyondScopeSrcAdrWin(self, exitIface):109 for x in range(0,500):110 packet = IPv6(dst=self.win,src=self.firewall)/ICMPv6DestUnreach(code=2)/IPv6(dst=self.attacker,src=self.win,hlim=128)/TCP(dport=80,sport=49255,flags="S")111 send(packet, iface=exitIface, verbose=False)112 def execDestUnreachBeyondScopeSrcAdrLinux(self, exitIface):113 for x in range(0,500):114 packet = IPv6(dst=self.linux,src=self.firewall)/ICMPv6DestUnreach(code=2)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/TCP(dport=80,sport=49255,flags="S")115 send(packet, iface=exitIface, verbose=False)116 def execDestUnreachSrcFailedPolicyWin(self, exitIface):117 for x in range(0,500):118 packet = IPv6(dst=self.win,src=self.firewall)/ICMPv6DestUnreach(code=5)/IPv6(dst=self.attacker,src=self.win,hlim=128)/TCP(dport=80,sport=49255,flags="S")119 send(packet, iface=exitIface, verbose=False)120 def execDestUnreachSrcFailedPolicyLinux(self, exitIface):121 for x in range(0,500):122 packet = IPv6(dst=self.linux,src=self.firewall)/ICMPv6DestUnreach(code=5)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/TCP(dport=80,sport=49255,flags="S")123 send(packet, iface=exitIface, verbose=False)124 def execDestUnreachRejectRouteWin(self, exitIface):125 data = "abcdefghijklmnopqrstuvwabcdefghi"126 for x in range(0,500):127 packet = IPv6(dst=self.win,src=self.firewall)/ICMPv6DestUnreach(code=6)/IPv6(dst=self.attacker,src=self.win,hlim=128)/ICMPv6EchoRequest(id=0,seq=1)/data128 send(packet, iface=exitIface, verbose=False)129 def execDestUnreachRejectRouteLinux(self, exitIface):130 data = "abcdefghijklmnopqrstuvwabcdefghi"131 for x in range(0,500):132 packet = IPv6(dst=self.linux,src=self.firewall)/ICMPv6DestUnreach(code=6)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/ICMPv6EchoRequest(id=0,seq=1)/data133 send(packet, iface=exitIface, verbose=False)...

Full Screen

Full Screen

destinationUnreach.py

Source:destinationUnreach.py Github

copy

Full Screen

1#!/usr/bin/python2from scapy.all import *3"""4the class build Destination Unreachable messages5"""6class DestinationUnreach:7 8 def __init__(self):9 print 'Destination Unreachable'10 self.win = "2001:abcd:acad:2:b485:2aec:9447:fd83"11 self.linux = "2001:abcd:acad:2:a00:27ff:fe84:bb37"12 self.attacker = "2001:abcd:acad:1::2"13 self.firewall = "2001:abcd:acad:2::1"14 def buildPacketDestUnreach(self, ipAdr, code):15 data = "abcdefghijklmnopqrstuvwabcdefghi"16 return IPv6(dst=ipAdr,src=self.firewall)/ICMPv6DestUnreach(code=code)/IPv6(dst=self.firewall,src=ipAdr,hlim=128)/ICMPv6EchoRequest(id=0,seq=0)/data17 18 def execModuleDestUnreachCode0(self, exitIface, ipAdr):19 packetContainer = self.buildPacketDestUnreach(ipAdr, 0)20 send(packetContainer, iface=exitIface, verbose=False)21 def execModuleDestUnreachCode1(self, exitIface, ipAdr):22 packetContainer = self.buildPacketDestUnreach(ipAdr, 1)23 send(packetContainer, iface=exitIface, verbose=False)24 def execModuleDestUnreachCode2(self, exitIface, ipAdr):25 packetContainer = self.buildPacketDestUnreach(ipAdr, 2)26 send(packetContainer, iface=exitIface, verbose=False)27 def execModuleDestUnreachCode3(self, exitIface, ipAdr):28 packetContainer = self.buildPacketDestUnreach(ipAdr, 3)29 send(packetContainer, iface=exitIface, verbose=False)30 def execModuleDestUnreachCode4(self, exitIface, ipAdr):31 packetContainer = self.buildPacketDestUnreach(ipAdr, 4)32 send(packetContainer, iface=exitIface, verbose=False)33 def execModuleDestUnreachCode5(self, exitIface, ipAdr):34 packetContainer = self.buildPacketDestUnreach(ipAdr, 5)35 send(packetContainer, iface=exitIface, verbose=False)36 def execModuleDestUnreachCode6(self, exitIface, ipAdr):37 packetContainer = self.buildPacketDestUnreach(ipAdr, 6)38 send(packetContainer, iface=exitIface, verbose=False)39 40 def execAllLinux(self, exitIface):41 self.execModuleDestUnreachCode0(exitIface, self.linux)42 self.execModuleDestUnreachCode1(exitIface, self.linux)43 self.execModuleDestUnreachCode2(exitIface, self.linux)44 self.execModuleDestUnreachCode3(exitIface, self.linux)45 self.execModuleDestUnreachCode4(exitIface, self.linux)46 self.execModuleDestUnreachCode5(exitIface, self.linux)47 self.execModuleDestUnreachCode6(exitIface, self.linux)48 def execAllWindows(self, exitIface):49 self.execModuleDestUnreachCode0(exitIface, self.win)50 self.execModuleDestUnreachCode1(exitIface, self.win)51 self.execModuleDestUnreachCode2(exitIface, self.win)52 self.execModuleDestUnreachCode3(exitIface, self.win)53 self.execModuleDestUnreachCode4(exitIface, self.win)54 self.execModuleDestUnreachCode5(exitIface, self.win)55 self.execModuleDestUnreachCode6(exitIface, self.win)56 def execDestUnreachBadCodeWin(self,exitIface):57 for code in range(7,256):58 packetContainer = self.buildPacketDestUnreach(self.win, code)59 send(packetContainer, iface=exitIface, verbose=False)60 def execDestUnreachBadCodeLinux(self,exitIface):61 for code in range(7,256):62 packetContainer = self.buildPacketDestUnreach(self.linux, code)63 send(packetContainer, iface=exitIface, verbose=False)64 def execDestUnreachLengthLinux(self, exitIface):65 data = "abcdefghijklmnopqrstuvwabcdefghi"66 for length in range(0,256):67 packet = IPv6(dst=self.linux,src=self.firewall)/ICMPv6DestUnreach(code=0,length=length)/IPv6(dst=self.firewall,src=self.linux,hlim=64)68 send(packet, iface=exitIface, verbose=False)69 def execDestUnreachLengthWin(self, exitIface):70 data = "abcdefghijklmnopqrstuvwabcdefghi"71 for length in range(0,256):72 packet = IPv6(dst=self.win,src=self.firewall)/ICMPv6DestUnreach(code=0,length=length)/IPv6(dst=self.firewall,src=self.win,hlim=128)73 send(packet, iface=exitIface, verbose=False)74 def execDestUnreachNoRouteToDestWin(self, exitIface):75 data = "abcdefghijklmnopqrstuvwabcdefghi"76 for x in range(0,50):77 packet = IPv6(dst=self.win,src=self.attacker)/ICMPv6DestUnreach(code=0)/IPv6(dst=self.attacker,src=self.win,hlim=128)/ICMPv6EchoRequest(id=0,seq=1)/data78 send(packet, iface=exitIface, verbose=False)79 def execDestUnreachNoRouteToDestLinux(self, exitIface):80 data = "abcdefghijklmnopqrstuvwabcdefghi"81 for x in range(0,50):82 packet = IPv6(dst=self.linux,src=self.attacker)/ICMPv6DestUnreach(code=0)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/ICMPv6EchoRequest(id=0,seq=1)/data83 send(packet, iface=exitIface, verbose=False)84 def execDestUnreachAdrUnreachWin(self, exitIface):85 for x in range(0,50):86 packet = IPv6(dst=self.win,src=self.attacker)/ICMPv6DestUnreach(code=3)/IPv6(dst=self.attacker,src=self.win,hlim=128)/TCP(dport=80,flags="S")87 send(packet, iface=exitIface, verbose=False)88 def execDestUnreachAdrUnreachLinux(self, exitIface):89 for x in range(0,50):90 packet = IPv6(dst=self.linux,src=self.attacker)/ICMPv6DestUnreach(code=3)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/TCP(dport=80,flags="S")91 send(packet, iface=exitIface, verbose=False)92 def execDestUnreachPortUnreachWin(self, exitIface):93 for x in range(0,50):94 packet = IPv6(dst=self.win,src=self.attacker)/ICMPv6DestUnreach(code=4)/IPv6(dst=self.attacker,src=self.win,hlim=128)/TCP(dport=80,flags="S")95 send(packet, iface=exitIface, verbose=False)96 def execDestUnreachPortUnreachLinux(self, exitIface):97 for x in range(0,50):98 packet = IPv6(dst=self.linux,src=self.attacker)/ICMPv6DestUnreach(code=4)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/TCP(dport=80,flags="S")99 send(packet, iface=exitIface, verbose=False)100 def execDestUnreachCommDstAdminProhibitedWin(self, exitIface):101 for x in range(0,50):102 packet = IPv6(dst=self.win,src=self.firewall)/ICMPv6DestUnreach(code=1)/IPv6(dst=self.attacker,src=self.win,hlim=128)/TCP(dport=80,sport=49255,flags="S")103 send(packet, iface=exitIface, verbose=False)104 def execDestUnreachCommDstAdminProhibitedLinux(self, exitIface):105 for x in range(0,50):106 packet = IPv6(dst=self.linux,src=self.firewall)/ICMPv6DestUnreach(code=1)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/TCP(dport=80,sport=49255,flags="S")107 send(packet, iface=exitIface, verbose=False)108 def execDestUnreachBeyondScopeSrcAdrWin(self, exitIface):109 for x in range(0,50):110 packet = IPv6(dst=self.win,src=self.firewall)/ICMPv6DestUnreach(code=2)/IPv6(dst=self.attacker,src=self.win,hlim=128)/TCP(dport=80,sport=49255,flags="S")111 send(packet, iface=exitIface, verbose=False)112 def execDestUnreachBeyondScopeSrcAdrLinux(self, exitIface):113 for x in range(0,50):114 packet = IPv6(dst=self.linux,src=self.firewall)/ICMPv6DestUnreach(code=2)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/TCP(dport=80,sport=49255,flags="S")115 send(packet, iface=exitIface, verbose=False)116 def execDestUnreachSrcFailedPolicyWin(self, exitIface):117 for x in range(0,500):118 packet = IPv6(dst=self.win,src=self.firewall)/ICMPv6DestUnreach(code=5)/IPv6(dst=self.attacker,src=self.win,hlim=128)/TCP(dport=80,sport=49255,flags="S")119 send(packet, iface=exitIface, verbose=False)120 def execDestUnreachSrcFailedPolicyLinux(self, exitIface):121 for x in range(0,50):122 packet = IPv6(dst=self.linux,src=self.firewall)/ICMPv6DestUnreach(code=5)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/TCP(dport=80,sport=49255,flags="S")123 send(packet, iface=exitIface, verbose=False)124 def execDestUnreachRejectRouteWin(self, exitIface):125 data = "abcdefghijklmnopqrstuvwabcdefghi"126 for x in range(0,50):127 packet = IPv6(dst=self.win,src=self.firewall)/ICMPv6DestUnreach(code=6)/IPv6(dst=self.attacker,src=self.win,hlim=128)/ICMPv6EchoRequest(id=0,seq=1)/data128 send(packet, iface=exitIface, verbose=False)129 def execDestUnreachRejectRouteLinux(self, exitIface):130 data = "abcdefghijklmnopqrstuvwabcdefghi"131 for x in range(0,50):132 packet = IPv6(dst=self.linux,src=self.firewall)/ICMPv6DestUnreach(code=6)/IPv6(dst=self.attacker,src=self.linux,hlim=64)/ICMPv6EchoRequest(id=0,seq=1)/data133 send(packet, iface=exitIface, verbose=False)...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run fMBT automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful