An effective detection approach for phishing websites using URL and HTML features

Ali Aljofey, Qingshan Jiang, Abdur Rasool, Hui Chen, Wenyin Liu, Qiang Qu, Yan WangScientific 2022 · DOI

Abstract

Today's growing phishing websites pose significant threats due to their extremely undetectable risk. They anticipate internet users to mistake them as genuine ones in order to reveal user information and privacy, such as login ids, pass-words, credit card numbers, etc. without notice. This paper proposes a new approach to solve the anti-phishing problem. The new features of this approach can be represented by URL character sequence without phishing prior knowledge, various hyperlink information, and textual content of the webpage, which are combined and fed to train the XGBoost classifier. One of the major contributions of this paper is the selection of different new features, which are capable enough to detect 0-h attacks, and these features do not depend on any third-party services. In particular, we extract character level Term Frequency-Inverse Document Frequency (TF-IDF) features from noisy parts of HTML and plaintext of the given webpage. Moreover, our proposed hyperlink features determine the relationship between the content and the URL of a webpage. Due to the absence of publicly available large phishing data sets, we needed to create our own data set with 60,252 webpages to validate the proposed solution. This data contains 32,972 benign webpages and 27,280 phishing webpages. For evaluations, the performance of each category of the proposed feature set is evaluated, and various classification algorithms are employed. From the empirical results, it was observed that the proposed individual features are valuable for phishing detection. However, the integration of all the features improves the detection of phishing sites with significant accuracy. The proposed approach achieved an accuracy of 96.76% with only 1.39% false-positive rate on our dataset, and an accuracy of 98.48% with 2.09% false-positive rate on benchmark dataset, which outperforms the existing baseline approaches.

Introduction

Phishing remains a critical security challenge, primarily due to the prevalence of "zero-hour" (0-h) attacks. Attackers frequently create fraudulent sites that harvest credentials and disappear before they can be indexed by global blacklists. Existing detection mechanisms often suffer from three major drawbacks: a reactive nature (blacklists), reliance on slow or expensive third-party services (e.g., WHOIS, PageRank), and high computational costs associated with visual similarity analysis.

This research introduces a client-side adaptable system designed for real-time detection without external dependencies. By focusing on intrinsic webpage features, the proposed model identifies phishing attempts the moment they go live.

Methodology

The proposed system utilizes a hybrid feature extraction pipeline integrated with an XGBoost classifier. The methodology is divided into a preprocessing phase and a detection phase.

System architecture of the proposed phishing detection approach showing the preprocessing and detection phases.

Feature Engineering

The model leverages four distinct categories of features:

  1. URL Character Sequences ($F_U$): Raw URL strings are converted into 200-dimensional vectors using a character-level tokenizer, capturing subtle patterns indicative of malicious intent.
  2. Textual Content ($F_T$): Character-level TF-IDF is applied to both visible plaintext and "noisy" HTML structural elements (e.g., attribute values in div or form tags).
  3. Hyperlink Information ($F_H$): Features include ratios of internal vs. external links and the presence of "null" or broken links, which are common in phishing templates.
  4. Login Form Features ($F_L$): Specific focus is placed on forms that submit data to external domains or utilize suspicious action fields.

Data and Training

The model was validated using two datasets: a primary dataset (D1) of 60,252 webpages (curated from Stuff Gate and PhishTank) and a public benchmark dataset (D2) of 73,575 URLs.

Comparative Analysis and Results

A key contribution of this work is the independence from third-party services, which enhances both speed and privacy. Unlike many existing approaches that fail when content is replaced by images or rely on language-dependent keywords, the proposed hybrid feature set provides a more robust signal.

Comparison of the proposed approach with existing state-of-the-art methods and their respective limitations.

The integration of these features significantly improves performance. The approach achieved an accuracy of 96.76% on D1 and 98.48% on D2, with a remarkably low false-positive rate of 1.39%. Furthermore, the execution time for detection is approximately 2–3 seconds, making it suitable for real-time browser integration.

Conclusion

This paper demonstrates that combining URL character sequences with structural HTML features creates a powerful, autonomous phishing detector. While current limitations include a reliance on English for textual features and potential evasion via image-only content, future work will focus on cross-language optimization and adapting the model for emerging threats like blockchain-based phishing.

Summary updated

Abstract

Today's growing phishing websites pose significant threats due to their extremely undetectable risk. They anticipate internet users to mistake them as genuine ones in order to reveal user information and privacy, such as login ids, pass-words, credit card numbers, etc. without notice. This paper proposes a new approach to solve the anti-phishing problem. The new features of this approach can be represented by URL character sequence without phishing prior knowledge, various hyperlink information, and textual content of the webpage, which are combined and fed to train the XGBoost classifier. One of the major contributions of this paper is the selection of different new features, which are capable enough to detect 0-h attacks, and these features do not depend on any third-party services. In particular, we extract character level Term Frequency-Inverse Document Frequency (TF-IDF) features from noisy parts of HTML and plaintext of the given webpage. Moreover, our proposed hyperlink features determine the relationship between the content and the URL of a webpage. Due to the absence of publicly available large phishing data sets, we needed to create our own data set with 60,252 webpages to validate the proposed solution. This data contains 32,972 benign webpages and 27,280 phishing webpages. For evaluations, the performance of each category of the proposed feature set is evaluated, and various classification algorithms are employed. From the empirical results, it was observed that the proposed individual features are valuable for phishing detection. However, the integration of all the features improves the detection of phishing sites with significant accuracy. The proposed approach achieved an accuracy of 96.76% with only 1.39% false-positive rate on our dataset, and an accuracy of 98.48% with 2.09% false-positive rate on benchmark dataset, which outperforms the existing baseline approaches.
BibTeX
@inproceedings{aljofey2022effective,
  author = {Ali Aljofey and Qingshan Jiang and Abdur Rasool and Hui Chen and Wenyin Liu and Qiang Qu and Yan Wang},
  title = {{An effective detection approach for phishing websites using URL and HTML features}},
  booktitle = {Scientific},
  year = {2022},
  doi = {10.1038/s41598-022-10841-5},
}
Figure