P PhishGuard
Machine learning / URL intelligence

Check a link before you trust it.

Phishing Website Detection reads 20 signals straight from a URL and runs a trained Random Forest model — no request to the site itself — turning a complex classification workflow into a clear, practical scan.

Why phishing detection matters

Trust can be engineered into a page. URL evidence gives users and systems another signal before sensitive information is shared.

Phishing websites imitate trusted organizations to persuade people to reveal passwords, account details, or other private information.

Financial services and online platforms process a large volume of real-time transactions, making them attractive targets for fraud and social engineering. Attackers continuously change their techniques, create convincing replicas, and distribute them through emails, messages, and misleading links.

This project explores how measurable URL characteristics can help distinguish legitimate websites from potentially phishing websites. It is designed for learning, experimentation, and responsible security research.

Signals behind the prediction

Twenty lexical features — computed purely from the URL text, so every scan is fast, private, and reproducible.

01

Length & shape

How long the URL, hostname, and path are — and how much of it is digits.

02

Composition

Counts of telltale characters: dots, hyphens, @, and query symbols.

03

Structure & tricks

Raw-IP hosts, extra subdomains, embedded redirects, and repeated protocol tokens.

04

Reputation heuristics

HTTPS usage, brand-lookalike hyphens, URL shorteners, and phishing keywords.

How well it performs

Trained offline on 2,553 URLs and measured on a held-out 25% test set.

ACCURACY

89.5%

Correct classifications on unseen URLs.

ROC AUC

0.959

Strong separation between legitimate and phishing.

CROSS-VAL

90.2%

5-fold cross-validated accuracy (±1.4%).

From URL to result

The same documented workflow powers the Streamlit interface and the training notebooks.

01

Enter a URL

Provide a complete website URL in the Streamlit scanner.

02

Extract signals

Convert the URL text into 20 numeric lexical features.

03

Run the model

Pass the feature vector to the saved Random Forest classifier.

04

Inspect the result

Review the Legitimate or Phishing classification and extracted values.

Explore the project

The repository keeps the application, training material, and source datasets easy to inspect.