HTTP Packet Sniffer in Python

Goal

The goal of this project is to capture and analyze HTTP packets from a network interface to extract useful information such as visited URLs and potential login credentials. This project provides an introduction to packet sniffing and network traffic analysis using Scapy in Python.

Task

Students will:
1️⃣ Use Scapy to capture packets from a specified network interface (eth0).
2️⃣ Extract HTTP requests from intercepted packets.
3️⃣ Retrieve visited URLs from HTTP request headers.
4️⃣ Search for login credentials in raw packet data by identifying username and password fields.
5️⃣ Print results to display detected URLs and possible login information.
6️⃣ Understand network security by learning how data is transmitted over HTTP and why HTTPS is important.

Learning Outcomes

By completing this project, students will:

✅ Learn how packet sniffing works and how to capture network traffic.
✅ Understand HTTP requests, including Host, Path, and login parameters.
✅ Analyze raw packet data for sensitive information like usernames and passwords.
✅ Develop awareness of network security risks and the importance of encryption (HTTPS vs HTTP).
✅ Gain hands-on experience with Scapy for real-world cybersecurity analysis.