A feature-efficient hierarchical classification strategy for malicious URL detection
摘要
Malicious URLs are a primary delivery vector for phishing, malware distribution, and various web-based cyberattacks. Their large-scale generation and rapid evolution make automated detection systems essential for modern cybersecurity infrastructures. However, multiclass malicious URL detection remains challenging due to class imbalance and structural similarities among benign and malicious URL categories, which may degrade classifier stability and category-level consistency. To address this challenge, we propose a hierarchical binary classification framework that decomposes the multiclass task into a sequence of structured binary decisions. We evaluate the proposed approach on two benchmark datasets: ISCX-URL2016 and Kaggle Malicious URLs. For feature representation, we extract handcrafted lexical–structural features (MANU), transformer-based contextual embeddings (BERT), and their hybrid fusion (MANU_BERT) to capture complementary URL characteristics. To reduce downstream feature dimensionality, we apply evolutionary feature selection techniques, including Genetic Algorithm (GA), Population-Based Incremental Learning (PBIL), and Grey Wolf Optimization (GWO), and construct compact feature subsets. Comparative experiments with classical machine learning and ANN-based flat multiclass models show that the proposed hierarchical framework provides competitive and feature-efficient classification performance. Using the MANU_BERT_FS representation, the proposed method achieves 0.9954 accuracy and 0.9938 F1-score on ISCX-URL2016, and 0.9887 accuracy with 0.9857 F1-score on the Kaggle dataset.