Skip to content

MABDULAHAD-HUB/PacketVision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” Packet Vision

Advanced Network Packet Capturing & Anomaly Detection Tool
Real-time traffic analysis powered by Python, Scapy, PyQt5, and Matplotlib.


๐ŸŽฌ Quick Demo

Packet Vision Demo See Packet Vision in action - from capture to analysis in real-time


๐Ÿ“Œ About the Project

Packet Vision is a Python-powered desktop tool that captures, filters, and visualizes live network packets. Designed with a sleek PyQt5 GUI, it supports real-time traffic inspection, anomaly detection using statistical thresholds, and seamless PCAP export for advanced analysis in tools like Wireshark.

Whether you're a cybersecurity student, network engineer, or penetration tester, this tool offers an efficient and accessible way to peek inside your network traffic.

โœจ Key Features

  • ๐Ÿ“ก Live Packet Capture with Scapy and BPF filtering
  • ๐ŸŽ›๏ธ Modern GUI built using PyQt5 with intuitive controls
  • ๐Ÿง  Statistical Anomaly Detection with real-time visualization
  • ๐Ÿ” Detailed Packet Analysis: Multi-layer protocol inspection
  • ๐ŸŽจ Color-Coded Protocols: Easy visual identification of traffic types
  • ๐Ÿ—‚๏ธ PCAP Export: Save captured data for use with Wireshark
  • ๐Ÿ“Š Graphical Representation: Real-time anomaly graph plotting
  • ๐Ÿงญ Navigation Controls: Browse packets with First/Previous/Next/Last
  • ๐Ÿ›ก๏ธ Security Assessment: Automatic protocol security evaluation
  • ๐Ÿ“š Built-in Help System: Complete user guide and shortcuts

๐Ÿงฐ Tech Stack

Component Tool/Library Purpose
Language Python 3.6+ Core development
GUI Framework PyQt5 User interface
Packet Capture Scapy Network packet processing
Stats/Analysis NumPy Statistical computations
Visualization Matplotlib Real-time graphs
Export Format PCAP Wireshark compatibility

โš ๏ธ Important: Install Packet Capture Dependencies

Before installing Packet Vision, you MUST install the following system dependencies:

Windows Users:

Linux Users:

sudo apt-get install tcpdump

Note: Without these dependencies, packet capture will not work and you'll get import errors.

๐Ÿ› ๏ธ Installation Guide

Step 1: Clone the Repository

https://github.com/MABDULAHAD-HUB/PacketVision.git
cd PacketVision

Step 2: Create Virtual Environment

Windows:

python -m venv venv
venv\Scripts\activate

Linux:

python3 -m venv venv
source venv/bin/activate

Step 3: Install Dependencies

pip install PyQt5 scapy matplotlib numpy

Step 4: Run the Application

python CODE.py

๐Ÿ“˜ User Guide

๐Ÿš€ Getting Started

  1. Launch the Application

    • Run python CODE.py from the terminal
    • The main window will open with all controls visible
  2. Start Packet Capture

    • Click the โ–ถ๏ธ START button to begin capturing packets
    • Packets will appear in real-time in the main table
  3. Stop Packet Capture

    • Click the โน๏ธ STOP button to halt packet capture
    • Use RESTART to clear all data and start fresh

๐Ÿ” Filtering Packets

Basic Filtering:

  • Protocol Filter: Select from dropdown (All, TCP, UDP, ICMP)
  • Port Filter: Enter specific port numbers (e.g., "80", "443")
  • Custom Filter: Advanced BPF filters (e.g., "host 8.8.8.8")

Apply Filters:

  1. Set your desired filters before starting capture, OR
  2. Use Filter Table button to filter already captured packets

Filter Examples:

Protocol: TCP + Port: 443 = Capture only HTTPS traffic
Custom: "host google.com" = Capture traffic to/from Google
Custom: "port 53" = Capture all DNS traffic

๐Ÿ“Š Understanding the Interface

Main Packet Table Columns:

  • Time: When the packet was captured
  • Protocol: Network protocol (TCP/HTTP, UDP/DNS, etc.)
  • Flags: TCP flags (SYN, ACK, FIN, etc.)
  • TTL: Time to Live (helps identify OS)
  • Direction: Traffic flow (LOCAL, IN, OUT, EXT)
  • Source: Origin IP address
  • Destination: Target IP address
  • Ports: Source โ†’ Destination ports
  • Length: Packet size in bytes
  • Info: Detailed protocol information

Color Coding System:

  • ๐ŸŸข Green (TCP): General TCP traffic
  • ๐Ÿ”ต Blue (UDP): General UDP traffic
  • ๐ŸŸ  Orange (ICMP): Ping and network control
  • ๐ŸŸฃ Purple (HTTP): Unencrypted web traffic โš ๏ธ
  • ๐ŸŸก Yellow (HTTPS): Encrypted web traffic โœ…
  • ๐Ÿ”ท Cyan (DNS): Domain name lookups
  • โšซ Gray (Others): Unknown protocols
  • ๐Ÿ”ด Red (Anomalous): Suspicious traffic patterns

๐Ÿ” Packet Analysis

View Packet Details:

  1. Click on any packet in the main table

  2. Details Panel shows structured analysis:

    • ๐Ÿ•’ Timing information
    • ๐ŸŒ Network layer (IP)
    • ๐Ÿ”— Transport layer (TCP/UDP/ICMP)
    • ๐Ÿ“ฑ Application layer services
    • ๐Ÿ”’ Security assessment
  3. Bytes Panel shows raw packet data in hexadecimal

Navigation:

  • โฎ๏ธ First: Jump to first packet
  • โช Previous: Go to previous packet
  • โฉ Next: Go to next packet
  • โญ๏ธ Last: Jump to last packet

๐Ÿšจ Anomaly Detection

Start Anomaly Detection:

  1. Capture some packets first
  2. Go to Anomaly Detection โ†’ Detect Anomalies
  3. Real-time graph window opens showing traffic patterns

Understanding the Graph:

  • ๐Ÿ”ต Blue Bars: Normal traffic (below threshold)
  • ๐Ÿ”ด Red Bars: Anomalous traffic (above threshold)
  • ๐Ÿ“ Red Dashed Line: DDoS threshold (50 packets)
  • ๐Ÿ“ Letters (A, B, C...): Anonymized IP addresses
  • ๐Ÿ“‹ Gray Box: IP mapping legend on right side

Anomaly Controls:

  • Stop Real-time Detection: Pause the live updates
  • Clear Graph: Reset the anomaly visualization

๐Ÿ’พ Saving Your Work

Export to PCAP:

  1. Go to File โ†’ Save PCAP
  2. Choose location and filename
  3. File can be opened in Wireshark for advanced analysis

๐Ÿ“š Help System

Access built-in help through the Help menu:

  • User Guide: Complete feature overview
  • Keyboard Shortcuts: Quick reference
  • About Packet Vision: Version and developer info

๐ŸŽฏ Use Cases

For Students:

  • Learn network protocols (TCP, UDP, ICMP)
  • Understand packet structure and flow
  • Practice network security concepts

For Network Engineers:

  • Monitor real-time network traffic
  • Troubleshoot connectivity issues
  • Analyze protocol distributions

For Security Professionals:

  • Detect suspicious traffic patterns
  • Identify potential DDoS attacks
  • Perform basic network forensics

๐Ÿ”’ Privacy & Security

  • โœ… All analysis performed locally on your machine
  • โœ… No data transmitted to external servers
  • โœ… IP addresses anonymized in anomaly graphs
  • โœ… Captured data stays on your system
  • โš ๏ธ Use responsibly and only on networks you own/have permission to monitor

๐Ÿ‘จโ€๐Ÿ’ป Author

M ABDUL AHAD
๐Ÿ” Cybersecurity Enthusiast & Network Security Specialist

โญ Show Your Support

If this project helped you, please consider giving it a โญ on GitHub!


ยฉ 2025 M ABDUL AHAD - Packet Vision
Making network analysis accessible to everyone

About

Real-time network packet capturing and anomaly detection tool built with Python, Scapy, PyQt5, and Matplotlib.

Resources

License

Stars

Watchers

Forks

Contributors

Languages