ARP Spoofing Detection with Scapy in Python

Goal

The goal of this project is to detect ARP spoofing attacks in a network by sniffing ARP packets. Students will learn how to use Scapy to monitor network traffic and compare real MAC addresses with suspicious ARP replies to identify possible attacks.

Task

Students will:
1️⃣ Write a Python script using Scapy to capture network traffic.
2️⃣ Sniff ARP packets on a specified network interface.
3️⃣ Extract MAC addresses from ARP replies and compare them with real MAC addresses.
4️⃣ Detect ARP spoofing attempts by checking for mismatched MAC addresses.
5️⃣ Trigger an alert ("You are under attack!") when a suspicious ARP reply is detected.
6️⃣ Test the script by running it in a virtual network and observing its behavior.

Learning Outcomes

By completing this project, students will:

✅ Understand how ARP works and why it is vulnerable.
✅ Learn how to sniff network packets using Scapy in Python.
✅ Implement real-time ARP spoofing detection techniques.
✅ Gain hands-on experience with packet analysis and network security.
✅ Develop defensive cybersecurity skills to detect and prevent attacks.