This repository contains two separate machine learning projects developed as part of a university course. Each phase addresses a different problem and demonstrates the application of core machine learning concepts, including data preprocessing, model training, and evaluation.
This repository presents a two-phase machine learning project focused on network threat detection and classification. The project demonstrates the progression from a basic detection system to a more advanced and granular attack classification model.
In Phase 1, a binary classification model was developed to determine whether a network connection is normal or malicious, serving as a foundational intrusion detection system.
In Phase 2, the model was extended into a multiclass classification system capable of identifying specific types of cyberattacks, including DDoS, DoS, Reconnaissance, Man-in-the-Middle (MITM), and Mirai attacks.
Together, both phases showcase the application of machine learning techniques in cybersecurity, covering data preprocessing, model development, and performance evaluation across increasingly complex problem settings.
Design a system to detect whether a network connection is safe (normal) or dangerous (anomaly) based on data collected from a military network. The data initially included only anomalies, which posed challenges due to class imbalance.
- Data cleaning and preprocessing
- Feature selection / engineering
- Model training
- Performance evaluation
In this phase, the goal was to detect not just if the connection is malicious, but also to classify the type of attack into one of the following:
- BenignTraffic
- DDoS
- DoS
- Recon
- MITM
- Mirai
- Dataset preparation
- Model building
- Hyperparameter tuning (if applicable)
- Evaluation and analysis
- Python
- Jupyter Notebook
- NumPy
- Pandas
- Scikit-learn
- Matplotlib / Seaborn
.
├── phase1.ipynb
├── phase2.ipynb
└── README.md
- Clone the repository:
git clone https://github.com/Nour1512/Machine-Learning-Cybersecurity-Anomaly-Detection.git
cd ml-project- Install dependencies:
pip install numpy pandas scikit-learn matplotlib seaborn- Open the notebooks:
jupyter notebook- Applied machine learning workflows end-to-end
- Gained experience with different types of ML problems
- Practiced model evaluation and comparison
- Improved data preprocessing and feature engineering skills
- Model optimization and tuning
- Deployment as a web application
- Experiment tracking (e.g., MLflow)
- Adding more datasets and problems