
模糊测试中的位置自适应变异调度策略
杨 智
①
徐 航
*①
桑伟泉
①
孙浩东
①
金舒原
②
①
(信息工程大学密码工程学院 郑州 450004)
②
(中山大学计算机学院 广州 510275)
摘 要:种子自适应变异调度策略是基于变异的模糊测试中最新的技术,该技术能够根据种子的语法和语义特征
自适应地调整变异算子的概率分布,然而其存在两个问题:(1)无法根据变异位置自适应地调整概率分布;(2)使
用的汤普森采样算法在模糊测试场景中容易导致学习到的概率分布接近平均分布,进而导致变异调度策略失效。
针对上述问题,该文提出一种位置自适应变异调度策略,通过一种自定义的双层多臂老虎机模型为变异位置和变
异算子建立联系,并且采用置信区间上界算法选择变异算子,实现位置自适应的同时避免了出现平均分布的问
题。基于American Fuzzy Lop(AFL)实现了位置自适应的模糊测试器 (PAMSSAFL),实验结果表明位置自适应
的变异调度策略能明显提升模糊测试器的bug发现能力和覆盖能力。
关键词:漏洞挖掘;模糊测试;变异;覆盖率
中图分类号:TN915.08; TP393.08 文献标识码:A 文章编号:1009-5896(2024)09-3797-10
DOI: 10.11999/JEIT240060
Position-Adaptive Mutation Scheduling Strategy in Fuzzing
YANG Zhi
①
XU Hang
①
SANG Weiquan
①
SUN Haodong
①
JIN Shuyuan
②
①
(School of Cryptographic Engineering, Information Engineering University, Zhengzhou 450004, China)
②
(School of Computer Science and Engineering, Sun Yat-sen University, Guangzhou 510275, China)
Abstract: The seed-adaptive mutation scheduling strategy is the latest technology in mutation-based fuzzing,
which can adaptively adjust the probability distribution of the mutation operators according to the syntax and
semantic characteristics of the seed. However, it has two problems: (1) it is unable to adaptively adjust the
probability distribution according to the mutation position; (2) The Thompson Sampling algorithm used in the
fuzzing scenario is easy to lead to the learned probability distribution close to the average distribution, which
leads to the failure of the mutation scheduling strategy. Focusing on the above problems, a position-adaptive
mutation scheduling strategy is proposed. This technology establishes the relationship between the mutation
position and the mutation operators through a user-defined double-layer multi-armed bandit model, and uses
the Upper Confidence Bound algorithm to select the mutation operator, so as to achieve position adaptation
and avoid the problem of average distribution. The position-adaptive fuzzer Position-Adaptive Mutation
Scheduling Strategy AFL (PAMSSAFL) is implemented based on American Fuzzy Lop (AFL). The comparison
results show that the position-adaptive mutation scheduling strategy can improve the bug detection ability and
coverage ability of the fuzzer.
Key words: Vulnerability mining; Fuzzing; Mutation; Coverage
1 引言
基于变异的模糊测试通过在种子的不同位置应
用不同的变异算子生成大量的测试用例,然后将测试
用例输入到目标程序执行,其因简单高效而倍受从
业者青睐,当前主流的模糊测试器如AFL (American
Fuzzy Lop)
[1]
, Honggfuzz
[2]
和LibFuzzer
[3]
均采用变
异的方式生成测试用例。为了让生成的测试用例尽
可能多样化,基于变异的模糊测试器通常包括多种
变异算子,并且可能将任意一个变异算子应用在种
子的任意变异位置。变异调度是指每一次变异时变
异算子的选择,最新的变异调度策略是由Lee等人
[4]
提出的种子自适应的变异调度策略,该策略首先根
收稿日期:2024-01-26;改回日期:2024-07-13;网络出版:2024-08-02
*通信作者: 徐航 1174290091@qq.com
基金项目:国家自然科学基金(62176265)
Foundation Item: The National Natural Science Foundation of
China (62176265)
第46卷第9期 电 子 与 信 息 学 报 Vol. 46No. 9
2024年9月 Journal of Electronics & Information Technology Sept. 2024
相关文档
评论