started · updated
Local LLMs show high accuracy in detecting malicious website code
A master's thesis by Isabella Petrache evaluates the effectiveness of local Large Language Models (LLMs) in detecting and classifying malicious code on websites. Using static WARC datasets derived from real-world web security monitoring, the research developed an experimental pipeline to preprocess files and perform few-shot prompted inference using open-weight LLMs.
The study focused on two primary tasks: distinguishing clean samples from malicious ones and attributing malicious samples to specific client-side malware classes, including ClickFix, HTMLredirect, and SeoSpam. The results demonstrated up to 98% accuracy in binary detection and 85.3% accuracy in multi-class classification. The findings suggest that local LLMs offer a promising, privacy-preserving approach for web security, though practical utility remains dependent on input representation, aggregation logic, and inference efficiency.