"Pack Sniffer"
This project focuses on developing a packet sniffer to capture and analyze network packets in real-time. It inspects Ethernet frames and identifies various IP and transport layer protocols such as UDP, TCP, and ICMP using a Python script. The project consists of two parts:
- sniffer.py: Captures and dissects network traffic.
- info2.py & selenium1.py: Analyzes UDP packets (particularly DNS requests) and captures screenshots of web pages using Selenium.
This Python script captures and analyzes network traffic:
- Socket Creation: Establishes a socket to capture raw network traffic.
- Traffic Capture: Listens to and captures packets from the network.
- Ethernet Frame Unpacking: Extracts and decodes Ethernet frame information.
- Protocol Analysis: Determines the protocol used (TCP, UDP, ICMP, etc.) and analyzes each packet.
- Output Formatting: Displays packet details such as Ethernet frame, IPv4 packet data, and protocol-specific details like TCP flags or UDP data.
- info2.py: Sniffs UDP traffic (specifically DNS requests) and logs URLs from the packet payloads into a file.
- selenium1.py: Automates the browser using Selenium to take screenshots of the web pages corresponding to the captured URLs.
Install the required library:
pip install socket
Run the script with administrator privileges:
sudo python sniffer.py
While the script is running, generate network traffic by browsing different websites.
Place the folder
snifferin your main user home directory:cd $HOME cd sniffer
Run the following command:
./start.sh
This will install all necessary dependencies and start the program.

Comentarios
Publicar un comentario