Skip to content

Latest commit

ย 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ AutoPhisNet

Automated Phishing URL Detection & Prevention System

AutoPhisNet is a cybersecurity system designed to detect and prevent phishing websites in real time.

The project combines Machine Learning, URL feature analysis, brand impersonation detection, VirusTotal threat intelligence, browser navigation interception, and risk-based decision making to provide an additional layer of protection against malicious and phishing websites.


๐Ÿš€ Key Features

  • ๐Ÿ” Real-time phishing URL detection
  • ๐Ÿค– Machine Learning-based URL classification
  • ๐Ÿง  Rule-based URL analysis
  • ๐ŸŽฏ Brand impersonation detection
  • ๐ŸŒ VirusTotal threat intelligence integration
  • ๐Ÿšจ Automatic browser navigation monitoring
  • ๐Ÿ›‘ Suspicious and high-risk URL interception
  • โš ๏ธ Dedicated phishing warning page
  • โ†ช๏ธ One-time "Proceed Anyway" bypass
  • ๐Ÿ“Š Security monitoring dashboard
  • ๐Ÿ’พ SQLite-based scan history
  • ๐Ÿงฉ Chrome Manifest V3 extension
  • โšก FastAPI-based backend

๐Ÿ—๏ธ System Architecture

User โ†’ Chrome Extension โ†’ FastAPI Backend
                         โ†“
        URL Features + ML + Brand + VirusTotal
                         โ†“
                    Risk Scoring
                         โ†“
             SAFE / SUSPICIOUS / HIGH_RISK
                         โ†“
              Allow / Warn / Block

๐Ÿ”ฌ How AutoPhisNet Works

User visits website
        โ†“
Browser extension detects navigation
        โ†“
URL sent to FastAPI backend
        โ†“
URL feature extraction
        โ†“
Machine Learning prediction
        โ†“
Brand impersonation analysis
        โ†“
VirusTotal threat intelligence
        โ†“
Risk score calculation
        โ†“
SAFE / SUSPICIOUS / HIGH_RISK

๐Ÿง  Detection Methodology

1. URL Feature Analysis

AutoPhisNet extracts URL characteristics such as:

  • URL length
  • Domain characteristics
  • Number of subdomains
  • Suspicious keywords
  • Special characters
  • IP address usage
  • HTTPS usage
  • Path characteristics
  • Query parameters
  • Domain structure
  • Other phishing-related indicators

2. Machine Learning Detection

AutoPhisNet uses a trained machine learning model to estimate the probability that a URL belongs to a phishing or legitimate category.

The model was trained using the PhiUSIIL Phishing URL Dataset.

Custom URL-based features are extracted before prediction. The ML result is combined with other security signals.

3. Brand Impersonation Detection

AutoPhisNet analyzes suspicious domain names for possible impersonation of known brands.

Example test URL:

https://paypal-login-security.com/verify/account?id=123

Observed result:

Risk Score: 70/100
Verdict: HIGH_RISK
Brand Analysis: paypal (100%)
ML Probability: 100%

4. VirusTotal Threat Intelligence

AutoPhisNet can query VirusTotal for additional threat intelligence. VirusTotal is treated as an additional security signal rather than the sole basis for the final verdict.


๐Ÿšฆ Risk Classification

Verdict Description Action
๐ŸŸข SAFE No significant indicators detected Allow navigation
๐ŸŸก SUSPICIOUS Potentially dangerous indicators detected Show warning
๐Ÿ”ด HIGH_RISK Strong phishing/malicious indicators detected Block navigation

๐Ÿ›‘ Automatic Browser Protection

The Chrome extension monitors main-frame browser navigation.

SAFE

The website is allowed to load normally.

SUSPICIOUS

The user is redirected to the AutoPhisNet warning page.

HIGH_RISK

The navigation is intercepted and the user is shown a high-risk warning page.


โš ๏ธ Warning Page

The AutoPhisNet warning page displays:

  • Risk score
  • Detected URL
  • Detection reasons
  • ML probability
  • Brand analysis
  • VirusTotal information
  • Go Back
  • Proceed Anyway

โ†ช๏ธ One-Time Bypass

The Proceed Anyway option provides a temporary, one-time bypass.

Warning Page
      โ†“
Proceed Anyway
      โ†“
One-Time Bypass
      โ†“
Navigation Allowed
      โ†“
Bypass Removed

The same URL is scanned again during a future navigation.


๐Ÿ“Š Security Dashboard

The dashboard provides:

  • Total scans
  • Safe URLs
  • Suspicious URLs
  • High-risk URLs
  • Scan history
  • Search and filtering
  • Risk distribution
  • Pagination
  • Automatic refresh

Scan information is stored locally using SQLite.


๐Ÿงฉ Browser Extension

AutoPhisNet uses Chrome Extensions Manifest V3.

Main components:

  • background.js โ€” monitors navigation and communicates with the backend
  • popup.html / popup.js โ€” displays scan information and scanner status
  • warning.html / warning.js โ€” displays security warnings
  • manifest.json โ€” extension configuration and permissions

๐Ÿ“ Project Structure

AutoPhisNet/
โ”‚
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ app.py
โ”‚   โ”œโ”€โ”€ scanner.py
โ”‚   โ”œโ”€โ”€ train_model.py
โ”‚   โ”œโ”€โ”€ prepare_dataset.py
โ”‚   โ”œโ”€โ”€ evaluate_model.py
โ”‚   โ”œโ”€โ”€ ml_features.py
โ”‚   โ”œโ”€โ”€ test_scanner.py
โ”‚   โ”œโ”€โ”€ download_dataset.py
โ”‚   โ””โ”€โ”€ requirements.txt
โ”‚
โ”œโ”€โ”€ extension/
โ”‚   โ”œโ”€โ”€ background.js
โ”‚   โ”œโ”€โ”€ manifest.json
โ”‚   โ”œโ”€โ”€ popup.html
โ”‚   โ”œโ”€โ”€ popup.js
โ”‚   โ”œโ”€โ”€ warning.html
โ”‚   โ””โ”€โ”€ warning.js
โ”‚
โ”œโ”€โ”€ dashboard/
โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ””โ”€โ”€ dashboard.js
โ”‚
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ PROJECT_NOTES.md
โ””โ”€โ”€ README.md

โš™๏ธ Installation

Requirements

  • Windows 10/11
  • Python 3.10 or newer
  • Google Chrome
  • Git
  • Internet connection
  • VirusTotal API key (optional)

Check Python:

python --version

Check Git:

git --version

1. Clone the Repository

git clone https://github.com/Maverickk96/AutoPhisNet.git
cd AutoPhisNet

2. Create a Python Virtual Environment

python -m venv backend\.venv

3. Activate the Virtual Environment

backend\.venv\Scripts\activate

You should see (.venv) in your terminal prompt.

4. Upgrade pip

python -m pip install --upgrade pip

5. Install Dependencies

pip install -r backend\requirements.txt

๐Ÿ” Environment Configuration

VirusTotal integration requires an API key.

Create:

backend/.env

PowerShell:

New-Item backend\.env -ItemType File

Add:

VIRUSTOTAL_API_KEY=your_api_key_here

Use the actual API key without quotes.

Correct:

VIRUSTOTAL_API_KEY=abc123yourkey

Do not use PowerShell syntax inside .env:

$env:VT_API_KEY="abc123yourkey"

๐Ÿ”’ Protect Your API Key

Never upload your real .env file to GitHub.

Only .env.example should be committed:

VIRUSTOTAL_API_KEY=your_api_key_here

โ–ถ๏ธ Running the Backend

From the project root:

cd backend

Activate the environment if necessary:

.\.venv\Scripts\activate

Start FastAPI:

uvicorn app:app --reload

The backend runs at:

http://127.0.0.1:8000

๐Ÿฉบ Verify the Backend

Health check:

http://127.0.0.1:8000/health

Interactive API documentation:

http://127.0.0.1:8000/docs

๐Ÿงฉ Install the Chrome Extension

  1. Open Google Chrome.
  2. Go to chrome://extensions.
  3. Enable Developer mode.
  4. Click Load unpacked.
  5. Select:
AutoPhisNet/extension/
  1. Enable AutoPhisNet.

The extension will monitor browser navigation and communicate with the local FastAPI backend.


๐Ÿ“Š Run the Dashboard

Make sure the backend is running.

Open:

dashboard/index.html

The dashboard communicates with:

http://127.0.0.1:8000

๐Ÿงช Testing

AutoPhisNet was tested against all three risk categories.

๐ŸŸข SAFE

https://www.google.com/

Expected:

SAFE
โ†“
Navigation allowed

๐ŸŸก SUSPICIOUS

Expected:

SUSPICIOUS
โ†“
Warning Page

The one-time Proceed Anyway functionality was also tested successfully.

๐Ÿ”ด HIGH-RISK

https://paypal-login-security.com/verify/account?id=123

Observed:

Risk Score: 70/100
Verdict: HIGH_RISK
Brand Analysis: paypal (100%)
ML Probability: 100%

Expected:

HIGH_RISK
โ†“
Navigation intercepted
โ†“
AutoPhisNet Warning Page

๐Ÿ”„ End-to-End Workflow

                    User
                     โ”‚
                     โ–ผ
               Opens Website
                     โ”‚
                     โ–ผ
             Chrome Extension
                     โ”‚
                     โ–ผ
             Navigation Detected
                     โ”‚
                     โ–ผ
               FastAPI /scan
                     โ”‚
                     โ–ผ
            URL Feature Extraction
                     โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ–ผ          โ–ผ          โ–ผ
         ML       Brand      VirusTotal
       Analysis   Analysis    Intelligence
          โ”‚          โ”‚          โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ–ผ
                Risk Scoring
                     โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ–ผ          โ–ผ          โ–ผ
        SAFE     SUSPICIOUS   HIGH_RISK
          โ”‚          โ”‚          โ”‚
          โ–ผ          โ–ผ          โ–ผ
        Allow      Warning      Block

๐Ÿ› ๏ธ Technologies Used

Programming

  • Python
  • JavaScript
  • HTML
  • CSS

Backend

  • FastAPI
  • Uvicorn
  • SQLite

Machine Learning

  • Scikit-learn
  • Pandas
  • NumPy
  • Joblib

Cybersecurity

  • Phishing URL Detection
  • URL Feature Analysis
  • Brand Impersonation Detection
  • Threat Intelligence
  • Risk Scoring
  • Browser Security

Browser Technology

  • Chrome Extensions Manifest V3
  • Chrome WebNavigation API
  • Chrome Storage API

๐Ÿ” Security Practices

  • API keys are stored using environment variables.
  • .env is excluded from version control.
  • Local databases are excluded from Git.
  • Python virtual environments are excluded from Git.
  • Browser-internal URLs are ignored.
  • High-risk navigation is intercepted.
  • Proceed Anyway uses a one-time bypass.
  • Detection uses multiple security signals.

๐Ÿ”ฎ Future Enhancements

  • Real-time phishing feed integration
  • Additional threat intelligence providers
  • Advanced domain reputation analysis
  • Improved false-positive handling
  • URL reputation caching
  • Configurable risk thresholds
  • Cloud-based security dashboard
  • Automated security reports
  • Enterprise deployment
  • Enhanced analytics
  • Support for additional browsers

๐ŸŽฏ Project Objective

The primary objective of AutoPhisNet is to provide an additional defensive layer against phishing websites by combining automated URL analysis, machine learning, threat intelligence, and browser-level protection.

The project demonstrates the integration of:

Machine Learning
        +
Cybersecurity
        +
Threat Intelligence
        +
Browser Security
        +
API Development
        +
Security Automation

into a practical phishing detection and prevention system.


โš ๏ธ Disclaimer

AutoPhisNet is an educational and research-oriented cybersecurity project.

Detection results are security indicators and should not be considered guaranteed classifications.

Users should continue following standard cybersecurity practices and avoid entering sensitive information on websites they do not trust.


๐Ÿ“„ License

This project is licensed under the MIT License.

See the LICENSE file for more information.


๐Ÿ‘จโ€๐Ÿ’ป Author

Maverickk96

GitHub: https://github.com/Maverickk96

About

AI-powered phishing URL detection and real-time browser protection using ML, threat intelligence, and URL analysis.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages