Built to order

Phishing URL Detector Browser Extension using Machine Learning

This project builds a Manifest V3 browser extension that protects you while you browse: a service worker intercepts every navigation, extracts about 30 URL features, and scores them with a RandomForest model trained on PhishTank and Tranco data — entirely inside the browser, so no URL ever leaves your machine. Scores above the threshold redirect the tab to a warning page; the toolbar badge shows green, amber or red per site, and allow/block lists plus a scan history complete the build. Suitable for B.E./B.Tech final-year projects in Computer Science, IT and Cybersecurity.

Chat on WhatsApp — get a quotation

Computer / IT chrome.storage.localJavaScript · Manifest V3ONNX Runtime WebPython 3 · scikit-learnPhishTank · Tranco datasetschrome.webNavigationchrome.declarativeNetRequestRandomForest classifierSoftware
Phishing URL Detector Browser Extension using Machine Learning — project thumbnail preview
More project photos (3)

The problem

Phishing pages now mimic banks, payment apps and login portals closely enough that most users cannot tell a typosquatted domain from the real one — and by the time a victim suspects something, credentials are already typed in. Paste-a-URL checker tools exist, but they only help users who already suspect a link; the real protection gap is automatic, in-the-moment detection while browsing. This project closes that gap with a browser extension that watches every navigation, scores the URL with a machine-learning model running locally inside the extension, and stops the tab before a phishing page renders. Nothing is sent to any server for scoring — the model, the feature extraction and the verdict all happen on the user's own machine. That design is what makes this a genuine security-tool build rather than a demo webpage: interception, a toolbar badge, a warning interstitial, user-managed allow and block lists, and a persistent scan history, all packaged as an installable Manifest V3 extension.

How it works

  1. The service worker registers webNavigation.onCommitted and onHistoryStateUpdated listeners in a Manifest V3 background script.
  2. On each navigation the extension first checks the allow and block lists in chrome.storage.local; a matching rule short-circuits the model with the user's own decision.
  3. Otherwise the JavaScript feature extractor computes approximately 30 lexical, host, path, brand-impersonation and reputation features from the URL — the same feature definitions used in training.
  4. ONNX Runtime Web runs the exported RandomForest on the feature vector (expected: under about 50 ms per navigation on a typical laptop) and maps the phishing probability to a 0–100 risk score.
  5. The action badge updates by risk band — green, amber, red (band edges are design targets); when the score reaches the block threshold of 70 (design target), declarativeNetRequest redirects the tab to the warning interstitial before any page content loads.
  6. The verdict, score and top features are appended to the scan history in chrome.storage.local, and the popup reads the same store to show the current tab's result.

Tech stack:

  • JavaScript (ES2022) · Manifest V3 extension
  • ONNX Runtime Web (in-browser inference)
  • Python 3 · scikit-learn (training pipeline)
  • PhishTank feed · Tranco top-1M (dataset)
  • chrome.webNavigation API
  • chrome.declarativeNetRequest API
  • chrome.storage.local
  • Jest (unit tests)

Dataset & model details

  • Dataset: PhishTank community feed (online-valid.json.gz — verified phishing URLs with phish_id, url and submission_time) for the phishing class, and the Tranco top-1M research-oriented domain ranking for the legitimate class. URL pairs are deduplicated and split by time so the evaluation simulates future, unseen phishing campaigns.
  • Task: Binary URL classification; input = approximately 30 engineered URL features (lexical, host-based, path-based, brand-impersonation, reputation); output = phishing probability mapped to a 0–100 risk score.
  • Model: RandomForest classifier trained in scikit-learn with class weighting for the imbalance between classes, exported to ONNX for in-extension inference via ONNX Runtime Web. The extension's JavaScript feature extractor mirrors the training extractor exactly so training and live scores match.
  • Metrics: Precision, recall, F1 and ROC-AUC on the time-based holdout. Design targets are agreed at order time; no measured figure is claimed before the training run — the report documents the achieved values after training.
Parameter Value
Input One URL per navigation (string)
Feature vector Approximately 30 engineered features (design target)
Model RandomForest exported to ONNX, runs inside the extension (expected)
Scoring latency Under approximately 50 ms per navigation on a typical laptop (expected)
Risk score range 0–100 (design target)
Block threshold 70, user-configurable (design target)
Verdict bands 3 bands — safe below 40, caution 40–69, block at 70 or above (design target)
Model bundle size Approximately 2–5 MB (expected)
Training rows Approximately 100,000 or more labeled URLs (approximate)
Extension platform Chromium 88 or newer with Manifest V3 support (minimum)
Local storage quota Approximately 10 MB via chrome.storage.local (datasheet value)

Project features

  • [In-browser navigation interception] A Manifest V3 service worker listens to webNavigation events on every tab, so the verdict lands before any page content, script or credential form loads.
  • [On-device ML scoring] A RandomForest trained on PhishTank and Tranco URL data is exported to ONNX and executed by ONNX Runtime Web inside the extension — no URL or page data ever leaves the browser for scoring.
  • [Toolbar badge and popup verdict] The action badge turns green, amber or red by risk band; the popup shows the 0–100 score, the top contributing features, and one-tap block/allow actions for the current tab.
  • [Warning interstitial] Scores at or above the block threshold redirect the tab to a full-page warning showing the URL, the score and the strongest signals, with safe go-back or proceed-anyway choices.
  • [Allow and block lists] User-managed domain lists stored in chrome.storage.local; allow-listed domains skip blocking, block-listed ones never load, and the model still records a score for the history log.
  • [Scan history] Every scored navigation is stored with timestamp, URL, score, verdict and top signal — viewable, searchable and persistent across browser restarts.
  • [Training pipeline and evaluation] A Python pipeline rebuilds the dataset, re-engineers the feature set identically to the extension's JavaScript extractor, trains and time-split-validates the RandomForest, and exports the ONNX bundle the extension ships.

What is included

  • Manifest V3 extension source: service worker, popup, warning interstitial, options and history pages
  • Python training pipeline: dataset builder, feature extractor, RandomForest training, time-split evaluation, ONNX export
  • Exported ONNX model plus the JavaScript feature extractor mirrored to the training code
  • Unit tests covering the feature extractor and the scoring thresholds
  • Project report PDF (architecture, dataset, model evaluation, permissions rationale)
  • PPT presentation for final review
  • Viva Q&A preparation document (machine learning, extension APIs, security limitations)

Limitations & prerequisites

  • URL-only signals cannot catch a compromised legitimate domain — a hacked real site scores safe on its URL alone; page-content analysis is future scope.
  • Shortened URLs are flagged by pattern rather than resolved — expanding shorteners inside the extension needs a redirect-following step, listed as future scope.
  • The model drifts as phishing tactics change, so it needs periodic retraining on fresh PhishTank data (recommended: monthly, design target).
  • Scores are statistical, not certainties — expect some false positives on unusual-but-legitimate URLs; the allow list is the correction mechanism.
  • This is a student-built prototype demonstrating ML and browser-extension engineering, not a certified security product — it should not replace a maintained anti-phishing suite.
  • Evaluation is offline on historical data; live browsing behavior may differ.

Frequently Asked Questions

Which dataset is used and why?

The phishing class comes from the PhishTank community feed (online-valid.json.gz), which carries verified phishing URLs with phish_id, url and submission_time fields. The legitimate class comes from the Tranco top-1M ranking, a research-oriented domain list hardened against manipulation. Verified positives plus a stable, high-traffic negative set give the model a realistic decision boundary.

Which model is used, and how does it run inside the browser?

A RandomForest classifier trained in scikit-learn with class weighting. After training it is exported to ONNX, and ONNX Runtime Web executes it inside the extension sandbox — inference takes under about 50 ms per navigation on a typical laptop, and no URL ever leaves the machine for scoring.

How is this different from a paste-a-URL phishing checker demo?

A paste-and-scan demo only helps when the user already suspects a link. This extension intercepts every navigation automatically through the webNavigation API, scores it before the page renders, shows a live badge on the toolbar, and redirects dangerous tabs to a warning page — it is real-time protection, not a manual lookup tool.

Which browser permissions does it request, and why?

webNavigation (to observe tab navigations), declarativeNetRequest (to redirect blocked tabs to the warning page), storage (for allow/block lists and history), and action (for the badge and popup). It requests no content-script host access and never reads page content — URL-only inspection is a deliberate privacy design choice.

Is this project suitable for a final-year project?

Yes — for Computer Science, IT and Cybersecurity programs. It combines a real ML pipeline (dataset curation, feature engineering, model export) with genuine browser-extension engineering (Manifest V3 APIs, service workers, on-device inference) and an honest limitations section for the viva.

Components & software requirements
  • JavaScript (ES2022) · Manifest V3 extension
  • ONNX Runtime Web (in-browser inference)
  • Python 3 · scikit-learn (training pipeline)
  • PhishTank feed · Tranco top-1M (dataset)
  • chrome.webNavigation API
  • chrome.declarativeNetRequest API
  • chrome.storage.local
  • Jest (unit tests)

Dataset & model details

  • Dataset: PhishTank community feed (online-valid.json.gz — verified phishing URLs with phish_id, url and submission_time) for the phishing class, and the Tranco top-1M research-oriented domain ranking for the legitimate class. URL pairs are deduplicated and split by time so the evaluation simulates future, unseen phishing campaigns.
  • Task: Binary URL classification; input = approximately 30 engineered URL features (lexical, host-based, path-based, brand-impersonation, reputation); output = phishing probability mapped to a 0–100 risk score.
  • Model: RandomForest classifier trained in scikit-learn with class weighting for the imbalance between classes, exported to ONNX for in-extension inference via ONNX Runtime Web. The extension's JavaScript feature extractor mirrors the training extractor exactly so training and live scores match.
  • Metrics: Precision, recall, F1 and ROC-AUC on the time-based holdout. Design targets are agreed at order time; no measured figure is claimed before the training run — the report documents the achieved values after training.
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Related guides

All guides

Free Website Hosting for Students: Render, Vercel, Railway and GitHub Pages Compared

How do you put a project website online for free? Match the host to the project: static sites go on GitHub Pages or Cloudflare Pages (free, fast, no server), while a Node, Django or Laravel backend with a database goes on Render or Railway's free tiers with MongoDB Atlas or a free Postgres for data. This guide compares the platforms on real limits — sleep behavior, bandwidth, build minutes — then walks through two complete deploys: a static site and a Node API with a database.

Read guide

SQL vs NoSQL for Final-Year Projects: Which Database Should You Pick?

MySQL or MongoDB for your final-year project? SQL databases store data in related tables with enforced schemas, joins and transactions — the right default when your data is structured and money or records must stay consistent. NoSQL document stores trade the rigid schema for flexible, nested documents that ship faster when your data shape keeps changing. This guide compares them with a worked hospital-appointment example in both, a decision table, and rules matched to common project archetypes.

Read guide

Docker for Student Projects: Images, Containers and Compose from Zero

End ‘it works on my machine’ failures: learn what Docker images and containers actually are, write lean Dockerfiles that exploit layer caching, persist data with volumes, orchestrate app-plus-database with Compose, and package an evaluator-proof submission — with the debugging table for every error you will definitely meet.

Read guide
Get a quotation