NSEC3 is a proof of non-existence in DNSSEC, which provides an authenticated assertion that a queried resource does not exist in the target domain. NSEC3 consists of alphabetically sorted hashed names before and after the queried hostname. To make dictionary attacks harder, the hash function can be applied in multiple iterations, which however also increases the load on the DNS resolver during the computation of the SHA-1 hashes in NSEC3 records. Concerns about the load created by the computation of NSEC3 records on the DNS resolvers were already considered in the NSEC3 specifications RFC5155 and RFC9276. In February 2024, the potential of NSEC3 to exhaust DNS resolvers' resources was assigned a CVE-2023-50868, confirming that extra iterations of NSEC3 created substantial load. However, there is no published evaluation of the attack and the impact of the attack on the resolvers was not clarified. In this work we perform the first evaluation of the NSEC3-encloser attack against DNS resolver implementations and find that the NSEC3-encloser attack can still create a 72x increase in CPU instruction count, despite the victim resolver following RFC5155 recommendations in limiting hash iteration counts. The impact of the attack varies across the different DNS resolvers, but we show that with a sufficient volume of DNS packets the attack can increase CPU load and cause packet loss. We find that at a rate of 150 malicious NSEC3 records per second, depending on the DNS implementation, the loss rate of benign DNS requests varies between 2.7% and 30%. We provide a detailed description and implementation the NSEC3-encloser attack along with evaluation against five popular DNS resolver implementations. We also develop the first analysis how each NSEC3 parameter impacts the load inflicted on the victim resolver during NSEC3-encloser attack.
翻译:NSEC3是DNSSEC中证明不存在性的机制,能够对目标域中查询的资源记录不存在提供经认证的断言。NSEC3由按字母顺序排列的散列名称构成,这些名称位于查询主机名的前后位置。为增强字典攻击的难度,散列函数可进行多次迭代,但这同时会增加DNS解析器在计算NSEC3记录中SHA-1散列时的负载。NSEC3规范RFC5155和RFC9276已对NSEC3记录计算在DNS解析器上产生的负载问题进行了考量。2024年2月,NSEC3耗尽DNS解析器资源的潜在风险被分配了CVE-2023-50868编号,确认NSEC3额外迭代会产生显著负载。然而,目前尚无公开的针对该攻击的评估,且攻击对解析器的影响也未阐明。本研究首次对针对DNS解析器实现的NSEC3-encloser攻击进行评估,发现尽管受害解析器遵循RFC5155建议限制了散列迭代次数,但NSEC3-encloser攻击仍可导致CPU指令数增加72倍。攻击影响因不同DNS解析器而异,但我们表明,通过足够数量的DNS数据包,该攻击可提升CPU负载并引发数据包丢失。我们发现,在每秒150个恶意NSEC3记录的攻击速率下,根据DNS实现的不同,良性DNS请求的丢失率介于2.7%至30%之间。我们提供了NSEC3-encloser攻击的详细描述与实现,并针对五种主流DNS解析器实现进行了评估。此外,我们首次分析了NSEC3-encloser攻击中各NSEC3参数对受害解析器负载的影响程度。