Back to search

Queen's University at Kingston

LLM-Based YARA Rule Generation for Malware Triage

Abstract

dc:description.abstract

YARA rules are an important method for malware detection: they work via pattern matching, specifying a set of strings and conditions that a file must meet to be classified as belonging to a specific malware family. Writing YARA rules for a given malware family can be difficult, as it requires sifting through known malware instances to identify high quality signatures. For this reason, there is a growing body of work on the automation of YARA rule generation. At present, there are a number of tools available for automatically generating YARA rules; importantly, however, most of these tools predate the rise of Large Language Models. There is thus a need in the literature for work on the application of Large Language Models to the problem of YARA rule generation. The present thesis explores this space, developing a pipeline for intelligently generating YARA rules for malware families via Large Language Models. This pipeline is then used to benchmark several large Language Models –including GPT-4o, Llama 3.1, and Gemma 3 – in terms of their ability to generate high-quality YARA rules. We found that GPT-4o generates YARA rules with the best balance between coverage and false positive rates. Moreover, our GPT-4o-based pipeline achieves performance competitive with state-of-the-art benchmarks, thus demonstrating the utility of Large Language models in the context of static malware detection.

Degree

thesis:*
Department dc:contributor.department
Computing
Grantor
Queen's University at Kingston
Year dc:date.issued
2026

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Beninger, Max
Advisors dc:contributor.supervisor
  • Ding, Steven
  • Zulkernine, Mohammad

Subjects

dc:subject × 4

Rights

dc:rights
Statement dc:rights
  • Attribution-NonCommercial 4.0 International
Language dc:language.iso
eng

Identifiers

dc:identifier.*
Handle dc:identifier.uri
https://hdl.handle.net/1974/36382

Chain of custody

source
Harvested from
Queens University
Base URL
qspace.library.queensu.ca/server/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Beninger, Max. LLM-Based YARA Rule Generation for Malware Triage. Queen's University at Kingston, 2026. https://hdl.handle.net/1974/36382