Skip to content

PhishShield is an open-source project aimed at detecting phishing websites using machine learning techniques

License

Notifications You must be signed in to change notification settings

praneeth-katuri/phish-shield

Repository files navigation

PhishShield

PhishShield is a phishing website detector using two ML models (feature-based and text-based).

Datasets

The project utilizes two separate datasets, each tailored for training a specific machine learning model.

Dataset for Feature-based Model

Dataset for Text-based Model

Models

  • Feature-based: Makes prediction based on 29 URL features extracted from the URL.

  • Text-based: Makes predition by analyzing URL text, words used in URL.

  • Both models use pipelines, transformers, and hyperparameter tuning with grid search.

Deployment

  • Backend: Flask app serving prediction endpoints. Disk caching for improving speed.

  • Frontend: Simple HTML/CSS/Bootstrap UI. Enter a URL, get prediction.

Webpage Interface

Image 1 Image 2

Usage

To use the PhishShield, follow these steps:

  1. Clone the repository:

    git clone --depth=1 https://github.com/praneeth-katuri/PhishShield.git
    
  2. Install the required dependencies:

    Python Version: 3.12.3

    pip install -r requirements.txt
    
  3. Run the NLTK setup script:

    python utils/setup_nltk.py
    
  4. Edit .env file and enter your reCAPTCHA Keys and Flask Secret Key

    To generate Flask Secret Key run the below code in terminal and copy the Output key obtained in .env file

    python -c 'import secrets; print(secrets.token_hex(16))'
    
  5. To start the Flask application, run the following command in your terminal:

    python run.py
    
  6. To access the webpage interface, open http://127.0.0.1:5000 in your web browser.

Results

Metrics Evaluated: accuracy, precision, recall, F1-score.

Feature-based Model

Image 1

Text-based Model

Image 2

Contributing

Contributions to this project are welcome! If you have ideas for improvements or new features, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

PhishShield is an open-source project aimed at detecting phishing websites using machine learning techniques

Topics

Resources

License

Stars

Watchers

Forks