面向Rust和Go的定向模糊测试:基于LibAFL-DiFuzz的实现 Rust and Go directed fuzzing with LibAFL-DiFuzz 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-01-30
👁️ 预览文献
💡 AI 中文简介
传统模糊测试主要面向C/C++,而Rust和Go语言日益流行却缺乏高效的定向测试方案。本文提出针对Rust和Go的定向灰盒模糊测试方法,通过改进预处理、定制rustc编译器、构建程序图与插桩技术,精准定位目标代码位置。工具基于LibAFL-DiFuzz后端实现,在TTE(暴露时间)实验中,Rust版本取得最佳结果,Go版本在多数场景下优于现有工具,部分案例差距达数量级,验证了方法的高效性与准确性。
领域软件安全与自动化测试(模糊测试)
适合谁读需要一定专业背景(了解模糊测试、程序分析与编译原理)
核心贡献1. 首次将定向灰盒模糊测试系统性地扩展到Rust和Go语言,填补了非C/C++语言定向测试的空白;2. 提出针对Rust的rustc编译器定制与图构建插桩技术,以及面向Go的预处理与插桩方法,实现了对目标程序位置的有效定向。
关键数据在TTE(Time to Exposure)实验中,Rust-LibAFL-DiFuzz取得最佳TTE结果;Go-LibAFL-DiFuzz在最佳和多数平均结果上均优于对比工具,其中两个案例存在数量级差异。
推荐理由如果你关注Rust/Go生态的安全测试,或想了解定向模糊测试如何突破C/C++边界,这篇工作用硬核实验数据证明了新方案的竞争力,值得一读。
关键词["定向模糊测试", "Rust", "Go", "LibAFL-DiFuzz", "灰盒测试", "程序插桩"]

原文摘要

查看英文原文摘要

In modern SSDLC, program analysis and automated testing are essential for minimizing vulnerabilities before software release, with fuzzing being a fast and widely used dynamic testing method. However, traditional coverage-guided fuzzing may be less effective in specific tasks like verifying static analysis reports or reproducing crashes, while directed fuzzing, focusing on targeted program locations using proximity metrics, proves to be more effective. Some of the earliest directed fuzzers are, for example, AFLGo and BEACON, which use different proximity metric approaches. Although most automated testing tools focus on C/C++ code, the growing popularity of Rust and Go causes the need for precise and efficient testing solutions for these languages. This work expands the applicability of directed fuzzing beyond traditional analysis of C/C++ software. We present a novel approach to directed greybox fuzzing tailored specifically for Rust and Go applications. We introduce advanced preprocessing techniques, rustc compiler customizations, and elaborate graph construction and instrumentation methods to enable effective targeting of specific program locations. Our implemented fuzzing tools, based on LibAFL-DiFuzz backend, demonstrate competitive advantages compared to popular existing fuzzers like afl$.$rs, cargo-fuzz, and go-fuzz. According to TTE (Time to Exposure) experiments, Rust-LibAFL-DiFuzz outperforms other tools by the best TTE result. Some stability issues can be explained by different mutation approaches. Go-LibAFL-DiFuzz outperforms its opponent by the best and, in the majority of cases, by average result, having two cases with orders of magnitude difference. These results prove better efficiency and accuracy of our approach.