Phishing is one of the most common cyber-attacks targeting users via malicious links. This project leverages various machine learning algorithms to build a predictive model that detects whether a given URL is phishing or legitimate.
⚠️ Real-time web security is critical. This project uses intelligent systems to contribute to safer internet browsing.
The following models were trained and evaluated using a labeled dataset of phishing and legitimate URLs:
Algorithm | Accuracy | Precision | Recall | F1 Score |
---|---|---|---|---|
✅ Random Forest | 97.21% | 0.97 | 0.97 | 0.97 |
✅ Decision Tree | 93.11% | 0.93 | 0.93 | 0.93 |
✅ Logistic Regression | 91.78% | 0.92 | 0.92 | 0.92 |
✅ K-Nearest Neighbors | 89.92% | 0.90 | 0.89 | 0.89 |
✅ Gaussian NB | 87.68% | 0.88 | 0.88 | 0.88 |
✅ SVM | 94.21% | 0.94 | 0.94 | 0.94 |
🏆 Random Forest was the top-performing model and selected for final deployment.
Component | Tech Used |
---|---|
👩💻 Programming | Python 3.9+ |
📚 Libraries | Pandas, NumPy, Scikit-learn, Matplotlib, Seaborn |
🔍 ML Algorithms | Random Forest, Decision Tree, Logistic Regression, KNN, SVM, Gaussian NB |
📁 Dataset | Public phishing URL dataset from Kaggle/UCI |
📓 Environment | Jupyter Notebook |
Url : - https://fake-url-detection-model-2.onrender.com
-
Clone the repository:
git clone https://github.com/avadheshgithub/Fake_URL_Detection-Model.git
-
Navigate to the project directory:
cd Phishing-URL-Detection
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
├── pickle
│ ├── model.pkl
├── static
├── Images
│ ├── Interface.png
├── Result.png
│ ├── styles.css
├── templates
│ ├── index.html
├── Result.html
├── Phishing URL Detection.ipynb
├── Procfile
├── README.md
├── app.py
├── feature.py
├── phishing.csv
├── requirements.txt
- Python/Flask
- Numpy
- Pandas
- Matplotlib
- Scikit learn
- VS Code
Accuracy of various model used for URL detection
ML Model | Accuracy | f1_score | Recall | Precision | |
---|---|---|---|---|---|
0 | Gradient Boosting Classifier | 0.974 | 0.977 | 0.994 | 0.986 |
1 | CatBoost Classifier | 0.972 | 0.975 | 0.994 | 0.989 |
2 | XGBoost Classifier | 0.969 | 0.973 | 0.993 | 0.984 |
3 | Multi-layer Perceptron | 0.969 | 0.973 | 0.995 | 0.981 |
4 | Random Forest | 0.967 | 0.971 | 0.993 | 0.990 |
5 | Support Vector Machine | 0.964 | 0.968 | 0.980 | 0.965 |
6 | Decision Tree | 0.960 | 0.964 | 0.991 | 0.993 |
7 | K-Nearest Neighbors | 0.956 | 0.961 | 0.991 | 0.989 |
8 | Logistic Regression | 0.934 | 0.941 | 0.943 | 0.927 |
9 | Naive Bayes Classifier | 0.605 | 0.454 | 0.292 | 0.997 |
Our Project/system is ready to use
All the best | Thank you