Next Article in Journal
Privacy-Preserving Biometric Authentication in Resource-Constrained Environments: A PRISMA Systematic Review of Multimodal and Fuzzy-Vault Methods
Next Article in Special Issue
Security by Light in Sensor Networks: A Structured Review of Optical and Photonic Security Mechanisms
Previous Article in Journal
Chaotic Image Encryption by Intra-Channel Diffusion and Inter-Channel Confusion
Previous Article in Special Issue
Evolving IoT Botnet Threats and Practical Honeypot Observation: A Summary Review and Experimental Study
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

NetGuard: A Hybrid Framework for Intelligent and Scalable Malicious URL Detection

1
College of Computer Engineering, University of Technology-Iraq, Baghdad 10066, Iraq
2
College of Control and Systems Engineering, University of Technology-Iraq, Baghdad 10066, Iraq
*
Author to whom correspondence should be addressed.
J. Cybersecur. Priv. 2026, 6(3), 102; https://doi.org/10.3390/jcp6030102
Submission received: 6 April 2026 / Revised: 4 June 2026 / Accepted: 8 June 2026 / Published: 10 June 2026

Abstract

Due to the indispensable use of the internet, malicious actors have exploited URLs as a threat source of network information security and integrity. URL detection based on traditional methods has become inefficient against the uncontrolled increase of URLs, especially when facing dynamic and large-scale threats. To address the limitations of traditional methods and to provide intelligent and scalable detection of malicious URLs, this study proposes the hybrid framework (NetGuard) by integrating probabilistic data structures (PDSs) with machine learning (ML) capabilities. The proposed NetGuard utilizes PDSs to develop a Hybrid Scalable Detection Filter (HSDF), which combines the strengths of counting Bloom filters (CBFs) (deletion capability) and Scalable Bloom filters (SBFs). The proposed HSDF provides efficient membership queries under bounded false-positive rates (approximately 0.01) and ensures efficient data management and low-latency lookups on a scale of 10−5 s. On the other hand, NetGuard leverages the ML classifier capabilities to train and package a learned classifier for detecting malicious URLs. The proposed framework utilizes Decision Trees (DTs) and Random Forest (RF) classifiers. The proposed classifiers are trained by a novel SupURLsIdDs dataset which includes fifteen distinctive lexical and structural URL features extracted from four URL classes: benign, defacement, malware, and phishing URLs. The experimental results indicated the effectiveness of the HSDF in insertion and deletion operations, with minimal memory consumption (approximately 2.7 MB for 222,000 URLs) while maintaining a controlled false-positive rate (approximately 0.01 on Real-only subset up to 0.12 with synthetic data). The HSDF memory footprint represents a 99.88% enhancement compared to the RF model (which demands 2253.17 MB); thus, the HSDF complements RF as an ultra-lightweight first line of defense. The ML classifiers showed the superiority of RF, which achieved an overall classification accuracy of approximately 96% on large-scale URL data. These experiments are conducted using benchmark datasets constructed from aggregated real and synthetic data to demonstrate the scalability, adaptability, and resource efficiency of the first phase of NetGuard as a practical foundation for real-time web threat detection. The real-time integration and dynamic updates are presented as a deployment architecture and constitute future work.

1. Introduction

The increasing number of internet users and the rapid growth in global data volumes have significantly heightened the complexity of detecting malicious URLs, which are dynamic and ever-changing by nature [1]. This complexity comes from the limitations challenging traditional solutions, primarily centralized blacklist-based systems and standalone machine learning (ML)-based techniques [2,3]. The core limitation of blacklist-based systems is their static nature. These systems depend heavily on maintaining massive and monolithic databases of known malicious URLs; thus, they suffer from a lack of constant updates, making them ineffective against new and unknown attacks [4]. Moreover, this continuous growth of the internet traffic causes these systems’ lookup costs to scale poorly, making them suffer from significant challenges related to resource management and scalability. Concurrently, standalone ML-based solutions have capabilities of generalization and adaptation to face new threats [5]. Despite this, these systems suffer from heavy computational cost and long response time, which limit their effectiveness when applied in environments that require an immediate response, rendering them impractical for inline, ultra-low-latency deployment environments [6]. Furthermore, despite the efficiency of probabilistic data structures (PDSs)-based solutions, such as Bloom filter (BF)-based solutions, in short-time item lookup membership (e.g., malicious URLs) with minimal memory consumption, they suffer from durability and static sizing constraints [7]. As a result, they create a critical gap in real-time efficiency and adaptability when dealing with dynamic environments due to a lack of dynamic updates that incorporate new malicious patterns [8].
Motivation: Despite the effectiveness of the above approaches, integrating multiple solutions is sometimes necessary to achieve an optimal result. This is done by proposing a multi-layered approach that leverages the strengths of different detection mechanisms whereas addressing their individual limitations. Beyond URL classification accuracy, the practical challenge lies in designing a scalable and resource-efficient security mechanism that can operate under the high-volume and dynamic conditions of modern web infrastructures. In addition, relying on a single detection mechanism may limit the adaptability and effectiveness of the system when facing diverse and evolving web-based threats. The previously mentioned challenges are the main motivation for this paper.
Accordingly, the main objectives of the present study are as follows:
  • Propose a framework that combines PDS and ML to achieve a balance of efficiency, adaptability, and scalability.
  • Integrate the proposed framework with an external validation system to enable real-time updates of the malicious URL repository.
  • Propose an implementation strategy for the framework as a multilayer to reduce time and space consumption.
  • Compile and evaluate a baseline lexical/structural feature set for malicious URL identification by utilizing the used dataset.
The core contributions of this paper, achieved through the above objectives, include:
  • The proposal of a novel malicious URL detection framework, named NetGuard, which utilizes the capabilities of counting Bloom filter (CBFs) and scalable Bloom filters (SBFs) in proposing the Hybrid Scalable Detective Filter (HSDF), a novel lightweight, and efficient probabilistic filter. NetGuard combines the HSDF with ML to efficiently manage a growing set of URLs, support the deletion of outdated entries, and maintain high query performance.
  • The construction and public release of a novel supervised dataset, SupURLsIdDs, which is publicly available on IEEE DataPort [9] to facilitate repeatable research in analyzing malicious URLs.
  • The development and evaluation of supervised ML classifiers based on Decision Trees (DTs) and Random Forests (RFs) using the proposed feature set, demonstrating strong classification performance on large-scale URL data.
  • The implementation and validating the scalability, sustainability, and accuracy of the Construction Phase of NetGuard.
  • The presentation of a conceptual deployment architecture for the Detection Phase of NetGuard, illustrating how the validated Construction Phase components can be integrated into a real-time system, which is identified as future work.

2. Theoretical Background and Probabilistic Data Structures (PDSs)

The foundational theoretical background behind the design and functionality of the proposed NetGuard framework is presented in this section. Here, the information engineering concepts and the employed PDS-based filter types are described.

2.1. Foundation of Information Engineering

Information engineering is a multidisciplinary field that aims to mitigate the dimensionality curse phenomenon. This is done by designing and developing systems capable of efficiently handling and processing large-scale data. To address the challenges associated with handling dynamic datasets, the field of information engineering combines techniques from computer science, data analytics, and systems engineering [10]. These involve techniques for feature extraction, decision-making, and utilizing PDS to enhance data storage and retrieval. These are crucial in designing real-time secure systems, where rapid and precise data analysis is essential.

2.2. Bloom Filter (BF)

The Bloom filter, introduced by B. H. Bloom in 1970 [11], is a highly space-efficient probabilistic data structure to approximate set-membership testing [12]. It consists of a bit array of m bits, initially all set to zero, and k independent hash functions. To add an element, its k hash values determine k bit positions, which are then set to 1. A query checks if these k positions are all 1. If so, the element is “possibly in the set” (a false positive is possible); otherwise, it is “definitely not in the set.” The probability of a false positive (Pfp) is crucial, approximated by:
P f p ( 1 e k n / m ) k
where n is the number of inserted elements. The optimal number of hash functions ( k ) is computed using:
k = ( m / n ) ln 2
Despite its efficiency, the standard BF faces significant limitations. The most significant of these is that it does not support deleting stored elements. This limitation arises because deleting requires resetting the corresponding bit to zero, which in turn can affect other elements that reference the same bit, leading to false negatives. This restricts the applicability of standard BF’s application in systems that handle dynamic data. Furthermore, another significant limitation arises when introducing more elements, as this can saturate the bit array, leading to a significantly increased false-positive rate that may exceed the design parameters.

2.3. Counting Bloom Filter (CBF)

The counting Bloom filter (CBF) was introduced by Fan et al. in 1998 to address the deletion limitation of standard BF [13]. This approach replaces the single-bit positions in the bit array by counters. To add an element, its k hash values determine k counter positions, which are then incremented. Conversely, to delete an element the k corresponding counters are decremented after ensuring that element is present in the filter. This approach avoids the false negatives and underflowing counters. A query checks if all corresponding k counters positions are not zero. If so, the element is considered “possibly in the set”. Although the CBF introduces an advantage over the standard BF, it incurs an additional cost formed by the increased space complexity. This complexity comes from the requirements of several bits for each position in the filter array instead of a single bit.

2.4. Scalable Bloom Filter (SBF)

In 2007, Almeida et al. proposed the scalable Bloom filter (SBF) as a solution that addresses the fixed capacity and monotonically increasing false-positive rate of the standard BF [14]. The main goal of the SBF is to accommodate dynamic and growing datasets while maintaining a bounded false-positive rate. This is done by composing a series of standard Bloom filters, each with increased size and a progressively looser false-positive probability. The insertion of a new element is performed in the active standard BF within the series. This process continues until the error probability exceeds the acceptable level, or the active BF is full. In both cases, the SBF creates a new, larger BF and adds it to the series. This new filter has a higher maximum capacity, and a slightly higher acceptable false-positive rate compared to the previous filter. The element to be stored is then added to the new filter. When an item is queried, all Bloom filters in the series are examined sequentially. If the item is found in any of the filters, it is considered likely in the set. Otherwise, it is considered not in the set. By this characteristic, the SBF has the ability to deal with the dynamic and massive nature of the data while ensuring that the overall false-positive probability remains below a predefined maximum global error rate. This is achieved by relaxing the false-positive rates of successively newer and larger filters. This increases the capacity of these filters without requiring an exponential increase in size. The global false-positive probability, Pglobal, of an SBF that contains N BFs, each with its own Pfp,i, the following approximation is used:
P g l o b a l = 1 i = 1 N ( 1 P f p , i )

3. Related Work

The increasing use of and reliance on the internet has exposed users to the risk of malicious URLs, which directly threaten the security and integrity of their devices. Such URLs are designed to compromise data security or disrupt critical systems at both individual and organizational levels [15]. Consequently, the reliance on effective methods for detecting malicious URLs is essential. Due to the dynamic nature of these URLs, the traditional commercial systems (e.g., blacklists) are becoming inefficient. Despite their effectiveness when dealing with static environments, they lack comprehensiveness and the ability to detect newly emerging malicious URLs. For this reason, many ML-based studies have been proposed to enhance the effectiveness of malicious URL detection [16].
In [17], the researchers proposed a real-time system that uses seven ML models to detect phishing websites with an accuracy of up to 97.98%. The main features extracted in this study rely on natural language processing (NLP) features and word vectors. As a result, the system struggled to detect phishing websites that use short URLs lacking obvious malicious indicators. Furthermore, the NLP-based feature extraction method heavily relies on predefined keyword lists, which require frequent updates to maintain their effectiveness. In addition, the significant memory allocation requirements could potentially slow down the entire system. Therefore, the method is considered computationally expensive, as it must be performed for each URL. To overcome the limitations in conventional approaches that utilize manual feature engineering, the author of [18] presented a deep learning-based model designed to perform classification on each URL with 0.002% FPR, despite being seen before, leading to redundancy when processing frequently occurring phishing attempts. Therefore, such a model is computationally expensive, leading to increased latency when detection is performed in real-time. On the other hand, the authors in [19] proposed a model that uses both character-level and word-level representations of URLs instead of relying on feature engineering. The proposed Texception, a deep learning model to classify URLs as benign or phishing with a 48% True Positive Rate (TPR). Although the paper states that the proposed model is scalable, it lacks a thorough computational performance analysis clarifying inference speed and resource consumption against other models. In addition, every URL should be fully processed through the deep learning model, which adds computational overhead.
One effective way to extract discriminative features for identifying such URLs is by analyzing their lexical characteristics. These features are derived from the structure and composition of the URL itself, without requiring access to the website’s content. The authors in [20] explore detecting phishing URLs using five ML models, SVM, LR, K-NN, NB, and RF. Although this study provides an accuracy up to 99%, it focuses on using only lexical features extracted from the URLs, bypassing dynamic URL features which require further processing. However, the proposed system must scan all the URLs, which increases the processing time and slows detection for large-scale datasets. On the other hand, the paper in [21] focuses on extracting and selecting dynamic URL features such as host-based and correlated features, in addition to static features, i.e., lexical features. The paper proposes an ML-based system for URL classification. The proposed system has a slow lookup rate, since each URL must be fully processed. In addition, it requires high storage because storing and searching through a large URL dataset requires significant memory.
K. Nandhini [22] shows that a Bloom filter is ideal for streaming data due to the space efficiency and fast lookup times it provides. The author uses a cross-reference design which reduces false positives, ensuring safe browsing for children. However, the implementation does not leverage advanced variants of Bloom filters such as the counting Bloom filter. The paper only uses the standard Bloom filter which does not support deletions. In addition, using the second cross-reference Bloom filter does not guarantee a false-positive-free result. Moreover, it doubles the memory overhead, which can be avoided using a single, intelligent Bloom filter design.
Pedro Reviriego et al. [23] explore the security of learned Bloom filters (LBFs), which are extensions of standard Bloom filters developed to reduce memory requirements for membership checking, utilizing ML models. Although LBFs decrease false-positive rates, they become susceptible to mutation attack by generating new elements that can be classified as positives, leading to an increase in false-positive rates. In addition, attackers can exploit the LBF architecture and ML features to create negative elements that are mistakenly classified as positives. Finally, double-checking elements with hash functions comes with trade-off between memory consumption and computational efficiency.
R. Patgiri et al. [24] introduce a URL detection system that integrates Bloom filters and deep learning for URL classification. The paper presents a 2 DBF that enhances traditional Bloom filters by minimizing false positives and memory usage. The lookup efficiency is optimized by using two Bloom filters: the first one is used to detect malignant URLs, whereas the second one is used to detect benign URLs. In addition, the authors utilize evolutionary CNNs to classify unknown URLs. Although the proposed system updates its filters dynamically, it does not clearly explain how to handle new attack patterns that could go unnoticed by the existing system. Moreover, the paper does not provide a comparison with other state-of-the-art systems, such as state-of-the-art hybrid architecture. Table 1 illustrates the key findings and limitations of the related recent studies.
The increasing number of internet users and the rapid growth in data volume add complexity to detecting malicious URLs, which are dynamic and ever-changing by nature. This complexity comes from the limitation that challenges the traditional solutions such as blacklist systems and ML-based techniques. The core limitation of blacklist-based systems is their static nature. These systems depend heavily on maintaining comprehensive databases of known malicious URLs and suffer from a lack of constant updating, making them ineffective against new and unknown attacks. Moreover, this continuous growth of the internet traffic has caused these systems to suffer from significant challenges related to resource management and scalability. On the other hand, the ML-based solutions have capabilities of generalization and adaption to face the new threats. Despite this, these systems suffer from high computational cost and long response time, which limit their effectiveness when applied in environments that require immediate response. Furthermore, the PDS-based solution, such as Bloom filter (BF)-based solutions, suffer from durability and scalabilities issues when they are not dynamically updated to include new malicious patterns. Despite their efficiency in checking item membership (e.g., malicious URL) in a very short time, with minimal memory consumption, they create a critical gap in real-time efficiency and adaptability when dealing with dynamic environments. To address these challenges, an innovative solution that integrates lightweight data structures and advanced verification mechanisms is required. Such a solution can enhance the robustness, accuracy, efficiency, and reliability of malicious URL detection.
Table 1. The recent malicious URL detection studies.
Table 1. The recent malicious URL detection studies.
Ref.Approach CategoryKey Technique(s)LimitationsDataset
[17]MLML, NLP-based features, word vectorsRelies solely on URL analysis, depends on predefined keyword lists (requires frequent updates), significant memory, computationally expensiveEbbu2017 Phishing Dataset
[18]DLCNN, attention-based hierarchical RNNRedundancy in processing, computationally expensive, increased latencyCustom dataset
[19]DLCharacter/word-level deep learningLacks thorough computational performance analysis, computational overhead per URLMicrosoft’s anonymized browsing telemetry data
[20]MLSVM, LR, K-NN, NB, RF (lexical features)Must scan all URLs (increased processing time, slow for large datasets)UNB 2016 dataset
[22]PDSStandard Bloom FilterNo deletion support, does not guarantee 100% false-positive free, doubles memory overhead with cross-reference designKaggle URL Classification Dataset
[23]Hybrid (PDS + ML)Learned Bloom Filters (LBFs)Susceptible to mutation attacks, can increase false-positive rate (FPR), trade-offs in memory/computational efficiencyCustom dataset
[24]Hybrid (PDS + DL)2DBF, Evolutionary CNNDoes not clearly explain handling new attack patterns, lacks comparison with state-of-the-art hybrid architecturesNot specified

4. Methodology of NetGuard

The main goal of the NetGuard is to integrate the PDS with data processing, feature extraction, and decision-making to provide internet users with a robust mechanism for detecting and identifying the malicious URLs. In addition, it provides a dynamic update mechanism for its internal dataset, enabling it to serve as a current and reliable resource that can be serve as an up-to-date dataset of the malicious URLs that will be used by other applications, including traditional and learning-based applications, thereby enhancing URL safety detection. To achieve the intended goal, the proposed NetGuard operates in two primary interconnected phases that work together: the Construction Phase and the Detection Phase. The Construction Phase consists of two key components: the Filter Construction Module and the Classifier Construction Module. Only this phase is implemented and experimentally validated. In this phase, the used dataset is first used as a raw dataset to build the proposed HSDF. Concurrently, the same dataset is reprocessed to prepare it for training the ML model. The raw dataset contains 651,191, records which are used as input to the proposed ML pipeline, along with the key parameters for learning the ML model. The ML models are trained and tested on a 70:30 ratio of the used dataset, meaning approximately 455,833 samples for training and 195,358 samples for testing. The ML model configuration is refined through a hyperparameter tuning process using the automatic k-fold cross-validation provided by the Scikit-learn library to identify optimal parameter values.
In the Filter Construction Module, we propose a novel probabilistic filter called the Hybrid Scalable Detection Filter (HSDF) as the core of the malicious URL detection system within NetGuard to address the limitations of static Bloom filter structures in a dynamic and evolving cybersecurity environment. The HSDF combines the strengths of CBF—which support deletion operations—and SBF—which accommodate unbounded growth while maintaining a low false-positive rate. This approach makes sure that NetGuard can easily handle a rising number of URLs, delete old ones, and keep query performance high.
On the other hand, the Classifier Construction Module focuses on data processing, feature engineering, and developing an optimal classification model to categorize incoming URLs.
The second phase, called the Detection Phase, uses these built parts in a multi-step procedure to check the safety of the incoming URL. Consequently, this phase updates the dataset used for training, with newly identified malicious URLs, to ensure it remains current.
Figure 1 provides a high-level overview of the proposed NetGuard architecture. The detailed work of the first phase is presented in the next subsection. This paper focuses exclusively on the Construction Phase, which includes the Filter Construction Module and the Classifier Construction Module. These modules form the essential infrastructure necessary for scalable malicious URL filtering and have been completely implemented and experimentally assessed in this work. The Detection Phase, which includes checking URLs in real time, having the HSDF and the trained ML classifier operate together, and making changes based on live traffic monitoring, is shown as a conceptual deployment workflow. The implementation and real-time validation are outside the scope of this paper and are recognized as a principal focus for future research.

4.1. Dataset Sourcing and Profiling

The raw URL repository utilized in this study is a curated collection of URLs or websites compiled from various sources to ensure broad representation across diverse threat types. This repository consists of 651,191 URLs. Those URLs are grouped into four classes, including 428,103 benign or safe URLs, 96,457 defacement URLs, 94,111 phishing URLs, and 32,520 malware URLs. Figure 2 illustrates the class distribution of URLs across the four classes.
Moreover, the baseline characteristics and sources of the utilized dataset are presented in Table 2. This transparent presentation is vital for reproducibility and for accurately interpreting the scope of the model’s training and evaluation.
As shown in the above figure, the dataset is highly imbalanced, with the benign class dominating the dataset and accounting for 65.74% of the samples, whereas the malicious classes, represented by defacement, phishing, and malware, occupy significantly smaller proportions. This imbalance enforces careful handling during training the ML classifier to avoid bias toward the majority class.
Table 2. Baseline characteristics of the utilized raw URL dataset.
Table 2. Baseline characteristics of the utilized raw URL dataset.
CategoryNumber of URLsData Sources
Benign428,103ISCX-URL-2016 dataset [25], Faizan Git repository [26]
Defacement96,457ISCX-URL-2016 dataset [25]
Phishing94,111ISCX-URL-2016 dataset [25], Malware Domain Blacklist dataset, PhishTank dataset [27], and the PhishStorm dataset [28]
Malware32,520ISCX-URL-2016 dataset [25], Malware Domain Blacklist dataset
Total651,191

4.2. Feature Engineering

Feature engineering involves utilizing data domain knowledge to provide more informative features. These features are used to improve the ML algorithms’ performance. In this study, the normalization and feature extraction of the URLs are the main steps in constructing the proposed NetGuard’s detection solution. URL feature extraction is the key process for ML techniques in tasks such as malware analysis, malicious URL detection, and website classification. It involves detecting patterns and characteristics that have a crucial impact on distinguishing different types of URLs. It also includes changing the URL into a numerical format that is used to train ML models. This transformation is performed by finding and identifying various patterns of a URL. The types of URL features typically extracted include lexical features and structural features [20].

URL’s Cleaning

To ensure the integrity, consistency, and generalizability of the aggregated dataset, a rigorous data cleaning and quality control pipeline was established.
  • Normalization and domain-level similarity: In the context of this study, URL normalization relies on transforming the various representations of the URLs into a canonical and consistent form. This process plays an essential part in feature engineering as it helps treat different URLs pointing to the same resource as duplicates. Normalization facilitates handling huge amounts of data and improves convergence and prediction accuracy during model training [29]. Besides, the URLs normalization has a vital role in feature extraction. Through extracting the specific parts of URLs, like domain, path, they can be used as an extracted features ready for training a ML model [30].
The process typically involves several steps [31]:
  • Using consistent separators instead of the separator characters (e.g., / and ‘\’).
  • Extracting and deleting the redundant elements (e.g., index pages, port numbers, and trailing slashes).
  • Decapitalizing all characters for consistency.
  • Implementing domain extraction procedure to monitor the domain distributions across the categories and guarantee that the classifiers capture deep lexical features rather than biased domain names.
  • Deduplication and overlap elimination: Because the dataset is a curated collection of URLs or websites compiled from various sources, overlap was a major concern. The deterministic string-matching method is applied on the full URL paths to eliminate the records that share identical string hashes and ensure that all records are structurally unique across the four classes.
  • Temporal leakage: The data has no time sequence, but to prevent leakage and avoid the artificial inflation of classification performance, a stratified splitting technique is used. Data is carefully split using a 70:30 ratio between training and testing sets, ensuring that the structural traits of different sources do not leak between these sets.

4.3. Filter Construction Module

The Filter Construction Module is responsible for designing and building the Hybrid Scalable Detection Filter (HSDF), a novel probabilistic filter that forms the core of NetGuard’s malicious URL detection system. The HSDF is designed to evaluate URL membership against a repository of known malicious URLs. The HSDF is specifically engineered to address the inherent limitations of static Bloom filter structures within the dynamic and ever-evolving cybersecurity environment. It achieves this by combining the strengths of CBF, which support deletion, and SBF, which accommodate unbounded growth, while maintaining a low false-positive rate. This design ensures that NetGuard can efficiently handle a growing set of URLs, support the removal of outdated entries, and preserve query performance. The HSDF extends the traditional Bloom filter by replacing the bit array with an array of counters.
Initially, the raw dataset is filtered to retain only the malicious URLs. Each malicious URL is treated as an element to be inserted into the proposed HSDF. Each element x is hashed using K independent hash functions, and the corresponding counters are manipulated as follows:
Insertion:
Let h1(x), h2(x), …., hk(x) be the independent hash functions (K), and Ci be the counter array of size mi for the filter Fi. For an element x:
k   [ 1 , K ] ,   C   [ h k ( x ) ] C   [ h k ( x ) ] + 1  
Query (to check if an element x is present):
Q u e r y ( x ) = { T r u e ,             i f     i ,   C   [ h k ( x ) ] > 0 F a l s e ,                                                     o t h e r w i s e
Deletion:
k   [ 1 , K ] ,   C   [ h k ( x ) ] m a x ( 0 ,   C   [ h k ( x ) ] 1 )
The scalability aspect of the HSDF is inspired by the SBF model proposed by Almeida et al. [14]. When the current CBF within the HSDF reaches its item capacity threshold nmax, a new filter is appended, with a tighter false-positive rate. The error rate for each new filter is reduced geometrically, as shown in the following equation:
ϵ i =   ϵ 0 . r i
where:
  • ϵ 0 : initial false-positive rate (e.g., 0.01);
  • r: tightening ratio (e.g., 0.5);
  • i: index of the filter layer.
This strategy ensures that the cumulative false-positive rate across all filters remains bounded, given by:
ϵ t o t a l = i = 0 ϵ 0 . r i   =   ϵ 0 1 r   , f o r   0 < r < 1  
The tightening ratio r used in the construction of HSDF is set to 0.5, following a geometric error allocation strategy commonly used in scalable probabilistic filtering structures to ensure that the cumulative false-positive probability remains bounded as additional layers are introduced. The HSDF consists of a list of independently managed filters. New filters are appended when the active one reaches its predefined item limit nmax. The system ensures the following processes: insertions occur only in the latest filter, lookups traverse all filters in sequence until a match is found, and deletions are precise, occurring only in the filter where the item is found.
This layered design ensures both temporal efficiency and structural flexibility. Each newly created filter maintains a count of inserted items and can thus signal when its capacity is exhausted. The memory consumed by each created filter is a function of its size m and the counter size (typically 4 bytes per counter):
m e m o r y e a c h _ f i l t e r =   m   .   s i z e c o u n t e r
The value of m for each filter is chosen based on the number of items n and desired error rate ϵ, using the classic Bloom filter equation [32]:
m = n ln ( ϵ ) ( ln 2 ) 2
K = m n . ln 2
where K is the optimal number of hash functions.
Figure 3 shows the flowchart diagram of the HSDF main process, where (a) represents the addition (insertion) process, whereas (b) represents the other processes (lookup and deletion).
The HSDF is deployed in the Construction Phase of NetGuard as part of the Filter Construction Module. It serves to validate newly encountered URLs by checking against authorized or malicious entries. In the Detection Phase, the HSDF plays a critical role in ensuring low-latency lookups, while enabling real-time updates (insertions/deletions) of URLs. Its scalable nature allows NetGuard to evolve with the threat landscape without compromising accuracy or resource efficiency. The design of HSDF represents a significant advancement, as it effectively synthesizes the counter-based mechanism of CBF with the layered, growth-accommodating structure of SBF. This integration allows NetGuard to achieve both efficient deletion and unbounded scalability with a controlled false-positive rate, thereby overcoming the cumulative limitations inherent in prior PDS designs.

4.4. Classifier Construction Module

The primary objective of this module is to construct a robust and accurate classification model capable of distinguishing between malicious and benign URLs. To accomplish this, the module comprises two sequential and interrelated stages: feature engineering and classifier building. The feature-engineering stage processes the raw data to prepare it for classifier training. Therefore, this section provides the classifier-building stage with more informative features, enhancing the ML classifier’s performance. The output of the classifier-building stage is the learned classifier model. Figure 4 illustrates the ML pipeline of the Classifier Construction Module stages, which are described below.

4.4.1. Feature-Engineering Stage

As shown in Figure 4, in this stage, each URL undergoes a normalization process designed to standardize its structure and eliminate superficial variations. This includes converting all URLs to lowercase and removing any leading or trailing whitespace, removing common prefixes such as http://, https://, and www., and stripping any trailing slashes. The normalized URLs are then subjected to feature extraction, where a comprehensive set of discriminative attributes is derived. These features are grouped into three primary categories. The first category includes lexical features, which are extracted directly from the normalized URL string, such as the number of special characters, digit count, URL length, entropy, the length of the top-level domain (TLD), and hyphen. The second category includes structural features, which are derived after parsing the URL, typically using a function such as Python’s urlparse function. This enables the extraction of structural features, including the number of directory levels, the use of secure protocol, the length of the hostname, the overall path length, and IP address usage. The other structural feature is the presence of the @ symbol, which is extracted from the normalized URL, as their structural significance is independent of full component parsing. The third category strategically includes the phishing-specific features, which improve recall for the challenging phishing class by detecting common suspicious strategies. These features are checking paths for suspicious keywords, the number of subdomains, and the full TLD length. Combining these three feature categories guarantees the rich and informative representation of the URLs. These lexical and structural features are derived from well-established practices in prior malicious URL detection studies and are intentionally adopted in this work as a baseline to support reproducible and large-scale evaluation. Following feature extraction, the data is forwarded to the classifier-building stage. Table 3 provides a detailed overview of the specific features extracted and their characteristics for this study. Moreover, these extracted features, derived through our enhanced feature engineering process, are successfully integrated to generate a comprehensive labelled dataset named Supervised URLs Identification Dataset (SupURLsIdDs). The SupURLsIdDs dataset encompasses all four classes: benign, defacement, malware, and phishing.

4.4.2. Classifier-Building Stage

This stage deals with the extracted features that are passed from the feature-engineering stage. Firstly, these features are divided into training and testing subsets, following a standard 70:30 ratio. Supervised classifiers, Decision Trees (DTs) and Random Forest (RF), provided by Scikit-learn are selected as the underlying ML models for this task. The choice of these classifiers reflects a deliberate emphasis on robustness, interpretability, and reproducibility when operating on structured lexical and structural URL features. Initially, a hyperparameter tuning process is conducted using cross-validation in conjunction with grid search strategies to search for high-impact hyperparameters that, in turn, optimize the model’s performance. This tuning process is performed by fitting a 10-fold cross-validation model that is performed across a range of high-impact parameters to identify the most impactful parameters for the selected ML model that yield the best predictive performance. The Scikit-learn library’s grid search method facilitates this process by leveraging all available CPU cores for parallel processing, to decrease the consumption time required for tuning. The tuning process is applied exclusively to the training subset, while the held-out test set is used only once for final performance evaluation.
After determining the optimal parameter values, the selected ML classifier is trained on the full training set and evaluated using the test set. The models’ effectiveness is assessed using standard evaluation metrics such as accuracy [33], precision [33], recall [34], and F1-score [34]. These metrics are computed using the following equations, respectively:
a c c u r a c y = ( T P + T N ) ( T P + T N + F P + F N )
p r e c i s i o n = T P ( T P + F P )
R e c a l l = T P ( T P + F N )
F 1 s c o r e = 2 P r e c i s i o n R e c a l l P r e c i s i o n + R e c a l l  
where:
  • TP: true positives (the number of correct positive predictions).
  • TN: true negatives (the number of correct negative predictions).
  • FP: false positive (the number of misclassified positive class).
  • FN: false negative (the number of misclassified for negative classes).
Upon successful validation, the trained classifier that achieves higher performance than the other classifiers is packaged for deployment in the subsequent Detection Phase of the NetGuard system, where it is applied to unseen URLs for real-time classification.

5. Experimental Results and Discussion

This section presents and discusses the experimental evaluation of the proposed NetGuard framework. The primary objective of the evaluation is to validate its efficiency, scalability, and detection performance through its two main modules: the HSDF and the ML-based classifier. This evaluation process is performed through three key areas. First, an Exploratory Data Analysis (EDA) for the utilized dataset is performed. Secondly, the ML-based classifier accuracy for feature extraction and malicious URL detection is evaluated. Lastly, a comprehensive comparison with the state-of-the-art malicious URL detection studies is performed. The experiments were performed on a system equipped with an Apple M3 Pro chip, 18 GB of unified memory, and macOS Sequoia 15.5 (24F74). The framework was implemented in Python 3.12.5, leveraging the Scikit-learn library for the DTs and RF models and a custom-built implementation for the HSDF.

5.1. Exploratory Data Analysis (EDA) of the Dataset

Here, the exploratory analysis for the utilized dataset is represented to understand its structure, key characteristics, and class distribution of the URLs.
First, the length of the URLs is analyzed to illustrate the possible patterns distinguishing malicious from benign URLs. The URL length ranged from 1 to 2175, with a mean length of 60 and a median of 47 characters. As shown in Figure 5, the longer URLs are related to the malicious URLs, particularly phishing and malware categories. This observation illustrates how attackers exploit longer URLs to conceal malicious content, include obfuscation sequences, or combine multiple redirects.
To investigate the domain usage patterns of the URLs, the TLD of the URLs is analyzed. Figure 6 shows that .com is the dominant domain used by the URLs (398,479 URLs), followed by .org (50,844 URLs), .net (28,255 URLs), and country-specific TLDs such as .de and .co.uk. Despite the dominance of .com across both benign and malicious URLs, the attacker keeps on exploiting the lesser-known TLDs which often lack monitoring or regulation. Finally, the character composition of URLs is analyzed by counting digits and special characters. Figure 7 shows that an average of 5.53 digits and 9.40 special characters are contained, with higher counts observed in malicious URLs. At first glance, when looking at Figure 7, the benign class appears to dominate the distribution, exhibiting a higher frequency of special characters. This arises due to the imbalance in class sizes, as shown in Figure 2. The fact that this is the majority class makes the distribution curve of special characters more prominent. Therefore, to account for this effect, the relative patterns of the benign URLs should be considered. Benign URLs are condensed within a narrower range of special-character counts (from 0–15), whereas malicious URLs, represented by phishing and defacement classes, are condensed over a higher range of special-character counts. We note that the use of large numbers of digits and special characters is a common tactic for attackers to obscure a suspicious URL, imitate a legitimate URL, or attempt to bypass filters. Therefore, these patterns are used as important indicators for feature engineering and are considered a useful indicator in ML-based URL classification.

5.2. HSDF’s Performance Analysis

This section represents the evaluation results of the proposed HSDF’s performance in terms of insertion/deletion efficiency, memory footprint, and false-positive rate (FPR). The objective of this evaluation is to demonstrate the validity of the hybrid approach in combining the CBF and SBF features to support deletion and scalability, while maintaining a low FPR and high efficiency under a continuously growing dataset. To demonstrate the HSDF’s performance, we conducted two studies. The first evaluated the filter’s performance in terms of scalability compared to other filters. The second evaluated its performance in terms of deletion and retrieval accuracy.
Study 1: To evaluate the scalability of the proposed HSDF, we divide the filtered dataset, which includes only suspicious URLs (approximately 222,000 links), into four groups, each containing approximately 55,000 links. The purpose of this division is to test scalability while maintaining a constant error rate. We adopted the value of n = 55,000, which is approximately the first batch of URLs to be stored, considering the scenario of not knowing the total number in the future and treating it as a fixed environment. Based on this value, setting the error rate to 0.01, and using (10) and (11), the values of m and K are calculated, respectively. Equation (7) is used to adjust the error rate to maintain it within the acceptable values. To implement this scenario, we stream the four datasets and measure the FPR and memory consumption. Figure 8 shows the superior performance of the HSDF in maintaining a bounded false-positive rate when dealing with a dynamic environment issue which is represented by a dynamic and growing dataset. Figure 9 illustrates the memory consumption rate of the HSDF when processing the four parts of dataset. The results indicate that memory consumption increases linearly with the size of the input data. This is because, in the HSDF methodology, to maintain a bounded false-positive rate, the capacity of the active filter is checked before processing any new data to ensure it can accommodate the incoming data. When the active filter’s memory capacity is reached, a new filter is created. Thus, as the data volume increases, the proposed filter creates a new instance, resulting in an approximately linear increase in memory consumption. The memory consumption of HSDF is approximately 2.7 MB for storing 222K URLs, reflecting a compact footprint for a deletion-enabled and scalable probabilistic filtering structure operating at this scale. Instead of storing the complete details of each URL, as traditional blacklist-based systems do, the proposed filter stores only a compact representation of the URL domain names, ensuring that memory consumption remains within acceptable limits. This efficiency makes the proposed method more suitable for dynamic environments and real-time systems, where both memory efficiency and stable performance are critical.
Study 2: To evaluate the effectiveness of the proposed HSDF against the traditional CBF in terms of scalability, throughput, latency, and accuracy under different data scale and deletion conditions, three subsets of URLs are constructed. These subsets are generated to represent realistic operational conditions which are real-only subset, synthetic-only subset, and mixed subset. The real-only subset comprises URLs collected from the used filtered dataset (malicious URLs only). This subset is suitable to test the filter’s performance in practical, unaltered environments. The second one, the synthetic-only subset, contains the synthetic URLs, constructed by combining random domain structures, controlled repetition rates, and subdomain variations. It imitates high-volume and diverse URL streams that are typically run into dynamic environments but are difficult to reproduce using real data alone. This subset allows for precise measurement of performance and scalability under predictable input patterns by stress-test the verification mechanism and internal counting of filters. The last dataset, the mixed subset, combines the real and synthetic URLs in balanced proportions. This subset is used to analyze the adaptability and generalization of the proposed filter.
Figure 10 illustrates the query and deletion latency for the HSDF and CBF filters. This study omits the SBF implementation due to its inherent lack of deletion support. Both filters showed nearly constant latency values, but the HSDF maintained a slightly higher average, which is due to its dynamic nature, which forces the construction of multiple filter layers. This nature points out a justifiable architectural trade-off between the performing operations on a single contiguous memory block and navigating through multiple active filter layers to safely locate and remove an element. Furthermore, the deletion process requires metadata synchronization across all filter layers to prevent any drop in the FPR for subsequent lookups, something a traditional filter cannot provide. This latency requirement is negligible compared to the advanced improvements, including significant memory efficiency improvements of up to 99.88% compared to intelligent learning models, particularly the RF classifier (as discussed in the following section).
As a result, the throughput, as shown in the Figure 11, also showed approximate ratios, as it is directly dependent on latency values for each filter. Despite the designing goal of the proposed HSDF to improve lookup efficiency by binary search, the obtained results show that the traditional CBF achieved slightly higher throughput and lower latency. This is due to the additional computational operations required for dynamic set management and binary search operations. These, in turn, impose marginal overhead that is negligible compared to the actual goal of addressing dynamic realities while maintaining a constant false-positive rate, as shown in Figure 12, where the HSDF outperforms the traditional CBF in terms of false and residual positive rate. This figure confirms that the dynamic verification mechanism of the HSDF more accurately identifies authorized URLs when dealing with real-only scenarios, whereas in dealing with synthetic-only and mixed datasets, the HSDF exhibits moderate increase in residual positive rate. This comes from the artificial uniformity and high overlap in the synthetic data, which in turn led to higher collision probabilities among generated hash values.
It is worth noting that all the experiments conducted in Study 2 (comparing the HSDF and the CBF) are focused strictly on binary detection (malicious vs. non-malicious).
It is important to clarify how the proposed HSDF differs from existing learned Bloom filter-based approaches [23,24]. Learned Bloom filters integrate ML models directly into the membership verification process to reduce false-positive rates, which introduces inference-time dependency on learned models and increases sensitivity to adversarial manipulation or concept drift in dynamic environments. In contrast, the current HSDF implementation relies exclusively on deterministic, hash-based probabilistic data structures during lookup, as reflected in the stable latency and bounded false-positive behavior observed in the experimental results. Machine learning in NetGuard is employed during the Construction Phase to train a supervised classifier, while its role in dynamically updating the HSDF is defined as part of the Detection Phase and constitutes future work. This separation enables predictable runtime performance and positions the HSDF as a robust filtering substrate for future ML-assisted updates without incurring inference-time overhead during URL filtering.

5.3. The SupURLsIdDs Baseline

The extracted features, represented in Table 3, which are derived through our enhanced feature-engineering process, are successfully integrated to generate a comprehensive labelled dataset SupURLsIdDs. The SupURLsIdDs dataset encompasses all four classes: benign, defacement, malware, and phishing. Aware of the importance of data in accelerating scientific progress and saving time and effort for other researchers and scientists by bypassing the overwrought initial steps of cleaning raw data and extracting appropriate features capable of training ML models, we are making this enhanced and pre-processed dataset publicly available at [9]. Table 4 and Table 5 illustrate the classes, as well as the structural and statistical baseline details of the SupURLsIdDs dataset, respectively. The comprehensive structural and statistical baseline profiling of the extracted features within the SupURLsIdDs dataset, shown in Table 5, presents the wide spectrum of characteristics encapsulated in SupURLsIdDs. Furthermore, documenting these mathematical boundaries (mean, std. dev., min, max) ensures data readiness and transparency, which directly helps build distinctive ML models. As shown in Table 5, despite their low variance, binary features such as has_at_symbol and is_ip are fundamentally retained to guarantee structural resilience against future adversarial obfuscation techniques.

5.4. Classifier Tuning and Evaluation Results

This section presents the obtained tune hyperparameter for the selected ML classifiers, DTs and RF, and evaluates their performance in identifying malicious URLs using the extracted URL features. Table 6 and Table 7 show the searched hyperparameter ranges and the best hyperparameters for the DTs and RF classifiers, which were selected dynamically using 10-fold cross-validation, with identification accuracy as a scoring metric.
The tuned DTs and RF classifiers are then evaluated using the filtered dataset following a standard 70:30 ratio. That means that the tuned classifiers are trained using 70% from the dataset and then tested on the remaining 30% of the unseen data. Three evaluation metrics are used to evaluate the adopted classifiers, as shown in the classification report illustrated in Table 8 and Table 9, respectively.
The macro avg founded in the classification report represents the arithmetic mean of all the per-class scores for each metrics. This method enforces the same handling to all classes, regardless of their support values. The weighted average considers each class’s support. The class support refers to the number of actual class instances in the dataset.
From the obtained evaluation results, the constructed RF classifier shows superior performance in identifying malicious URLs based on lexical and structural features. Its superior performance comes from its ability to handle the imbalanced nature of the used dataset. By using its class weight parameter, the RF classifier can automatically adjust the weights inversely proportional to class frequencies. In this way, the minority classes (such as ‘malware’ and ‘phishing’) will be given more importance during training. As a result, this procedure directly helps improve the low recall for those classes. Alternative imbalance handling techniques such as oversampling or synthetic data generation (e.g., SMOTE) were not applied in this study to preserve the original lexical and structural feature distributions of URLs, which could otherwise be distorted by artificial resampling.
As outlined in the proposed methodology, the constructed classifier is packaged for use in the Detection Phase. This means that the constructed classifier is serialized and stored as a .pkl file so that it can be consumed by a commercial application during the Deployment Phase [35].

5.5. Discussion and Comparison with SOTA Methods

In this subsection, the proposed NetGuard is compared with state-of-the-art probabilistic and learned filter frameworks in terms of the general contribution and the main objectives. Table 10 illustrates that the major limitation of existing solutions lies in their use of fixed-size filters that do not support dynamic environments. Although [23,24] have improved memory consumption, working with dynamic environments experiencing unexpected growth in URL size shifts the focus to reliability and dependability, making it more important than memory consumption. Memory consumption, however, remains a crucial factor given the current evolution of data and the need for optimal memory usage.
Furthermore, the rapid growth of URLs also necessitates the removal of outdated signatures. This is where the proposed framework’s key contribution lies: supporting continuous scalability by offering the HSDF, a multi-layered scaling filter that supports element deletion and efficient memory consumption compared to blacklist techniques, while maintaining an acceptable false-positive rate and high classification accuracy through integrated ML models.
As stated in Table 10, NetGuard’s architecture provides substantial memory enhancement via the HSDF. This is because the HSDF memory footprint is only 2.7 MB, which highlights that our hybrid approach yields a 99.88% memory consumption improvement over the standalone RF classifier, which demands a massive footprint of 2253.17 MB. Thus, it forms an ultra-lightweight first line of defense.
Table 10. Comparison of NetGuard with state-of-the-art probabilistic and learned filter frameworks.
Table 10. Comparison of NetGuard with state-of-the-art probabilistic and learned filter frameworks.
Framework/MethodFilter StructureML IntegrationScalability (Dynamic Growth)Deletion SupportMemory Efficiency
Nandhini, K. [22]Standard Bloom FilterNoneNoNoVery Low
Reviriego et al. [23]Learned Bloom Filter (LBF)Binary ClassifierNo (Fixed Size)NoHigh
deepBF [24]Learned Bloom Filter + Evolutionary DLDeep LearningNo (Fixed Size)NoVery High
Traditional CBFCounting Bloom FilterNoneNoYesLow
SBFScalable Bloom FilterNoneYes (multi-layered)NoMedium
NetGuard (Proposed)Hybrid Scalable Detection Filter (HSDF)Multi-class ML (RF/DT)Yes (multi-layered)YesHigh (Optimized via HSDF)
Note: This table presents a structural and qualitative architectural comparison, rather than direct numeric benchmarks, due to the varying in dataset sizes, URL length distributions, hash function number, and hardware configurations for each study.
Moreover, the NetGuard classifier is evaluated using the shared benchmark ISCX-URL-2016. Table 11 shows the NetGuard-classifier performance breakdown across ISCX-URL-2016 and SupURLsIdDs datasets. The comparison results prove that while the proposed classifier achieves near-perfect evaluation metrics, with an accuracy of up to 98% and phishing recall of 96%, when trained on an established, static benchmark, it addresses real-world challenges on the proposed curated SupURLsIdDs dataset. Although the proposed model achieved 0.83 phishing invocations on SupURLsIdDs, this discrepancy highlights the complex overlap in the characteristics of this dataset, reflecting the current reality of attacks where phishing and malware are blurred, resulting in complex and closely spaced boundaries. Figure 13 illustrates the confusion matrices of the NetGuard classifier on the ISCX-URL-2016 and SupURLsIdDs datasets, respectively. As shown in Figure 13a, the ISCX-URL-2016 test set contains only 2276 phishing samples, which may account for the high phishing recall (0.96) observed on this dataset. However, the SupURLsIdDs test set contains 22,180 phishing samples. The dominant failure mode, which reports a recall of 0.85, is characterized by 5407 phishing samples being cross-predicted as benign. This confirms that phishing URLs frequently utilize structural parameters that are looking clean and legitimate to hide their malicious nature.

6. Conclusions

The increasing prevalence of malicious URLs continues to threaten digital security, posing a continuous challenge to the traditional detection solutions. This paper proposes NetGuard, a novel hybrid framework that provides a scalable, adaptive and intelligent malicious URL detection mechanism. It introduces the HSDF, a novel PDS that integrates the deletion capabilities of CBF with the growth-oriented nature of the SBF. The evaluation results validate the effectiveness of the proposed framework’s modules. The experimental evaluation demonstrated that the HSDF achieves high resource efficiency, requiring minimal memory (≈ 2.7 MB for 222,000 URLs), while supporting efficient insertion/deletion operations. This was achieved while maintaining a controlled false-positive rate. Concurrently, the packaged ML classifier, built using an RF model, trained on distinctive lexical and structural URL features, attained a high overall detection accuracy of approximately 96%. This study intentionally focused on the Construction Phase (Phase 1) of the NetGuard framework, which includes the design, implementation, and analysis of the HSDF (Filter Construction Module) and the ML model (Classifier Construction Module). This focus is important to evaluate the performance of the system’s underlying architecture. The core infrastructure and foundational components required for the system’s operation are represented by Phase 1 modules. On other hand, real-time system integration, dynamic HSDF updates driven by live ML inference, and deployment in operational environments, which belong to Phase 2, are represented as a system architecture and constitute future work. Through careful verification of the underlying infrastructure in this study, the proposed framework lays a strong and scalable foundation for subsequent immediate deployment and large-scale malicious URL filtering applications.
The novelty of this work lies in the design of NetGuard as a hybrid and scalable malicious URL detection framework that goes beyond conventional single-model approaches. While many previous studies mainly emphasize predictive performance, this work focuses on combining complementary mechanisms within a unified framework to improve both detection capability and operational scalability. Therefore, the contribution of this paper is not limited to classification performance alone but also extends to providing a more practical and application-oriented cybersecurity solution for large-scale malicious URL analysis. A limitation of this work might stem from the lack of validating the HSDF update process by the ML classifier. However, the HSDF’s updateability and scalability, along with its ability to maintain a controlled false-positive rate, have been validated. The framework’s deployment (Phase 2) will involve integrating the proposed modules, which have already been validated for scalability, sustainability, and accuracy.
In addition, this integration improves the knowledge base of the NetGuard by updating the proposed HSDF and the URLs repository with newly verified malicious URLs. The successfully validated first phase serves as the essential foundation for the next stage of this research. Despite these strengths, NetGuard still has several limitations and opens promising directions for future work, including:
  • Implementing the full, two-phase NetGuard framework in a live environment. This will involve deploying the “Detection Phase” to analyze real-time web traffic, integrating the HSDF and classifier for high-speed lookups, and enabling the dynamic update mechanism.
  • Exploring the impact of integrating behavioral or content-based URL feature sets on the classifier’s detection capability, as well as investigating whether this integration could enhance the classifier’s ability to detect highly sophisticated or evasive malicious URLs.
  • Constructing an advanced mechanism for automatic feature selection, which could decrease online feature extraction costs.
  • Finding the influence of different values of the initial false-positive rates (ϵ0) and tightening ratios (rs) on HSDF’s performance.
  • Deploying the NetGuard in a distributed environment to achieve even greater scalability.

Author Contributions

Conceptualization, S.D.K.; methodology, S.D.K.; software, S.S.S. and S.D.K.; validation, S.S.S.; formal analysis, O.N.M.T. and A.J.H.; investigation, A.J.H. and A.D.S.; resources, O.N.M.T. and S.S.S.; data curation, S.D.K.; writing—original draft preparation, O.N.M.T.; writing—review and editing, O.N.M.T. and S.S.S.; visualization, S.D.K. and S.S.S.; supervision, A.J.H. and A.D.S.; funding, A.J.H. and A.D.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

This study generated a new dataset, named SupURLsIdDs, which is publicly available on IEEE DataPort (https://dx.doi.org/10.21227/mefw-7h76) (accessed on 6 April 2026). The code and the configuration files are publicly available upon article acceptance. No personal or proprietary data was used.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Abed, R.A.; Hamza, E.K.; Humaidi, A.J. A modified CNN-IDS model for enhancing the efficacy of intrusion detection system. Meas. Sens. 2024, 35, 101299. [Google Scholar] [CrossRef] [Scilit]
  2. Pachpatil, M.V.; Agrawal, A. Evolution of Malicious URL Detection: A Review of Techniques for Malicious URL Detection and Classification. In Sustainable Artificial Intelligence-Powered Applications; Springer Nature: Cham, Switzerland, 2025; pp. 467–475. ISBN 9783031928536. [Google Scholar]
  3. Kailas, S.; Roopalakshmi, R. “Think before You Click”—Malicious URL Detection in Cybersecurity: A Systematic Review and Research Roadmap. IEEE Access 2025, 13, 154305–154325. [Google Scholar] [CrossRef] [Scilit]
  4. Akiyama, M.; Yagi, T.; Itoh, M. Searching Structural Neighborhood of Malicious URLs to Improve Blacklisting. In Proceedings of the 2011 IEEE/IPSJ International Symposium on Applications and the Internet, Munich, Germany, 18–21 July 2011. [Google Scholar]
  5. Pradeepa, G.; Devi, R. Review of Malicious URL Detection Using Machine Learning. In Advances in Intelligent Systems and Computing; Advances in Intelligent Systems and Computing; Springer: Singapore, 2022; pp. 97–105. [Google Scholar]
  6. Aljabri, M.; Altamimi, H.S.; Albelali, S.A.; Al-Harbi, M.; Alhuraib, H.T.; Alotaibi, N.K.; Alahmadi, A.A.; Alhaidari, F.; Mohammad, R.M.A.; Salah, K. Detecting Malicious URLs Using Machine Learning Techniques: Review and Research Directions. IEEE Access 2022, 10, 121395–121417. [Google Scholar] [CrossRef] [Scilit]
  7. Salman, A.D.; Khudheer, U.; Abdulsahib, G.M. An Adaptive Smart Street Light System for Smart City. J. Comput. Theor. Nanosci. 2019, 16, 262–268. [Google Scholar] [CrossRef] [Scilit]
  8. Gupta, D.; Garg, S.; Singh, A.; Batra, S.; Kumar, N.; Obaidat, M.S. ProIDS: Probabilistic Data Structures Based Intrusion Detection System for Network Traffic Monitoring. In Proceedings of the GLOBECOM 2017–2017 IEEE Global Communications Conference, Singapore, 4–8 December 2017; pp. 1–6. [Google Scholar]
  9. Khudhur, S. Supervised URLs Identification Dataset (SupURLsIdDs) Based on Lexical and Structural Features. IEEE Dataport. 14 November 2025. Available online: https://ieee-dataport.org/documents/supervised-urls-identification-dataset-supurlsidds-based-lexical-and-structural-features (accessed on 6 April 2026).
  10. Koukaras, P.; Tjortjis, C. Data Preprocessing and Feature Engineering for Data Mining: Techniques, Tools, and Best Practices. AI 2025, 6, 257. [Google Scholar] [CrossRef] [Scilit]
  11. Bloom, B.H. Space/Time Trade-Offs in Hash Coding with Allowable Errors. Commun. ACM 1970, 13, 422–426. [Google Scholar] [CrossRef] [Scilit]
  12. Singh, A.; Garg, S.; Kaur, R.; Batra, S.; Kumar, N.; Zomaya, A.Y. Probabilistic Data Structures for Big Data Analytics: A Comprehensive Review. Knowl. Based Syst. 2020, 188, 104987. [Google Scholar] [CrossRef] [Scilit]
  13. Fan, L.; Cao, P.; Almeida, J.; Broder, A.Z. Summary Cache: A Scalable Wide-Area Web Cache Sharing Protocol. IEEE ACM Trans. Netw. 2000, 8, 281–293. [Google Scholar] [CrossRef] [Scilit]
  14. Almeida, P.S.; Baquero, C.; Preguiça, N.; Hutchison, D. Scalable Bloom Filters. Inf. Process. Lett. 2007, 101, 255–261. [Google Scholar] [CrossRef] [Scilit]
  15. Waliullah, M.; George, M.Z.H.; Hasan, M.T.; Alam, M.K.; Munira, M.S.K.; Siddiqui, N.A. Assessing the Influence of Cybersecurity Threats and Risks on the Adoption and Growth of Digital Banking: A Systematic Literature Review. arXiv 2025, arXiv:2503.22710. [Google Scholar] [CrossRef] [Scilit]
  16. Tian, Y.; Yu, Y.; Sun, J.; Wang, Y. From Past to Present: A Survey of Malicious URL Detection Techniques, Datasets and Code Repositories. Comput. Sci. Rev. 2025, 58, 100810. [Google Scholar] [CrossRef] [Scilit]
  17. Sahingoz, O.K.; Buber, E.; Demir, O.; Diri, B. Machine Learning Based Phishing Detection from URLs. Expert Syst. Appl. 2019, 117, 345–357. [Google Scholar] [CrossRef] [Scilit]
  18. Huang, Y.; Yang, Q.; Qin, J.; Wen, W. Phishing URL Detection via CNN and Attention-Based Hierarchical RNN. In Proceedings of the 2019 18th IEEE International Conference on Trust, Security and Privacy in Computing and Communications/13th IEEE International Conference on Big Data Science and Engineering (TrustCom/BigDataSE), Rotorua, New Zeland, 5–8 August 2019. [Google Scholar]
  19. Tajaddodianfar, F.; Stokes, J.W.; Gururajan, A. Texception: A Character/Word-Level Deep Learning Model for Phishing URL Detection. In Proceedings of the ICASSP 2020–2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain, 4–8 May 2020. [Google Scholar]
  20. Saleem Raja, A.; Vinodini, R.; Kavitha, A. Lexical Features Based Malicious URL Detection Using Machine Learning Techniques. Mater. Today 2021, 47, 163–166. [Google Scholar] [CrossRef] [Scilit]
  21. Xuan, C.D.; Dinh, H.; Victor, T. Malicious URL Detection Based on Machine Learning. Int. J. Adv. Comput. Sci. Appl. 2020, 11, 148–152. [Google Scholar] [CrossRef] [Scilit]
  22. Nandhini, K.; Balasubramaniam, R. Malicious Website Detection Using Probabilistic Data Structure Bloom Filter. In Proceedings of the 2019 3rd International Conference on Computing Methodologies and Communication (ICCMC), Irode, India, 27–29 March 2019. [Google Scholar]
  23. Reviriego, P.; Alberto Hernandez, J.; Dai, Z.; Shrivastava, A. Learned Bloom Filters in Adversarial Environments: A Malicious URL Detection Use-Case. In Proceedings of the 2021 IEEE 22nd International Conference on High Performance Switching and Routing (HPSR), Paris, France, 7–10 June 2021. [Google Scholar]
  24. Patgiri, R.; Biswas, A.; Nayak, S. DeepBF: Malicious URL Detection Using Learned Bloom Filter and Evolutionary Deep Learning. Comput. Commun. 2023, 200, 30–41. [Google Scholar] [CrossRef] [Scilit]
  25. Mamun, M.S.I.; Rathore, M.A.; Lashkari, A.H.; Stakhanova, N.; Ghorbani, A.A. Detecting Malicious URLs Using Lexical Analysis. In Network and System Security; Lecture notes in computer science; Springer International Publishing: Cham, Switzerland, 2016; pp. 467–482. ISBN 9783319462974. [Google Scholar]
  26. Fsecurify.com. Available online: https://github.com/faizann24/Using-machine-learning-to-detect-malicious-URLs (accessed on 6 April 2026).
  27. PhishTank. Developer Information. Available online: https://www.phishtank.com/developer_info.php (accessed on 6 April 2026).
  28. Marchal, S. PhishStorm—Phishing/Legitimate URL Dataset; Aalto University: Otaniemi, Finland, 2014. [Google Scholar]
  29. McKnight, L.; Jaiswal, C.; AlHmoud, I.; Gokaraju, B. A Dataset of Deep Learning Performance from Cross-Base Data Encoding on MNIST and MNIST-C. Data Brief 2024, 57, 111194. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  30. Huang, L.; Qin, J.; Zhou, Y.; Zhu, F.; Liu, L.; Shao, L. Normalization Techniques in Training DNNs: Methodology, Analysis and Application. IEEE Trans. Pattern Anal. Mach. Intell. 2023, 45, 10173–10196. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  31. Lei, T.; Cai, R.; Yang, J.-M.; Ke, Y.; Fan, X.; Zhang, L. A Pattern Tree-Based Approach to Learning URL Normalization Rules. In Proceedings of the 19th International Conference on World Wide Web; ACM: New York, NY, USA, 2010; pp. 611–620. [Google Scholar]
  32. Luo, L.; Guo, D.; Ma, R.T.B.; Rottenstreich, O.; Luo, X. Optimizing Bloom Filter: Challenges, Solutions, and Comparisons. IEEE Commun. Surv. Tutor. 2019, 21, 1912–1949. [Google Scholar] [CrossRef] [Scilit]
  33. Huang, P.-J.; Ding, C.-F. A Comprehensive Evaluation of Accuracy and Performance Metrics for a Laser On-the-Fly Processing Control System. Precis. Eng. 2025, 93, 310–323. [Google Scholar] [CrossRef] [Scilit]
  34. Bhatt, M.; Mishra, A.; Kabir, M.W.U.; Blake-Gatto, S.E.; Rajendra, R.; Hoque, M.T.; Ahmed, I. Hierarchy-Based File Fragment Classification. Mach. Learn. Knowl. Extr. 2020, 2, 216–232. [Google Scholar] [CrossRef] [Scilit]
  35. Zhao, S.; Talasila, M.; Jacobson, G.; Borcea, C.; Aftab, S.A.; Murray, J.F. Packaging and Sharing Machine Learning Models via the Acumos AI Open Platform. In Proceedings of the 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), Orlando, FL, USA, 17–20 December 2018. [Google Scholar]
Figure 1. Conceptual high-level overview of the NetGuard architecture.
Figure 1. Conceptual high-level overview of the NetGuard architecture.
Jcp 06 00102 g001
Figure 2. Distribution of URLs across different classes.
Figure 2. Distribution of URLs across different classes.
Jcp 06 00102 g002
Figure 3. The Flowchart diagram of the HSDF main process: (a) represents the addition (insertion) process and (b) represents the other processes (lookup and deletion).
Figure 3. The Flowchart diagram of the HSDF main process: (a) represents the addition (insertion) process and (b) represents the other processes (lookup and deletion).
Jcp 06 00102 g003
Figure 4. Machine learning pipeline for the Classifier Construction Module.
Figure 4. Machine learning pipeline for the Classifier Construction Module.
Jcp 06 00102 g004
Figure 5. Boxplot of URL lengths across different classes.
Figure 5. Boxplot of URL lengths across different classes.
Jcp 06 00102 g005
Figure 6. Top 10 most frequent top-level domains in the dataset.
Figure 6. Top 10 most frequent top-level domains in the dataset.
Jcp 06 00102 g006
Figure 7. Distribution of digits and special characters.
Figure 7. Distribution of digits and special characters.
Jcp 06 00102 g007
Figure 8. The bounded false-positive rate (FPR) of HSDF, CBF, and SBF when processing the four parts of the dataset.
Figure 8. The bounded false-positive rate (FPR) of HSDF, CBF, and SBF when processing the four parts of the dataset.
Jcp 06 00102 g008
Figure 9. The memory consumption rate of HSDF when processing the four parts of the dataset.
Figure 9. The memory consumption rate of HSDF when processing the four parts of the dataset.
Jcp 06 00102 g009
Figure 10. The delete and query latency for the proposed filter (HSDF) and CBF, under the three subsets of URLs with several sizes (10,000, 20,000, 50,000, and 100,000).
Figure 10. The delete and query latency for the proposed filter (HSDF) and CBF, under the three subsets of URLs with several sizes (10,000, 20,000, 50,000, and 100,000).
Jcp 06 00102 g010
Figure 11. The delete and query throughput for the proposed filter (HSDF) and CBF, under the three subsets of URLs with several sizes (10,000, 20,000, 50,000, and 100,000).
Figure 11. The delete and query throughput for the proposed filter (HSDF) and CBF, under the three subsets of URLs with several sizes (10,000, 20,000, 50,000, and 100,000).
Jcp 06 00102 g011
Figure 12. The false and residual positive rate for the proposed filter (HSDF) and CBF, under the three subsets of URLs with several sizes (10,000, 20,000, 50,000, and 100,000).
Figure 12. The false and residual positive rate for the proposed filter (HSDF) and CBF, under the three subsets of URLs with several sizes (10,000, 20,000, 50,000, and 100,000).
Jcp 06 00102 g012
Figure 13. Confusion matrix of the NetGuard-classifier on the (a) ISCX-URL-2016 and (b) SupURLsIdDs datasets.
Figure 13. Confusion matrix of the NetGuard-classifier on the (a) ISCX-URL-2016 and (b) SupURLsIdDs datasets.
Jcp 06 00102 g013
Table 3. Extracted URL features and their characteristics.
Table 3. Extracted URL features and their characteristics.
FeatureMeaningTypeDerived FromImportance for Malicious Identification
URL lengthTotal number of characters in the normalized URLLexicalUsing Normalized URLsHigh values indicate elongated structures or parameter padding (malware, phishing).
Number of special charsNon-alphanumeric countLexicalHigh counts indicate unclear or machine-generated (malware).
Count of digitsNumeric characters in URLLexicalHigh counts indicate unclear or machine generation (malware).
TLD lengthLength of top-level domainLexicalGeneral domain characteristic.
Count of hyphensTotal count of hyphens (-) in the URLLexicalHigh values may indicate deceptive domain naming (phishing).
EntropyShannon entropy (randomness) of the URL stringLexicalHigh values are a strong indicator of using Domain Generation Algorithms (DGAs) (malware).
Full TLD lengthLength of the entire domain suffixPhishing-specificThe complex TLD structures refer to domain masking (phishing).
Has @ symbolBoolean (1/0) indicating the presence of @ in the URLStructuralA crucial indicator of phishing URL structures.
Count dir (slashes)Number of ‘/’ in pathStructuralUsing Parsed URLsHigh value can be used as indication to cloak (defacement, malware).
Uses HTTPSBoolean (1/0) indicating the use of the secure protocol.StructuralMay indicate the absence of official secure protocol usage.
Hostname lengthLength of domain/subdomainStructuralAbnormal length can indicate suspicious structure.
Path lengthLength of URL pathStructuralHigh values indicate there is hidden file/page depth (malware, defacement).
Is IPBoolean (1/0) indicating if the hostname is an IPv4 address.StructuralUsed to avoid DNS lookups/blocklists (malware, phishing).
Num subdomainsCount of dots (.) in the hostname.Phishing-specificHigh values indicate that it relies on free subdomains or domain masking (phishing).
Path contains loginBoolean (1/0) if the path contains keywords like ‘login’, ‘bank’, etc.Phishing-specificDirect indication of a deceptive attempt to get user trust (phishing).
Table 4. Baseline classes and details of the SupURLsIdDs dataset.
Table 4. Baseline classes and details of the SupURLsIdDs dataset.
ClassSupport (Count)Percentage (%)
benign428,10365.74
defacement96,45714.81
phishing94,11114.45
malware32,5204.99
Table 5. Structural and statistical baseline details of SupURLsIdDs dataset.
Table 5. Structural and statistical baseline details of SupURLsIdDs dataset.
FeatureCountMeanStd. Dev.MinMax
Lexical/Structuralnum_special_chars651,1918.1147.3850369
count_digits651,1915.52711.70101204
Tld_length651,1912.9940.907018
url_length651,19157.15743.5612175
hostname_length651,19116.65911.2430244
path_length651,19141.15429.7702175
count_dir651,1912.3171.567039
count_hyphens651,1911.552.974087
entropy651,1914.1320.39707.111
num_subdomains651,1911.4151.023034
full_tld_length651,1912.9940.907018
Binary Featureshas_at_symbol651,1910.0020.04501
uses_https651,1910.0240.15301
is_ip651,1910.0110.10501
path_contains_login651,1910.0390.19401
Table 6. The hyperparameter tuning result of the DT classifier.
Table 6. The hyperparameter tuning result of the DT classifier.
ParameterMeaningTested ValuesBest Value
criterionQuality function of a split.{‘gini’, ‘entropy’}entropy
max_depthThe maximum depth of the tree.{5, 10, 15, 20, None}20
min_samples_splitThe minimum number of samples required to split an internal node.{2, 5, 10, 20}2
min_samples_leafThe minimum number of samples required to be at a leaf node.{1, 5, 10}1
class_weightWeights associated with classes.{‘balanced’, None}None
Best cross-validation score (f1_weighted): 0.9401 ± 0.0018
Table 7. The hyperparameter tuning result of the RF classifier.
Table 7. The hyperparameter tuning result of the RF classifier.
ParameterMeaningTested ValuesBest Value
n_estimatorsThe number of DTs in the forest.Random int range from 100 to 500443
max_depthThe maximum depth of each tree.10,20, 3030
min_samples_splitThe minimum number of samples required to split an internal node.Random int range from 2 to 93
min_samples_leafThe minimum number of samples required to be at a leaf node.Random int range from 1 to 31
max_featuresThe number of features to consider when looking for the best split.sqrt, log2log2
class_weightWeights associated with classes.[‘balanced’]‘balanced’
Best cross-validation score (f1_weighted): 0.9552 ± 0.0011
Table 8. Classification report for the tuned DT classifier with enhanced features.
Table 8. Classification report for the tuned DT classifier with enhanced features.
ClassPrecisionRecallF1-ScoreSupport
benign0.9588 ± 0.00140.9765 ± 0.00110.9676 ± 0.0012128,733
defacement0.9462 ± 0.00190.9645 ± 0.00160.9553 ± 0.001528,692
malware0.9352 ± 0.00220.9188 ± 0.00250.9269 ± 0.00219699
phishing0.8813 ± 0.00290.7949 ± 0.00350.8359 ± 0.003028,234
accuracy 0.9456 ± 0.0016195,358
macro avg0.9304 ± 0.00180.9137 ± 0.00200.9214 ± 0.0018195,358
weighted avg0.9446 ± 0.00160.9456 ± 0.00160.9447 ± 0.0015195,358
Table 9. Classification report for the tuned RF classifier with enhanced features.
Table 9. Classification report for the tuned RF classifier with enhanced features.
ClassPrecisionRecallF1-ScoreSupport
benign0.9642 ± 0.00110.9833 ± 0.00080.9737 ± 0.0009128,733
defacement0.9681 ± 0.00150.9819 ± 0.00120.9750 ± 0.001128,692
malware0.9841 ± 0.00090.9298 ± 0.00210.9562 ± 0.00149699
phishing0.9071 ± 0.00240.8293 ± 0.00310.8664 ± 0.002628,234
accuracy 0.9582 ± 0.0012195,358
macro avg0.9559 ± 0.00130.9311 ± 0.00160.9428 ± 0.0014195,358
weighted avg0.9575 ± 0.00120.9582 ± 0.00120.9575 ± 0.0011195,358
Table 11. NetGuard-classifier performance breakdown across the ISCX-URL-2016 and SupURLsIdDs datasets.
Table 11. NetGuard-classifier performance breakdown across the ISCX-URL-2016 and SupURLsIdDs datasets.
DatasetSchemeAccuracy (%)Recall (Phishing)
ISCX-URL-2016 5-class97.57%0.96
SupURLsIdDs 4-Class96%0.83
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Khudhur, S.D.; Samaan, S.S.; Taher, O.N.M.; D. Salman, A.; Humaidi, A.J. NetGuard: A Hybrid Framework for Intelligent and Scalable Malicious URL Detection. J. Cybersecur. Priv. 2026, 6, 102. https://doi.org/10.3390/jcp6030102

AMA Style

Khudhur SD, Samaan SS, Taher ONM, D. Salman A, Humaidi AJ. NetGuard: A Hybrid Framework for Intelligent and Scalable Malicious URL Detection. Journal of Cybersecurity and Privacy. 2026; 6(3):102. https://doi.org/10.3390/jcp6030102

Chicago/Turabian Style

Khudhur, Saja D., Sama S. Samaan, Omar N. M. Taher, Aymen D. Salman, and Amjad J. Humaidi. 2026. "NetGuard: A Hybrid Framework for Intelligent and Scalable Malicious URL Detection" Journal of Cybersecurity and Privacy 6, no. 3: 102. https://doi.org/10.3390/jcp6030102

APA Style

Khudhur, S. D., Samaan, S. S., Taher, O. N. M., D. Salman, A., & Humaidi, A. J. (2026). NetGuard: A Hybrid Framework for Intelligent and Scalable Malicious URL Detection. Journal of Cybersecurity and Privacy, 6(3), 102. https://doi.org/10.3390/jcp6030102

Article Metrics

Back to TopTop