[论文解读] A RAG-Based Question-Answering Solution for Cyber-Attack Investigation and Attribution
本论文提出首个基于检索增强生成(RAG)的问答系统,专为网络攻击调查与归因设计,利用 AttackER 知识库和基于 Mistral 的大语言模型(LLM),提供准确且附有来源引用的答案。该系统在减少幻觉和提升可靠性方面优于 GPT-3.5 和 GPT-4o,通过生成有依据的回答实现更优表现。
In the constantly evolving field of cybersecurity, it is imperative for analysts to stay abreast of the latest attack trends and pertinent information that aids in the investigation and attribution of cyber-attacks. In this work, we introduce the first question-answering (QA) model and its application that provides information to the cybersecurity experts about cyber-attacks investigations and attribution. Our QA model is based on Retrieval Augmented Generation (RAG) techniques together with a Large Language Model (LLM) and provides answers to the users' queries based on either our knowledge base (KB) that contains curated information about cyber-attacks investigations and attribution or on outside resources provided by the users. We have tested and evaluated our QA model with various types of questions, including KB-based, metadata-based, specific documents from the KB, and external sources-based questions. We compared the answers for KB-based questions with those from OpenAI's GPT-3.5 and the latest GPT-4o LLMs. Our proposed QA model outperforms OpenAI's GPT models by providing the source of the answers and overcoming the hallucination limitations of the GPT models, which is critical for cyber-attack investigation and attribution. Additionally, our analysis showed that when the RAG QA model is given few-shot examples rather than zero-shot instructions, it generates better answers compared to cases where no examples are supplied in addition to the query.
研究动机与目标
- 为应对非结构化、非标准化的威胁情报报告所带来的手动、耗时的网络攻击归因挑战。
- 通过将回答基于精心整理的知识库,减少大语言模型在网络安全威胁分析中的幻觉和过时知识问题。
- 开发一种可靠、透明的问答系统,支持网络安全分析师在可验证来源的基础上开展攻击调查与归因。
- 使用多种指标评估基于 RAG 的问答系统在专业网络攻击归因问题上的性能表现。
- 探究少样本提示(few-shot prompting)在网络安全攻击调查背景下的答案质量影响。
提出的方法
- 系统采用基于 Mistral 的大语言模型与基于 AttackER 数据集构建的知识库的 RAG 架构,该数据集包含经整理的网络攻击调查与归因报告。
- 通过密集向量嵌入与语义相似度匹配实现检索,从知识库中提取相关上下文片段。
- 大语言模型基于检索到的上下文生成答案,确保来源引用并减少幻觉。
- 模型支持三种输入类型:知识库查询、私有代码库查询,以及通过从外部源检索实现的基于网络的查询。
- 应用少样本提示以提升答案的准确度与相关性,提示内容包含示例查询与正确答案。
- 评估采用自定义的问答对数据集,以及忠实度、答案相关性、上下文精确度和正确性等指标。
实验结果
研究问题
- RQ1基于 RAG 的问答系统是否能在网络攻击归因任务中,提供准确且附有来源引用的答案方面,优于通用大语言模型如 GPT-3.5 和 GPT-4o?
- RQ2在网络安全攻击调查背景下,少样本提示如何影响答案的质量与可靠性?
- RQ3与微调或零样本提示的大语言模型相比,RAG 模型在多大程度上减少了幻觉?
- RQ4当存在多个相似上下文时,该系统在检索相关上下文方面的有效性如何?
- RQ5当前 RAG 模型在检索准确率和响应延迟方面存在哪些局限性?
主要发现
- 在零样本设置下,RAG 基于问答模型的答案相关性达到 85%,在少样本设置下提升至 91%,表明其具备良好的指令遵循能力,并且在提供示例后响应质量显著提高。
- 该模型在提供来源引用和显著减少幻觉方面优于 GPT-3.5 和 GPT-4o,尤其在分布外查询中表现更优。
- GPT-3.5 显现出明显的幻觉,尽管最初承认其知识截止时间,仍生成了关于 CVE-2023-34362 的虚假细节。
- GPT-4o 提供了准确答案,但缺乏来源引用的透明度,且受 API 速率限制影响,实用性降低。
- 错误的上下文检索导致部分情况下答案不准确,例如因检索偏差而错误识别了 'Sharpshooter' 攻击活动的攻击者。
- 该模型生成的答案与真实答案高度相似,表明其在答案生成方面具有一致性与可靠性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。