Phishing URL Detection: Classical vs Deep Learning
An extensive evaluation comparing classical machine learning models based on lexical features with deep learning models utilizing raw character-level feature extraction.
[ISI: Visual Case Study — mis. Confusion Matrix / Feature Importance / Diagram Arsitektur]
simpan gambar di public/images/ lalu tambahkan path-nya pada properti images di lib/projectsData.ts
The Problem
Phishing attacks are becoming increasingly sophisticated, bypassing traditional signature-based filters. Direct detection on the URL string is essential to block threats early, but this requires models capable of understanding complex character sequence patterns.
Dataset & Preprocessing
This experiment utilizes the LegitPhish dataset consisting of 101,219 URLs. During initial data exploration via df.info(), 1 missing value (NaN) was identified in the target label column. This anomalous row was dropped to ensure training integrity, resulting in a clean dataset of 101,218 URLs. To address class imbalance (63,678 legitimate vs 37,540 phishing), the data distribution was rebalanced using SMOTE (Synthetic Minority Over-sampling Technique) prior to model training.
Two Approaches
Two methods were evaluated: (1) Random Forest, representing classical ML, which offers solid performance with high interpretability through feature importance (revealing path_length as a dominant feature), and (2) a hybrid CNN-LSTM architecture, where a 1D-CNN extracts local spatial features from URL characters while the LSTM learns long-range sequential dependencies.