一句话:提出用大语言模型上下文分析计算的注意力距离替代物理距离,引导定向灰盒模糊测试并显著提升效率。
定向灰盒模糊测试(DGF)因目标定位高效而广受关注,但现有方法仅以种子执行路径与目标位置之间的物理距离作为引导,忽略了代码片段之间的逻辑关联,在复杂二进制中易产生冗余或误导性引导,削弱实际效果。本文提出注意力距离(attention distance):利用大语言模型对代码进行上下文分析,计算代码元素之间的注意力分数,从而揭示其内在连接关系,并以此替代传统物理距离作为模糊测试的引导度量。在保持 AFLGo 其余模糊测试组件不变、仅替换距离度量的条件下,38 个真实漏洞复现实验中测试效率平均提升 3.43 倍;与当前先进的定向模糊器 DAFL 和 WindRanger 相比,分别取得 2.89 倍和 7.13 倍的提升。作者进一步将注意力距离集成到 DAFL 与 WindRanger 中,其原有性能也得到一致增强,验证了该度量的通用性。
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 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 3.43× average increase in testing efficiency over the traditional method. Compared to state-of-the-art directed fuzzers DAFL and WindRanger, our approach achieves 2.89× and 7.13× 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.
@inproceedings{abs-2512-19758,
title = {Attention Distance: A Novel Metric for Directed Fuzzing with Large Language Models},
author = {Wang Bin and Ao Yang and Kedan Li and Aofan Liu and Hui Li and Guibo Luo and Weixiang Huang and Yan Zhuang},
booktitle = {ICSE},
year = {2026},
doi = {10.1145/3744916.3787818}
}