Skip to content

Repository files navigation

📡 NetWatch – Network Traffic & Threat Monitor

NetWatch is a networking and cybersecurity web application that captures, analyzes, and visualizes network traffic in real time. Built with Python, Flask, Scapy, SQLite, HTML, CSS, and JavaScript, it provides packet monitoring, protocol analysis, educational threat detection, and traffic visualization through a modern dashboard.


✨ Features

🌐 Live Packet Capture

  • Capture network packets in real time
  • Start and stop packet capture
  • Display:
    • Timestamp
    • Source IP
    • Destination IP
    • Protocol
    • Source Port
    • Destination Port
    • Packet Length

📊 Protocol Analysis

Detect and classify:

  • TCP
  • UDP
  • HTTP
  • HTTPS
  • DNS
  • ICMP
  • ARP

Display protocol statistics with charts.


🚨 Educational Threat Detection

Generate alerts for:

  • High traffic from a single IP
  • Possible port scanning activity
  • Excessive ICMP requests
  • Traffic on uncommon ports

📁 Packet Logs

Store every captured packet in SQLite.

Features include:

  • Search
  • Filter
  • Sort
  • Delete
  • Export CSV

📈 Dashboard

Display:

  • Total Packets
  • TCP Packets
  • UDP Packets
  • HTTP Packets
  • DNS Packets
  • ICMP Packets
  • Recent Alerts

📉 Network Charts

Visualize:

  • Protocol Distribution
  • Packets Over Time
  • Top Source IPs
  • Top Destination IPs

🛠 Technologies Used

  • Python
  • Flask
  • Scapy
  • SQLite
  • HTML5
  • CSS3
  • JavaScript
  • Chart.js

📂 Project Structure

NetWatch/
│
├── app.py
├── packet_capture.py
├── protocol_analyzer.py
├── threat_detector.py
├── database.py
├── models.py
├── requirements.txt
├── README.md
│
├── templates/
│   ├── index.html
│   ├── dashboard.html
│   ├── capture.html
│   ├── packets.html
│   ├── alerts.html
│   └── settings.html
│
├── static/
│   ├── css/
│   ├── js/
│   └── images/
│
└── database.db

⚙ Installation

Clone the repository

git clone https://github.com/yourusername/NetWatch.git

Go into the project

cd NetWatch

Install dependencies

pip install -r requirements.txt

Run the application

python app.py

Open

http://127.0.0.1:5000

🚀 How to Use

Start Monitoring

  1. Open the Capture page.
  2. Select a network interface (if applicable).
  3. Click Start Capture.
  4. Observe packets arriving in real time.

Stop Monitoring

Click Stop Capture to stop packet collection.


View Logs

Navigate to Packet Logs to:

  • Search
  • Filter
  • Export CSV

Dashboard

Monitor:

  • Traffic statistics
  • Protocol distribution
  • Recent alerts
  • Packet counts

📸 Screenshots

Add screenshots inside:

screenshots/
├── home.png
├── dashboard.png
├── capture.png
├── packets.png
├── alerts.png
└── charts.png

🔒 Security Features

  • Live Packet Capture
  • Protocol Analysis
  • Packet Logging
  • Educational Threat Detection
  • Search & Filtering
  • CSV Export
  • Responsive Dashboard

📈 Future Improvements

  • GeoIP location lookup
  • WHOIS integration
  • Live bandwidth monitoring
  • Suspicious IP reputation lookup
  • Email alerts
  • Dark/Light theme
  • PDF report generation
  • Docker support
  • User authentication
  • Multi-interface monitoring

🎯 Learning Outcomes

This project demonstrates:

  • Computer Networking
  • Packet Analysis
  • Network Protocols
  • Traffic Monitoring
  • Threat Detection
  • Data Visualization
  • Flask Development
  • SQLite Database Integration

⚠ Disclaimer

NetWatch is intended for educational purposes and authorized network monitoring only.

Capture and analyze network traffic only on systems and networks that you own or have explicit permission to monitor.


👨‍💻 Author

Aashish S

Bachelor of Engineering (Computer Science)

Networking & Cybersecurity Enthusiast


📄 License

Licensed under the MIT License.

About

A real-time network traffic monitoring and threat detection web application built with Flask, Python, Scapy, SQLite, HTML, CSS, and JavaScript for educational and authorized network analysis.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages