Prophiler: a fast filter for the large-scale detection of malicious web pages

Davide Canali, Marco Cova, Giovanni Vigna, Christopher Kruegel

Abstract

Prophiler is a high-speed static analysis filter designed to "triage" the massive influx of web pages for malicious content. By utilizing machine learning to analyze HTML, JavaScript, and URL features without actually executing code, it reduces the workload of expensive dynamic analysis tools (honeyclients) by over 85% while maintaining a very low miss rate. This system enables security researchers to scale their detection capabilities to millions of URLs daily, effectively addressing the bottleneck inherent in dynamic analysis.

Introduction

The primary threat on the modern web is the "drive-by-download" attack, where a compromised or malicious website exploits a visitor's browser to install malware automatically. To catch these, security researchers traditionally use honeyclients—automated browsers running in virtual machines that visit sites and monitor for signs of infection, such as unauthorized file writes.

However, the bottleneck is speed. A honeyclient can take seconds or even minutes to analyze a single page because it must render the site and execute all scripts. When scanning millions of URLs daily, this approach does not scale. Prophiler addresses this by proposing a "fast filter" that can quickly discard obviously benign pages, leaving only the suspicious ones for heavy-duty dynamic tools.

System Architecture and Triage Philosophy

Prophiler operates on a "triage" philosophy. In a filtering system, false positives (benign pages flagged as malicious) are acceptable because the back-end honeyclient will eventually clear them. However, false negatives (malicious pages missed) are critical. Prophiler is tuned to be aggressive to ensure it misses as little as possible.

The Prophiler system architecture and data flow.

As shown in the architecture, seeds are gathered from various sources including search engine trends and spam link databases. These are fed into a crawler, which passes pages to Prophiler. Only pages flagged as suspicious are forwarded to a dynamic analysis tool like Wepawet, while the final classifications and page features are stored in a central database.

Methods and Feature Extraction

Prophiler relies on static analysis, examining the "dead" code and metadata of a page rather than running it. The system extracts a comprehensive set of 77 features across four categories:

  1. HTML Features (19): Looks for structural anomalies like hidden iframes, elements with tiny dimensions (often used to hide exploits), and "out-of-place" tags (e.g., scripts outside the <html> tag).
  2. JavaScript Features (25): Instead of running the script, Prophiler parses it into an Abstract Syntax Tree (AST) to look for signs of obfuscation, such as high string entropy or excessive use of eval().
  3. URL and Host Features (33): Analyzes the reputation and syntax of the URL, including Top-Level Domain (TLD), IP-based hosting, Whois registration age, and DNS record TTLs.
Comparison of feature counts across different detection systems.

These features are fed into machine learning classifiers (specifically Random Forest and J48 decision trees). Prophiler uses an ensemble approach: if any of the specialized models flags a page as suspicious, it is forwarded for dynamic analysis. As illustrated in the feature comparison table, Prophiler utilizes a significantly more diverse and numerous set of features than previous state-of-the-art static filters.

Key Results

The authors validated Prophiler using several datasets, including a massive 60-day crawl of 18.9 million pages. Key findings include:

  • Efficiency: Prophiler reduced the load on the back-end dynamic analysis system by 85.7%, saving the equivalent of over 400 days of processing time during the trial.
  • Speed: The system processed pages at an average rate of 0.27 seconds per page, making it orders of magnitude faster than dynamic analysis.
  • Accuracy: On the validation set, Prophiler achieved a false negative rate of only 0.54%, catching nearly all malicious pages while successfully filtering out the vast majority of benign ones.

Limitations and Future Work

While highly effective, Prophiler faces challenges from sophisticated attackers who may use "mimicry" to make malicious pages look benign or employ complex dynamic obfuscation that static analysis cannot resolve. Additionally, the current version does not analyze CSS files, which can occasionally be used in attacks. Future work involves expanding the feature set to include dynamic code generation patterns and improving resistance to evasion techniques.

Summary updated

BibTeX
@inproceedings{canali2011prophiler,
  author = {Davide Canali and Marco Cova and Giovanni Vigna and Christopher Kruegel},
  title = {{Prophiler: a fast filter for the large-scale detection of malicious web pages}},
  booktitle = {The Web Conference},
  year = {2011},
  doi = {10.1145/1963405.1963436},
}
Figure