arXiv:2509.19533cs.SEcs.AI2025-09被引 2

用大模型理解输入语义,让模糊测试更智能地发现漏洞。

Semantic-Aware Fuzzing: An Empirical Framework for LLM-Guided, Reasoning-Driven Input Mutation

  • 用大模型生成有语义理解的输入变异,替代传统字节级修改。
  • 少样本提示下,深求思模型在漏洞发现上优于零样本和传统工具。
  • 适合安全研究者、自动化测试工程师,提升复杂系统漏洞挖掘效率。

物联网设备、移动平台和自主系统中的安全漏洞仍具挑战性。传统基于变异的模糊测试器虽能有效探索代码路径,但仅进行字节或比特级修改,缺乏语义推理能力。覆盖引导工具如AFL++虽使用词典、语法和拼接启发式方法施加浅层结构约束,却未处理深层协议逻辑、字段间依赖关系及领域特定语义。相反,具备推理能力的大语言模型(LLMs)可借助预训练知识理解输入格式、遵守复杂约束并提出针对性变异,如同经验丰富的逆向工程师或测试专家。然而,缺乏“正确”变异推理的标注数据,使监督微调不可行,因此我们探索使用开箱即用的LLM通过提示工程实现少样本学习。为此,我们构建了一个开源微服务框架,将推理型LLM与AFL++集成于Google的FuzzBench上,解决异步执行和硬件需求差异(GPU vs. CPU密集型)问题。我们评估四个研究问题:(R1) 如何将推理型LLM融入模糊测试变异循环?(R2) 少样本提示是否比零样本生成更高质量的变异?(R3) 使用现成模型进行提示工程能否直接提升模糊测试效果?(R4) 哪些开源推理型LLM在仅提示条件下表现最佳?实验结果显示,Deepseek-r1-Distill-Llama-70B最为突出。变异效果更依赖提示复杂度和模型选择,而非样本数量。响应延迟与吞吐瓶颈仍是主要障碍,为未来工作提供方向。

原文摘要 · Abstract (English)

Security vulnerabilities in Internet-of-Things devices, mobile platforms, and autonomous systems remain critical. Traditional mutation-based fuzzers -- while effectively explore code paths -- primarily perform byte- or bit-level edits without semantic reasoning. Coverage-guided tools such as AFL++ use dictionaries, grammars, and splicing heuristics to impose shallow structural constraints, leaving deeper protocol logic, inter-field dependencies, and domain-specific semantics unaddressed. Conversely, reasoning-capable large language models (LLMs) can leverage pretraining knowledge to understand input formats, respect complex constraints, and propose targeted mutations, much like an experienced reverse engineer or testing expert. However, lacking ground truth for "correct" mutation reasoning makes supervised fine-tuning impractical, motivating explorations of off-the-shelf LLMs via prompt-based few-shot learning. To bridge this gap, we present an open-source microservices framework that integrates reasoning LLMs with AFL++ on Google's FuzzBench, tackling asynchronous execution and divergent hardware demands (GPU- vs. CPU-intensive) of LLMs and fuzzers. We evaluate four research questions: (R1) How can reasoning LLMs be integrated into the fuzzing mutation loop? (R2) Do few-shot prompts yield higher-quality mutations than zero-shot? (R3) Can prompt engineering with off-the-shelf models improve fuzzing directly? and (R4) Which open-source reasoning LLMs perform best under prompt-only conditions? Experiments with Llama3.3, Deepseek-r1-Distill-Llama-70B, QwQ-32B, and Gemma3 highlight Deepseek as the most promising. Mutation effectiveness depends more on prompt complexity and model choice than shot count. Response latency and throughput bottlenecks remain key obstacles, offering directions for future work.

模糊测试大模型安全漏洞提示工程

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