Skip to main content
QUICK REVIEW

[Paper Review] Using Lexical Features for Malicious URL Detection -- A Machine Learning Approach

Apoorva Joshi, Levi Lloyd|arXiv (Cornell University)|Oct 14, 2019
Spam and Phishing DetectionComputer Science24 citations
TL;DR

This paper proposes a machine learning ensemble model that uses static lexical features extracted directly from URL strings to detect malicious URLs with high sensitivity. The approach achieves a 0.1% average false negative rate, 92% accuracy, and 0.98 AUC, significantly improving detection in real-time email security workflows with minimal latency.

ABSTRACT

Malicious websites are responsible for a majority of the cyber-attacks and scams today. Malicious URLs are delivered to unsuspecting users via email, text messages, pop-ups or advertisements. Clicking on or crawling such URLs can result in compromised email accounts, launching of phishing campaigns, download of malware, spyware and ransomware, as well as severe monetary losses. A machine learning based ensemble classification approach is proposed to detect malicious URLs in emails, which can be extended to other methods of delivery of malicious URLs. The approach uses static lexical features extracted from the URL string, with the assumption that these features are notably different for malicious and benign URLs. The use of such static features is safer and faster since it does not involve crawling the URLs or blacklist lookups which tend to introduce a significant amount of latency in producing verdicts. The goal of the classification was to achieve high sensitivity i.e. detect as many malicious URLs as possible. URL strings tend to be very unstructured and noisy. Hence, bagging algorithms were found to be a good fit for the task since they average out multiple learners trained on different parts of the training data, thus reducing variance. The classification model was tested on five different testing sets and produced an average False Negative Rate (FNR) of 0.1%, average accuracy of 92% and average AUC of 0.98. The model is presently being used in the FireEye Advanced URL Detection Engine (used to detect malicious URLs in emails), to generate fast real-time verdicts on URLs. The malicious URL detections from the engine have gone up by 22% since the deployment of the model into the engine workflow. The results obtained show noteworthy evidence that a purely lexical approach can be used to detect malicious URLs.

Motivation & Objective

  • Address the growing threat of malicious URLs in cyberattacks, particularly via phishing and malware delivery.
  • Reduce latency in malicious URL detection by avoiding dynamic analysis or blacklist lookups.
  • Improve detection sensitivity to minimize missed malicious URLs in email security workflows.
  • Demonstrate the effectiveness of purely lexical features in distinguishing malicious from benign URLs.
  • Develop a scalable, real-time solution deployable in production security systems like FireEye's URL detection engine.

Proposed method

  • Extract static lexical features from URL strings, such as length, special characters, digit frequency, and subdomain patterns.
  • Apply bagging-based ensemble learning (e.g., Random Forest or similar) to reduce variance and improve robustness on noisy, unstructured URLs.
  • Train the model on diverse URL datasets to generalize across different malicious URL patterns.
  • Use a threshold-based classification to prioritize minimizing false negatives, aligning with the goal of high sensitivity.
  • Leverage feature engineering to capture linguistic and syntactic anomalies common in malicious URLs.
  • Deploy the model in a real-time pipeline for email-based URL analysis, avoiding resource-intensive crawling or external lookups.

Experimental results

Research questions

  • RQ1Can purely lexical features from URL strings effectively distinguish malicious from benign URLs?
  • RQ2How does a bagging-based ensemble model perform in detecting malicious URLs compared to other machine learning approaches?
  • RQ3To what extent can a static, lexical-based method achieve high sensitivity without requiring URL crawling or external blacklists?
  • RQ4What is the impact of such a model on real-world detection performance in production email security systems?
  • RQ5How does the model’s performance scale across diverse, real-world URL datasets?

Key findings

  • The model achieved an average false negative rate (FNR) of 0.1%, indicating near-complete detection of malicious URLs.
  • The model recorded an average accuracy of 92% across five different testing sets, demonstrating strong generalization.
  • The area under the ROC curve (AUC) averaged 0.98, indicating excellent discriminative performance between malicious and benign URLs.
  • Deployment in FireEye’s Advanced URL Detection Engine led to a 22% increase in malicious URL detections post-integration.
  • The approach proved effective and efficient, enabling low-latency, real-time verdicts without requiring dynamic analysis or external lookups.
  • The results provide strong evidence that lexical features alone can serve as a reliable basis for high-accuracy malicious URL detection.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.