[论文解读] ResolverFuzz: Automated Discovery of DNS Resolver Vulnerabilities with Query-Response Fuzzing
ResolverFuzz 是一种黑盒模糊测试框架,通过使用概率上下文无关语法(PCFG)和字节级别变异的受限状态查询-响应变异,自动化发现 DNS 解析器漏洞。它通过差异测试和聚类检测非崩溃型错误(如缓存投毒),在主流 DNS 软件中发现 23 个漏洞,其中 15 个已分配 CVE 编号。
Domain Name System (DNS) is a critical component of the Internet. DNS resolvers, which act as the cache between DNS clients and DNS nameservers, are the central piece of the DNS infrastructure, essential to the scalability of DNS. However, finding the resolver vulnerabilities is non-trivial, and this problem is not well addressed by the existing tools. To list a few reasons, first, most of the known resolver vulnerabilities are non-crash bugs that cannot be directly detected by the existing oracles (or sanitizers). Second, there lacks rigorous specifications to be used as references to classify a test case as a resolver bug. Third, DNS resolvers are stateful, and stateful fuzzing is still challenging due to the large input space. In this paper, we present a new fuzzing system termed ResolverFuzz to address the aforementioned challenges related to DNS resolvers, with a suite of new techniques being developed. First, ResolverFuzz performs constrained stateful fuzzing by focusing on the short query-response sequence, which has been demonstrated as the most effective way to find resolver bugs, based on our study of the published DNS CVEs. Second, to generate test cases that are more likely to trigger resolver bugs, we combine probabilistic context-free grammar (PCFG) based input generation with byte-level mutation for both queries and responses. Third, we leverage differential testing and clustering to identify non-crash bugs like cache poisoning bugs. We evaluated ResolverFuzz against 6 mainstream DNS software under 4 resolver modes. Overall, we identify 23 vulnerabilities that can result in cache poisoning, resource consumption, and crash attacks. After responsible disclosure, 19 of them have been confirmed or fixed, and 15 CVE numbers have been assigned.
研究动机与目标
- 为解决传统模糊测试校验规则难以检测的 DNS 解析器非崩溃语义错误的挑战。
- 克服 DNS 解析器行为缺乏严格规范的问题,特别是针对缓存投毒和资源消耗漏洞。
- 通过聚焦于最有效的触发已知解析器漏洞的短查询-响应序列,实现有效的有状态模糊测试。
- 通过使用分治 K-均值聚类技术,减少对不一致行为的手动排查工作量。
- 构建可扩展、生产安全的测试基础设施,通过本地化域名服务器层级结构,支持并发解析器测试。
提出的方法
- 通过仅变异单个查询-响应对的方式实施受限有状态模糊测试,基于实证证据表明此类序列最能触发已知的解析器漏洞。
- 结合概率上下文无关语法(PCFG)生成语法正确的 DNS 消息,与字节级别变异结合,以提升输入多样性与代码覆盖率。
- 在多个解析器实现之间执行差异测试,以检测不一致行为,从而识别缓存投毒或资源消耗漏洞。
- 采用新颖的分治 K-均值聚类技术,将不一致的测试用例分组,显著降低手动分析工作量。
- 引入本地隔离的测试基础设施,以模拟 DNS 域名服务器层级结构,避免模糊测试影响公共 DNS 解析器。
- 利用轻量级监控工具(如 tcpdump、缓存转储)进行黑盒测试,无需代码插桩或二进制重写。
实验结果
研究问题
- RQ1在短查询-响应序列上实施受限有状态模糊测试,能否有效触发已知 DNS 解析器漏洞的高比例?
- RQ2基于语法的和基于变异的输入生成方式,如何提升 DNS 解析器中语义错误的发现能力?
- RQ3差异测试与聚类在多大程度上能减少对不一致解析器行为中误报的排查工作量?
- RQ4黑盒模糊测试框架能否检测到生产级 DNS 软件中的非崩溃型漏洞(如缓存投毒和资源耗尽)?
- RQ5所提出的基础设施在支持高吞吐量、安全且可扩展的多模式解析器模糊测试方面效果如何?
主要发现
- ResolverFuzz 在 6 款主流 DNS 软件中发现了 23 个此前未知的漏洞,覆盖 4 种解析器模式(仅递归、仅转发、CDNS 含/不含回退)。
- 其中 19 个漏洞在负责任披露后被确认或修复,15 个已分配 CVE 编号。
- 一个关键漏洞($CP1$)可完全绕过区域边界检查,实现对 TLD 域名区(如 .com 域)任意域名的中间人缓存投毒攻击。
- 测试生成器实现了对有效 DNS 消息结构的强覆盖,PCFG 与字节级别变异显著提升了有效变异多样性。
- 差异测试成功识别出 23 种不一致行为,聚类技术通过归类语义相似的边界情况,显著减少了排查工作量。
- 本地测试基础设施实现了多个解析器的并发测试,且不影响公共 DNS 服务,支持高吞吐量模糊测试。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。