arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.23196cs.CR
收藏

AsmRAG:通过检索功能相似的汇编代码实现LLM驱动的恶意软件检测

AsmRAG: LLM-Driven Malware Detection by Retrieving Functionally Similar Assembly Code

Joaan Bin Jassim Academy for Defence Studies(贾汉·本·贾西姆国防研究学院)

ElMouatez Billah Karbab

AI总结:

本文提出AsmRAG框架,利用LLM分析汇编代码,通过语义检索提升恶意软件检测的可解释性与鲁棒性,实验表明其在检测和家族归因任务中达到96%和95%的F1分数。

摘要:

深度学习恶意软件检测器虽能实现高分类准确率,但存在严重的可解释性限制,通常返回概率性结论缺乏取证上下文。我们引入AsmRAG框架,通过汇编级检索增强生成进行恶意软件分析。与基于全局统计特征的分类器不同,AsmRAG将检测重新表述为基于证据的检索任务。系统使用专门针对代码的大型语言模型(LLM)分析汇编函数并将其转换为语义嵌入。此过程构建了一个能抵御语法混淆的可搜索知识库。在推理阶段,我们提出了一种密度加权锚点选择机制,用于隔离二进制中的主要恶意逻辑单元以提取可验证的取证证据并抵抗逃避尝试。在经过精心整理的40000个二进制文件数据集上测试显示,AsmRAG在检测任务中达到96%的F1分数,同时在家族归因任务中达到95%的F1分数。比较表明,这种语义检索方法在对抗性混淆中仍保持稳健。当整体基线(EMBER和ResNeXt)性能下降时,我们的方法为安全运营中心提供了一个透明且可靠的替代方案。

英文摘要:

Deep learning malware detectors achieve high classification accuracy but suffer from severe interpretability limitations, typically returning probabilistic verdicts that lack forensic context. We introduce AsmRAG, a framework performing malware analysis through Assembly-Level Retrieval-Augmented Generation. Unlike classifiers built on global statistical features, AsmRAG reformulates detection as an evidence-based retrieval task. The system uses a code-specialized Large Language Model (LLM) to analyze assembly functions and convert them into semantic embeddings. This process constructs a searchable knowledge base resilient to syntactic obfuscation. For inference, we propose a Density-Weighted Anchor Selection mechanism that isolates the primary unit of malicious logic within a binary to extract verifiable forensic evidence and resist evasion attempts. Testing on a curated dataset of 40k binaries shows AsmRAG reaching a detection F1-score of 96% alongside a family attribution F1-score of 95%. Comparisons confirm this semantic retrieval approach remains robust against metamorphic obfuscation. When holistic baselines (EMBER and ResNeXt) degrade, our methodology gives Security Operations Centers a transparent and reliable alternative.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑