Skip to content

iam-salma/phishing-url-detection-ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ Phishing URL Detection

This project implements a robust machine learning model designed to accurately detect phishing URLs by analyzing a diverse set of URL and website features. The goal is to enhance cybersecurity by identifying potentially malicious URLs before they can cause harm.

πŸ“Š Data Description

The input dataset (located in the valid_data/ directory) contains engineered features representing various characteristics of URLs. Each feature is encoded as:

  • 1 β†’ Positive or benign attribute
  • 0 β†’ Neutral or unknown attribute
  • -1 β†’ Negative or suspicious attribute

These feature vectors are used by the model to classify each URL as:

  • 1 β†’ Phishing
  • 0 β†’ Legitimate

πŸ” Project Workflow

  1. Load and preprocess the validated URL feature dataset i.e. valid_data/test.csv
  2. Use a trained machine learning model to assess phishing risk.
  3. Saves predictions to predicted_output/output.csv for review and further analysis.

πŸ“ˆ Insights & Performance Report

  • βœ… Accuracy: ~92%
  • πŸ“Œ Precision and Recall: Over 90%
  • πŸ” Key Predictors: SSL certificate status, URL length, domain registration length
  • πŸ“¦ Handles a broad spectrum of phishing tactics for generalized robustness

This model serves as an automated solution for phishing URL detection, enabling proactive defense in cybersecurity systems.

πŸš€ Deployment

The model and application were containerized and deployed using:

  • Docker: For consistent containerized environment
  • AWS ECR: To store and manage Docker images
  • AWS EC2: As the hosting server to run the container in production

πŸ”§ Setup Steps :

  1. πŸ“₯ Clone the repository :

    git clone https://github.com/iam-salma/CrisisAid-news-and-awareness-website.git
    cd CrisisAid-news-and-awareness-website
  2. 🐍 Make sure you have Python 3 installed. :

    Here’s the official link to install Python 3: πŸ”— https://www.python.org/downloads/

  3. πŸ“¦ Create a virtual environment :

    python -m venv venv
  4. βš™οΈ Activate the virtual environment

    On Windows :

    .\venv\Scripts\activate

    On macOS/Linux :

    source venv/bin/activate
  5. πŸ“Œ Install dependencies :

    pip install -r requirements.txt
  6. πŸ—οΈ Create .env folder to store secrets :

    store your MONGO_DB_URL

  7. πŸƒTo Run the Project:

    python main.py

ENJOY πŸ˜ŠπŸŽ‰

About

detect phishing URLs to enhance online security and predict potential threats

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors