This project aims to build an AI-powered system for capturing and analyzing network traffic to identify malicious activity in real-time. The tool leverages machine learning models and packet analysis to enhance network security.
- Real-Time Packet Analysis: Capture and analyze live network traffic.
- Malware Detection: Use machine learning to classify traffic as "Normal" or "Malicious."
- Custom Dataset Support: Train models with your own labeled datasets for improved accuracy.
- User-Friendly Interface: A Tkinter-based GUI for easy interaction and visualization of results.
git clone https://github.com/username/network_ai.git
cd network_ai
python -m venv .venv
source .venv/bin/activate # For Windows: .venv\Scripts\activate
pip install -r requirements.txt
- Launch the Application:
python live_analyzer.py
- Start Packet Sniffing:
- Click "Start" to capture live network traffic.
- Use "Browse" to analyze a pre-recorded
.pcap
file.
- View Analysis Results:
- The application classifies traffic and displays it in a structured table.
- Use the "Details" section to inspect packet contents.
- Custom Model Training:
- Train your model with labeled datasets like UNSW-NB15 or CICIDS2017.
- Replace the default model file (
trained_model.pkl
) with your trained model.
- Dataset Requirement: For accurate results, use well-labeled datasets. Suggested datasets include:
- Custom Feature Extraction: Modify
feature_extractor.py
to include additional packet features as needed.
- Python Version: 3.7 or higher
- Libraries:
- Refer to the
requirements.txt
file for the complete list.
- Refer to the
.
├── live_analyzer.py # Main application file with the GUI
├── feature_extractor.py # Functions for extracting packet features
├── model_loader.py # Handles loading the pre-trained machine learning model
├── packet_analysis.py # Core packet analysis logic
├── train_model.py # Script for training a custom model
├── requirements.txt # Python dependencies
├── README.md # Project documentation
This project is licensed under the MIT License. See the LICENSE
file for details.
This project was developed as part of a university course assignment. It was created entirely by me with the aim of building a network traffic analysis tool powered by machine learning. However, due to my limited knowledge and experience in this domain, I was unable to fully complete the project. While it is not fully functional, I hope it can serve as a learning resource for others or as a foundation for further development.