0:00
–:––
React at 0:00
Black Hat USA 2025

LLMDYara: LLMs-Driven Automated YARA Rules Generation with Explainable File Features and DNAHash

Xiaochen Wang, Alibaba Cloud; Yiping Liu, Alibaba Cloud; Xiaoman Wang, Alibaba Cloud; Cong Cheng, Alibaba CloudMalware

When and where

Day
Wed 6 Aug 2025
Time
14:30 to 15:00 PDT
Room
Jasmine A & E, Level 3
Track
Malware

Speakers

  • Xiaochen WangAlibaba Cloud

    Xiaochen Wang is a security engineer with extensive expertise in reverse engineering and malware detection. She holds an MS in Cybersecurity (2021). At Alibaba Cloud, she currently focuses on static malware detection and the design and development of antivirus engine.

  • Yiping LiuAlibaba Cloud

    Yiping Liu is a security engineer with a keen interest in reverse engineering, malware analysis, and related domains. Currently, she is focused on research in reverse engineering and binary malware detection at Alibaba Cloud. She received awards in CTF competitions like XCTF as a reverse engineering specialist. She is also a co-author of the TDSC'22 paper "MsDroid: Identifying Malicious Snippets for Android Malware Detection", which pioneered the application of explainable techniques to uncover malicious code patterns in Android malware, bridging the gap between advanced machine learning models and human-analyzable insights.

  • Xiaoman WangAlibaba Cloud

    Xiaoman Wang is a Senior Security Engineer at Alibaba Cloud Security Center. He holds an MS in Cybersecurity (2020) and was a core member of the CTF team Never Stop Exploiting, specializing in web penetration testing and system security research. Currently, he focuses on advanced malware analysis and building next-generation threat detection systems.

  • Cong ChengAlibaba Cloud

    Cong Cheng is a Senior Security Engineer at Alibaba Cloud, interested in malware analysis, windows internals, and virtualization security.

Abstract

Malware on the cloud is growing massively every day, and an automated rule generation solution is needed to improve operational efficiency. YARA is a widely used tool for creating malware signatures and detection rules, however, existing YARA-based automated rules generation solutions suffer from limitations in three key areas: rule quality, false positive rates, and the interpretability of features. These shortcomings restrict their effectiveness in real-world malicious threat detection scenarios. In this presentation, we will introduce LLMDYara, which is an automated rule generation solution that integrates expert knowledge with large language models. We first utilize expert knowledge to pre-extract string, function, and file DNAHash features. Subsequently, we design a function signature algorithm and an efficient querying similarity search mechanism to filter these features against a billion-scale white database, thereby enhancing feature quality. We then leverage large models for string feature evaluation and functional identification of function fragments, where the latter enhanced the interpretability of opcode features. Finally, we generated YARA rules through an ensemble decision based on selected features. Our newly introduced file DNAHash feature ensures rule usability even when other features have lower quality, further reducing false positives. Our automated rule generation solution has made efforts to address challenges such as reducing false positives, enhancing feature interpretability, and improving rule quality. Additionally, we will share our experiences in feature engineering and large language model fine-tuning, with the hope that these insights will help advance the application of large language models in the program analysis domain.

What you'll get from it

Writing YARA rules by hand doesn't scale with the amount of malware turning up in the cloud, and existing automated tools tend to give noisy rules that are hard to interpret. Xiaochen Wang, Yiping Liu and their colleagues explain LLMDYara, which pairs expert feature extraction and a billion-scale whitelist check with language models that judge strings and describe function fragments. A file DNAHash feature keeps rules usable when other features are weak. The team also shares lessons from feature engineering and model fine-tuning, which detection engineers working with LLMs will find useful.

Did you find what you came for?