PROJECT / 03 SECURITY · ML · URL ANALYSIS
URL THREAT INTELLIGENCE

Inspect the link before the click.

A Streamlit-based phishing analysis system that extracts 53 deterministic URL and HTML features, evaluates them with classical machine-learning models, and returns a class, probability and feature-level evidence — without ever fetching the live website.

DOMAIN Cybersecurity
CORE Classical ML
FEATURES 53 Signals
03 DETECT
URL HTML ML
URL / FEATURES / EVIDENCE PORTFOLIO EXPLORE
01

Before following a suspicious link, what can the link itself reveal?

A phishing page does not need to look obviously malicious. The transition often happens in a single click.

Modern phishing imitates trusted brands with familiar wording and urgent calls to action. The URL is a small artifact, but its hostname, path and structure can still preserve measurable clues about the destination behind it.

This project treats the URL (and optional authorised HTML) as evidence. It extracts a fixed set of signals, compares them with labelled examples, and surfaces the observations so a person can decide what deserves further investigation.

THESIS

The goal is not an automated verdict. It is a structured inspection that supports cautious review before the click.

02

Turning URLs and optional HTML into a fixed 53-feature vector.

The model never fetches the live website. It only analyses material the user already has.
01

34 URL Features

Lengths, punctuation, IP hosts, HTTPS, subdomain depth, shortened domains, suspicious TLDs and credential-related keywords.

02

19 HTML Features

Forms, password fields, links, scripts, iframes, login patterns and selected JavaScript cues (zero-filled when HTML is absent).

03

PhreshPhish

Labelled benign and phishing records streamed into MongoDB with SHA-256 upserts for clean, reproducible experiments.

DATA VIEW

A fixed-order 53-feature contract shared between offline training and online inference so feature order never drifts.

TOTAL FEATURES 0 34 URL + 19 HTML
MODELS 0 classical estimators
TEST ACCURACY 95% Random Forest
03

From validated URL to class, probability and evidence.

01

Input

HTTP/HTTPS URL + optional authorised HTML.

02

Feature Extraction

Fixed 53-value vector in training order.

03

Saved Classifier

One of six offline-trained classical models.

04

Evidence

Class, risk band and non-zero feature list.

INPUTURL
EXTRACT53 FEATURES
INFERMODEL
SCOREPROBABILITY
SHOWEVIDENCE
01

Six Classical Models

Logistic Regression, Linear SVC, Random Forest, Extra Trees, Histogram Gradient Boosting and XGBoost trained offline.

02

MongoDB Persistence

Dataset records, features, model metadata and optional prediction history stored with SHA-256 upserts.

03

No Live Fetching

The application never requests the destination. HTML must already be available through an authorised process.

04

What the saved Random Forest experiment shows.

Illustration of URL components flowing through feature analysis and machine-learning evidence for human review.
Conceptual project illustration; the example URL is not submitted or checked.

Strong discrimination on a held-out test set of 200 records.

Results describe a controlled experiment, not a guarantee of detection on every future phishing campaign.

01 95.0% ACCURACY

190 of 200 test records classified correctly.

02 93.8% PHISH RECALL

76 of 81 phishing cases detected; 5 still missed.

03 0.992 ROC-AUC

Strong ranking ability across the probability spectrum.

04 0.988 PR-AUC

High precision-recall performance under class imbalance.

05 FEATURE EVIDENCE

Non-zero features are surfaced so the analyst can inspect the measurements, not only the final label.

05

Where the current detector still has clear boundaries.

01

No Live Inspection

The system never fetches the destination. It only analyses the URL and any HTML the user already possesses.

02

Evolving Attacks

Phishing techniques change continuously. Static feature assumptions can become less representative over time.

03

False Positives & Negatives

Legitimate pages can look suspicious; sophisticated phishing can avoid obvious signals. Both error types have real consequences.

04

Small Experiment

The reported metrics come from a 1,000-record sample (800/200 split). They are not a deployment benchmark.

IMPORTANT

Treat every prediction as triage support, never as authorisation to click. A “benign” label is not a safety guarantee.

06

Where the detector can become more resilient.

01
RICHER SIGNALS

Expand the feature contract.

Incorporate additional contextual and structural signals that remain stable across changing webpage designs.

02
CONTINUOUS DATA

Keep models aligned with new campaigns.

Refresh training examples so evaluation tracks current phishing patterns rather than a fixed historical sample.

03
EXPLAINABILITY

Show why a page looks suspicious.

Move from a list of non-zero features toward clearer contribution rankings that help an analyst understand the decision.

04
ROBUSTNESS

Test against deliberate evasion.

Evaluate how the system behaves when attackers intentionally modify URL or HTML characteristics to bypass detection.

The project started with a phishing classifier. It became an exercise in making evidence visible before the click.

A fixed feature contract, offline-trained models and explicit evidence display turn a black-box score into something an analyst can inspect and question.

01 OBSERVE

Extract measurable signals from the link itself.

02 MODEL

Compare those signals against labelled examples.

03 EVIDENCE

Surface the non-zero features, not only the label.

04 PAUSE

Use the output for triage, never as permission to click.

Explore the evidence.

Dataset and implementation.