Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
imagewidth (px)
2.06k
4.47k

Web Page Phishing Detection — EDA

Student: Yonatane Ben-Aroch,Reichman University
Dataset: Web Page Phishing Detection — Kaggle
Date: April 2026

Overview

Web Page Phishing is when someone creates a fake website that looks real to steal your password or personal information. This dataset contains 11,430 URLs that were labeled as either legitimate or phishing, with 87 features extracted from each URL.

For this assignment, I focused on 12 of those features - the ones that are easy to interpret and understand without needing domain expertise.


Dataset

  • Source: Kaggle — Shashwat Tiwari
  • Original size: 11,430 URLs × 87 features
  • After cleaning: 10,492 URLs × 12 features
  • Target variable: Binary — Legitimate (0) vs Phishing (1)

The 12 Features I Used

I chose these 12 because they're interpretable without domain expertise:

# Feature What it measures
1 length_url Total character length of the URL
2 nb_dots Number of dots in the URL
3 nb_hyphens Number of hyphens in the URL
4 nb_at Whether the URL contains an @ symbol
5 domain_age How old the domain is (in months)
6 domain_registration_length How long the domain was registered for
7 web_traffic Volume of incoming traffic to the site
8 google_index Whether the site appears in Google Search
9 page_rank General trust score assigned to the page
10 links_in_tags Percentage of external links in HTML tags
11 phish_hints Count of suspicious words in the URL (e.g. "login", "secure")
12 status Target: 0 = Legitimate, 1 = Phishing

Data Cleaning

Missing Values

No missing values were found across any of the 12 selected features. This was a pleasant surprise the dataset was already fairly clean.

Duplicates

Found and removed 938 duplicate rows, which reduced the dataset from 11,430 to 10,492 rows. All duplicates were dropped (kept first occurrence).

Outliers

Using the IQR method (anything below Q1 − 1.5×IQR or above Q3 + 1.5×IQR), I found outliers in several features:

Feature Outlier count
phish_hints 1,915
web_traffic 1,912
nb_hyphens 1,351
domain_registration_length 1,298
length_url 638
nb_dots 521
nb_at 233

I kept all outliers because they represent real behavior — an unusually long URL or a domain with many hyphens is exactly the kind of signal that matters for phishing detection. Removing them would throw away useful information.


Exploratory Analysis

Class Distribution

Class Distribution

The dataset is perfectly balanced: 5,715 legitimate URLs and 5,715 phishing URLs. no need to worry about class imbalance.

Feature Distributions

Feature Distributions

Most features are right-skewed, meaning most URLs cluster at low values with a long tail of extreme cases. domain_age and domain_registration_length have the widest spread. Binary features like google_index and nb_at show clear spikes at 0 and 1.

Correlation Matrix

Correlation Matrix

google_index and page_rank have the strongest correlations with the target variable. Most other features show weak-to-moderate correlations, which means combining them should give better predictions than any single feature alone.


Research Questions

Q1: How does URL length differ between phishing and legitimate sites?

URL Length by Type

Finding: Phishing URLs are on average 73.7 characters long vs 47.4 characters for legitimate sites — about 1.6x longer.

Why: Attackers add extra subdomains and parameters to disguise the real destination and make the fake site look legitimate. A URL like secure-login.paypal.com.account-verify.xyz/confirm is a classic example — it's long, contains real brand names, but the actual domain is account-verify.xyz.


Q2: Do phishing sites use more dots in their URLs?

Dots in URLs

Finding: Phishing URLs average 2.76 dots vs 2.20 dots for legitimate sites.

Why: More dots usually mean more subdomains — like login.secure.bank-verify.com. Attackers use this structure to make the URL look official. The legitimate-looking part (like bank) gets buried in the middle while the actual domain at the end is malicious.


Q3: What is the relationship between domain age and phishing?

Domain Age by Type

Finding: Legitimate domains have a mean age of ~5,063 months vs ~2,821 months for phishing domains — legitimate domains are about 1.8x older.

Why: Phishing domains are much younger because attackers create new domains frequently. Old, established domains are more expensive, have reputation history, and are harder to repurpose for attacks. When a phishing domain gets flagged and blocked, the attacker just registers a new one.


Q4: Are phishing sites indexed by Google?

Google Indexing Rate

Finding: 88.8% of phishing sites have a high google_index value, compared to 17.1% of legitimate sites.

Note: In this dataset, google_index appears to be encoded as a suspicion flag rather than a straightforward "is indexed" boolean — a high value signals the site behaves suspiciously with respect to Google's indexing. This made it the strongest single predictor of phishing in the entire dataset.


Q5: What are the strongest predictors of phishing?

Top Predictors

Finding: By absolute correlation with the target variable:

Feature Correlation
google_index 0.72
page_rank 0.52
phish_hints 0.36
domain_age 0.36
length_url 0.24

Why: Google indexing status is the strongest signal because legitimate sites are almost always indexed, while suspicious sites often aren't. Page rank reflects accumulated trust — legitimate sites build it over years. The URL-based features (length, dots, phish_hints) are weaker individually but still useful.


Feature Comparison Heatmap

Feature Means by Class

Looking at average feature values per class, the pattern is clear:

  • Phishing sites have longer URLs, more dots, more phish_hints, and higher google_index flags
  • Legitimate sites have older domains, higher page rank, and lower suspicious URL patterns

The two classes are visually distinct across almost every feature, which is a good sign for building a classifier later.


Key Insights

  1. URL structure gives it away — Phishing URLs are 1.6x longer and use more dots to create deceptive subdomains that mimic legitimate brands.

  2. Trust takes time — Legitimate domains are nearly twice as old. Domain age is a strong proxy for trustworthiness because phishing campaigns constantly rotate through new domains.

  3. Google indexing is the best single feature — With a 0.72 correlation, it outperforms everything else. Whether used as a direct feature or as a proxy for site reputation, it's the first thing worth checking.

  4. The data is clean and balanced — No missing values, removed 938 duplicates, perfectly balanced classes.


Dataset Quality

  • No missing values
  • 938 duplicate rows removed
  • Balanced classes (50/50)
  • All 12 features numeric
  • Real-world URLs with genuine patterns
  • Outliers kept (they're meaningful signals, not noise)

Files

File Description
phishing_clean.csv Cleaned dataset — 10,492 rows × 12 features
stats.csv Summary statistics for all features
Copy_of_Assignment_1_EDA_&_Dataset (1).ipynb Full analysis notebook
figures/02_classes.png Class distribution
figures/03_distributions.png Feature histograms
figures/04_correlation.png Correlation heatmap
figures/05_q1_length.png Q1 — URL length
figures/06_q2_dots.png Q2 — Dots in URLs
figures/07_q3_age.png Q3 — Domain age
figures/08_q4_google.png Q4 — Google indexing
figures/09_q5_predictors.png Q5 — Top predictors
figures/10_comparison.png Feature comparison heatmap

Conclusions

This dataset turned out to be really well suited for phishing detection. The features I picked show clear, consistent differences between the two classes (0 % 1) , you can see the separation even in simple box plots and bar charts. If I had to build a detector today using just one feature, I'd pick google_index.

The main challenge was understanding what some features actually mean, and choosing and sampling the right features that will match my needs .

Downloads last month
67