The problem
Phishing remains the most common way credentials get stolen: an email or message carries a link that looks like a bank, a wallet, or a login page, and the victim types their password into the attacker's copy. Blocklists cannot keep up — phishing domains live for hours, not months — so detection has to judge a URL by its structure the moment it is seen. The tell-tale signs are well known to analysts: a raw IP address instead of a domain, an '@' that redirects the browser, a hyphenated lookalike domain, HTTP where HTTPS is expected, a domain registered days ago. The UCI Phishing Websites dataset turns exactly these signals into 30 engineered features across 11,055 labeled URLs, making it the standard teaching benchmark for the problem. This project trains a 200-tree Random Forest on those features — ensembles suit this task because phishing tricks that fool one decision tree rarely fool a majority of 200 — and ships an interactive checker that extracts the features from any URL live, shows each feature's suspicious/neutral/legitimate verdict, and renders the forest's vote. The report is honest about the arms race: attackers adapt, features drift, and a model trained on yesterday's tricks needs retraining against live feeds like PhishTank.
11,055 labeled URLs with 30 ternary features (-1 suspicious, 0 neutral, 1 legitimate) and a binary target.
Follow the working sequence
How it works
- The 11,055 labeled URLs are loaded with their 30 ternary-encoded features (−1 suspicious, 0 neutral, 1 legitimate) and the binary Result target.
- Data is split into stratified train/validation/test sets preserving the phishing/legitimate balance.
- A Random Forest of 200 trees is trained: each tree sees a bootstrap sample and considers a random subset of features at each split.
- Grid search over tree count and max depth selects the final configuration on the validation set; test-set metrics are computed once.
- Feature importance (mean Gini decrease) is extracted from the fitted forest for the report's analysis.
- The checker demo extracts computable features from any URL, runs the forest, and displays the risk score, feature verdicts, and tree votes.
Tech stack:
- Python 3.10, scikit-learn (Random Forest, Decision Tree, Logistic Regression, GridSearchCV)
- NumPy, pandas (dataset loading, feature tables)
- Matplotlib, Seaborn (importance charts, confusion matrix, ROC curves)
- tldextract / urllib (URL parsing for the live feature extractor)
- Jupyter notebook (buyer-run training and evaluation)
- Flask demo app with the interactive URL checker
- UCI Phishing Websites dataset (UCI ML Repository, dataset 327 — 11,055 URLs, 30 features)
| Parameter | Value |
|---|---|
| Model | Random Forest: 200 trees, bootstrap sampling, random feature subsets, majority vote |
| Dataset | UCI Phishing Websites (UCI ML Repository, dataset 327): 11,055 URLs, 30 ternary features, binary phishing/legitimate target |
| Features | 30 engineered signals: address-bar (IP, length, '@', hyphens, subdomains), SSL/domain (HTTPS state, domain age, DNS), page content, reputation (traffic, PageRank, Google index) |
| Training | Grid-searched tree count and max depth on the validation split; design target ≈ 96–97% accuracy on the held-out test set |
| Evaluation | Accuracy, precision, recall, F1, ROC-AUC, confusion matrix — computed by the notebook on your build |
| Baselines | Single decision tree and logistic regression in the same notebook for the ensemble comparison |
| Input | Any URL string (typed or picked from the sample list) |
| Output | Verdict (phishing / suspicious / legitimate) with risk score, per-feature verdicts, tree-vote split |
Project features
- [200-tree Random Forest classifier] Bootstrap sampling with random feature subsets per split; majority vote with phishing probability from the vote fraction.
- [UCI Phishing Websites pipeline] Loader for the 11,055-URL, 30-feature dataset with stratified train/validation/test splits.
- [Live URL feature extractor] Parses any typed URL and computes the address-bar and heuristic features instantly (IP host, length, '@', hyphens, HTTPS, TLD, query strings).
- [Per-feature verdict panel] Each triggered feature shown with its ternary value (−1 suspicious / 0 unknown / 1 legitimate) and a plain-language explanation.
- [Tree-vote visualizer] Animated bar of how the 200 trees split between phishing and legitimate for the checked URL.
- [Feature importance chart] Gini importance ranking computed on the real training data, for the report's analysis section.
- [Baseline comparison] Decision tree and logistic regression trained in the same notebook, so the report quantifies what the ensemble adds.
- [PhishTank extension guide] Documents how to evaluate the trained model against the live PhishTank feed to measure concept drift — the honest real-world test.
What is included
- Complete source code (dataset loader, forest training, grid search, baselines, live feature extractor, demo app)
- Jupyter training and evaluation notebook (buyer-run procedure: load data, tune, evaluate, compare baselines)
- Project report PDF (background, feature engineering, ensemble theory, evaluation, drift discussion)
- PPT presentation for final review
- Viva Q&A preparation document (why forests beat single trees, ternary encoding, precision vs recall in security, concept drift)
- Setup guide (environment, dataset download, training your own model, running the checker)
Advantages
- Judges a URL from its structure, not page content, using 30 engineered features (IP in the host, URL length, '@' symbol, HTTPS state, domain age, page rank and more).
- A 200-tree Random Forest votes by majority, with phishing probability taken from the vote fraction.
- The live URL feature extractor parses any typed URL and computes the address-bar features instantly.
- The per-feature verdict panel shows each triggered feature with its ternary value (−1 suspicious, 0 unknown, 1 legitimate) and a plain-language explanation.
- The tree-vote visualizer shows how the 200 trees split between phishing and legitimate for the checked URL.
- Baseline comparison trains a decision tree and logistic regression in the same notebook, so the report quantifies what the ensemble adds.
Disadvantages
- Attackers adapt: a model trained on historical phishing tricks degrades as tactics change, so concept drift and retraining against live feeds matter.
- Several dataset features need WHOIS, DNS or page fetches; the live demo computes address-bar features instantly and marks the rest honestly as needing lookups.
- Zero-day phishing on freshly registered domains with clean-looking URLs can slip past structural features; no URL checker is a complete defense.
- The dataset's class balance does not match real web traffic (mostly legitimate), so the demo's risk scores are illustrative, not calibrated probabilities.
- Reported accuracy is a design target for your build — the notebook computes your build's real numbers on the held-out test set.
Limitations & prerequisites
- Attackers adapt: a model trained on historical phishing tricks degrades as tactics change — the report covers concept drift and retraining against live feeds.
- Several dataset features need WHOIS, DNS, or page fetches; the live demo computes address-bar features instantly and marks the rest honestly as needing lookups.
- Zero-day phishing on freshly registered domains with clean-looking URLs can slip past structural features; no URL checker is a complete defense.
- The dataset's class balance does not match real web traffic (mostly legitimate), so the demo's risk scores are illustrative, not calibrated probabilities.
- Reported accuracy is a design target for your build — the notebook computes your build's real numbers on the held-out test set.
Frequently Asked Questions
Which dataset is used?
The UCI Phishing Websites dataset (UCI ML Repository, dataset 327): 11,055 URLs described by 30 engineered features (address-bar, SSL/domain, page-content, reputation signals) with a binary phishing/legitimate label.
Why a Random Forest?
A single decision tree overfits the 30 features. Two hundred trees trained on bootstrap samples with random feature subsets vote — phishing tricks that fool one tree rarely fool the majority, which the notebook's baseline comparison quantifies.
Is the accuracy guaranteed?
No. ≈ 96–97% is the design target on the held-out test set; your build's actual metrics come from the training notebook. Real-world performance against live feeds is lower — the PhishTank extension measures that gap.
Does it fetch the page or need the internet?
The demo's feature extractor works on the URL string alone (no page fetch). Some dataset features need WHOIS/DNS lookups; the demo marks those honestly instead of faking them.
Can it catch zero-day phishing URLs?
Partly — structural features generalize to unseen domains better than blocklists. But novel tactics and clean-looking fresh domains remain hard; the report states this limit.
Is this project suitable for a final-year project?
Yes — it covers feature engineering, ensemble methods, security evaluation (precision/recall trade-offs), and honest drift analysis, and suits Computer Science, AI/ML, Data Science and Cybersecurity students. Suitable for B.E./B.Tech final-year projects in Computer Science, AI/ML, Data Science and Cybersecurity.
Components & software requirements
- Python 3.10, scikit-learn (Random Forest, Decision Tree, Logistic Regression, GridSearchCV)
- NumPy, pandas (dataset loading, feature tables)
- Matplotlib, Seaborn (importance charts, confusion matrix, ROC curves)
- tldextract / urllib (URL parsing for the live feature extractor)
- Jupyter notebook (buyer-run training and evaluation)
- Flask demo app with the interactive URL checker
- UCI Phishing Websites dataset (UCI ML Repository, dataset 327 — 11,055 URLs, 30 features)
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.