Client-Side Zero-Shot LLM Inference for Comprehensive In-Browser URL Analysis

๐Ÿ“… 2025-06-04
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF

career value

192K/year
๐Ÿค– AI Summary
To address weak generalization, high privacy risks, and vulnerability to advanced adversarial threats in cloud-based malicious URL detection, this paper proposes the first browser-side zero-shot large language model (LLM) security analysis framework. Our method fuses JavaScript abstract syntax trees, dynamic execution traces of DOM/API/network behavior within a sandboxed iframe, and visible page contentโ€”enabling real-time, fine-grained maliciousness classification and interpretable threat reporting via multi-source heterogeneous contextual prompting, without parameter fine-tuning. Technically, it integrates WebLLM for lightweight on-device LLM deployment, a genuine browser-based iframe sandbox, and hybrid static-dynamic analysis. Experiments demonstrate that locally executing 3B- or 8B-parameter models achieves detection accuracy comparable to state-of-the-art cloud-based approaches, while providing strong privacy preservation, robustness against anti-analysis techniques, and out-of-the-box generalization across unseen threat variants.

Technology Category

Application Category

๐Ÿ“ Abstract
Malicious websites and phishing URLs pose an ever-increasing cybersecurity risk, with phishing attacks growing by 40% in a single year. Traditional detection approaches rely on machine learning classifiers or rule-based scanners operating in the cloud, but these face significant challenges in generalization, privacy, and evasion by sophisticated threats. In this paper, we propose a novel client-side framework for comprehensive URL analysis that leverages zero-shot inference by a local large language model (LLM) running entirely in-browser. Our system uses a compact LLM (e.g., 3B/8B parameters) via WebLLM to perform reasoning over rich context collected from the target webpage, including static code analysis (JavaScript abstract syntax trees, structure, and code patterns), dynamic sandbox execution results (DOM changes, API calls, and network requests),and visible content. We detail the architecture and methodology of the system, which combines a real browser sandbox (using iframes) resistant to common anti-analysis techniques, with an LLM-based analyzer that assesses potential vulnerabilities and malicious behaviors without any task-specific training (zero-shot). The LLM aggregates evidence from multiple sources (code, execution trace, page content) to classify the URL as benign or malicious and to provide an explanation of the threats or security issues identified. We evaluate our approach on a diverse set of benign and malicious URLs, demonstrating that even a compact client-side model can achieve high detection accuracy and insightful explanations comparable to cloud-based solutions, while operating privately on end-user devices. The results show that client-side LLM inference is a feasible and effective solution to web threat analysis, eliminating the need to send potentially sensitive data to cloud services.
Problem

Research questions and friction points this paper is trying to address.

Detect malicious URLs using client-side LLM without cloud dependency
Analyze webpage context via static and dynamic in-browser methods
Provide zero-shot URL classification with privacy-preserving local inference
Innovation

Methods, ideas, or system contributions that make the work stand out.

Client-side zero-shot LLM inference for URL analysis
Compact LLM performs multi-source evidence reasoning
Real browser sandbox resists anti-analysis techniques