Cybersecurity
Phishing URL Detection Using Machine Learning
Classify website URLs with XGBoost and display predictions through a simple Flask interface.
Project overview
This cybersecurity project combines an XGBoost classifier with a Flask web application to assess whether a submitted URL resembles phishing or legitimate examples. The workflow includes labelled data preparation, feature cleanup, class balancing with SMOTE, model training, and evaluation. Users enter a URL and receive a predicted class with a model confidence score. The project demonstrates how machine learning can support URL risk screening, while recognizing that a prediction or confidence score cannot guarantee website safety.
Best suited for: B.E. / B.Tech / BCA / MCA students interested in cybersecurity, machine learning, and Python web applications.
Tech stack
Objectives
- Prepare labelled URL features for phishing classification.
- Train and evaluate an XGBoost model with class balancing and tuning.
- Make predictions accessible through a straightforward web interface.
Key modules
- Dataset preparation and feature cleanup
- Training data balancing with SMOTE
- XGBoost training and hyperparameter tuning
- Early stopping and model evaluation
- URL submission and prediction display
Key features
- URL classification as phishing or legitimate
- Model confidence score alongside each prediction
- Browser-based URL submission form
- Training and evaluation workflow for labelled data
Deliverables
- Flask web application and model training code
- Trained classifier and feature preparation workflow
- Evaluation results and sample prediction cases
- Project report with setup instructions and limitations
Learning outcomes
- Apply gradient boosting to a cybersecurity classification problem.
- Handle class imbalance and keep evaluation data separate from training.
- Connect a trained model to a web interface and explain prediction uncertainty.