arXiv:2512.19758cs.SEcs.AI2025-12中稿 · ICSE 2026 Research…

用大模型注意力距离提升漏洞挖掘效率,实测提速超7倍。

Attention Distance: A Novel Metric for Directed Fuzzing with Large Language Models

  • 用大模型分析代码段逻辑关系,计算注意力距离替代传统路径距离。
  • 在38个真实漏洞测试中,效率提升3.43倍,优于现有最强工具。
  • 可插件式集成,适合安全测试、二进制分析与自动化漏洞挖掘者。

在软件安全测试领域,定向灰盒模糊测试(DGF)因其高效的定位能力与检测性能备受关注。然而,现有方法仅度量种子执行路径与目标位置之间的物理距离,忽略了代码片段间的逻辑关联,导致在复杂二进制中产生冗余或误导性引导,削弱了DGF的实际效果。为此,我们提出一种新度量——注意力距离,利用大语言模型的上下文分析能力,计算代码元素间的注意力得分,揭示其内在联系。在相同AFLGo配置下(不改动任何模糊测试组件,仅替换距离度量),将物理距离替换为注意力距离,在38个真实漏洞复现实验中,平均测试效率提升3.43倍。相较于当前最先进定向模糊器DAFL和WindRanger,分别实现2.89倍和7.13倍的提升。为进一步验证注意力距离的泛化能力,我们将其集成至DAFL与WindRanger,均持续提升了原始性能。所有代码与数据集已公开于https://github.com/TheBinKing/Attention_Distance.git。

原文摘要 · Abstract (English)

In the domain of software security testing, Directed Grey-Box Fuzzing (DGF) has garnered widespread attention for its efficient target localization and excellent detection performance. However, existing approaches measure only the physical distance between seed execution paths and target locations, overlooking logical relationships among code segments. This omission can yield redundant or misleading guidance in complex binaries, weakening DGF's real-world effectiveness. To address this, we introduce \textbf{attention distance}, a novel metric that leverages a large language model's contextual analysis to compute attention scores between code elements and reveal their intrinsic connections. Under the same AFLGo configuration -- without altering any fuzzing components other than the distance metric -- replacing physical distances with attention distances across 38 real vulnerability reproduction experiments delivers a \textbf{3.43$\times$} average increase in testing efficiency over the traditional method. Compared to state-of-the-art directed fuzzers DAFL and WindRanger, our approach achieves \textbf{2.89$\times$} and \textbf{7.13$\times$} improvements, respectively. To further validate the generalizability of attention distance, we integrate it into DAFL and WindRanger, where it also consistently enhances their original performance. All related code and datasets are publicly available at https://github.com/TheBinKing/Attention\_Distance.git.

模糊测试大模型漏洞挖掘代码分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。