Skip to content

About

Phishing URL detection pipeline in Python (scikit-learn + Keras) with ROC/AUC + confusion matrices; reproducible ML evaluation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phishing Website Detection with Machine Learning (Python)

Detect phishing websites by classifying engineered URL feature vectors. This project compares classical ML models against a small neural network baseline and emphasizes reproducibility, evaluation, and security relevance.

Why this matters

Phishing remains a common initial-access vector. This repo demonstrates an ML-based approach to flag suspicious websites using URL-derived indicators and standard evaluation metrics (AUC, ROC curves, confusion matrices).

Getting Started

Prerequisites

Install dependencies using:

pip install -r requirements.txt

Data

This project uses the UCI Phishing Website Dataset.

  1. Download the dataset (CSV format) from Kaggle or the UCI Repository.
  2. Save the file as data/uci-ml-phishing-dataset.csv.

Note: If the dataset is not found, the script will generate dummy data for demonstration purposes. This ensures the pipeline runs out-of-the-box, but the results will be meaningless until real data is provided.

Running the Code

Run the main pipeline:

python main.py

This will train the models, evaluate them, and save plots to docs/images/.

Models

  • Logistic Regression
  • Random Forest
  • k-Nearest Neighbors (k=5)
  • Multilayer Perceptron (Keras)

Results

ROC Curve Comparison

ROC Curve Comparison

Confusion Matrix (Logistic Regression)

Confusion Matrix - Logistic Regression

Project Structure

├── main.py                      # Runs the training + evaluation pipeline (if present)
├── src/                         # Optional CLI scripts (train/evaluate/predict)
├── models/                      # Model training implementations
├── utils/                       # Plotting and helper utilities
├── docs/                        # Writeups + screenshots
├── reports/                     # Metrics summaries and generated outputs
├── data/                        # Local dataset (ignored by git by default)
└── artifacts/                   # Saved models/outputs (ignored by git by default)

About

Phishing URL detection pipeline in Python (scikit-learn + Keras) with ROC/AUC + confusion matrices; reproducible ML evaluation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages