Collect NSEC3 hashes and match them offline instead of dismissing NSEC3 zones

オープン
#477 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
cli, networking

調査の方向性

Read internal/dns/nsec.go at denialOf and the NSEC3 handling in internal/axfr/axfr.go; then inspect the NSEC3-serving lab code in internal/dnsserver/server.go and examples/labs/lab8-nsec-walk.zone. The issue outlines collection, candidate matching, stats, and lab work, but the feature spans DNS parsing, query strategy, reporting, and documentation. Done means NSEC3 collection respects the stated budgets, reports matches and zone counts, and the lab exercises a full chain.

索引モデルが issue の本文から書いたものです。

説明

area: dns enhancement severity: medium

Summary

NSEC3-signed zones are detected and then dismissed ("NSEC3 would hide them"). With the parameters RFC 9276 recommends (0 extra iterations, no salt), the NSEC3 chain can be collected in a few hundred NXDOMAIN answers and its hashes matched offline against every candidate subenum already has (the nsec3map/nsec3walker technique).

Where

  • internal/dns/nsec.go:158 (denialOf records DenialNSEC3 and skips the record's contents)
  • internal/axfr/axfr.go:100 ("NSEC3 would hide them"), :260 (WalkStop = "the zone is signed with NSEC3, which hides its names")
  • internal/dnsserver/server.go:651 (the lab server already serves NSEC3)
  • examples/labs/lab8-nsec-walk.zone:6 (Lab 8 asks the learner to switch to nsec3)

Impact

DNSSEC zones most often use NSEC3. Instead of a "not walkable" note, users could get:

  • names confirmed with no per-name queries;
  • the exact number of names in the zone, which turns the run-quality report into "found 41 of 57";
  • a finding when the zone uses zero iterations and no salt.

Suggested fix

Add -nsec3-collect, bounded by -max-queries, -max-duration and -rate:

  1. Parse NSEC3 RDATA from denial answers, and query random labels aimed at uncovered hash gaps until the ring closes or the budget ends.
  2. Hash every wordlist, source and permutation candidate locally with the zone's parameters, and mark matches as found after one confirming lookup, as sources are verified.
  3. Report nsec3: {names_in_zone, hashes_collected, cracked, iterations, salt} in -stats.
  4. Extend dnsserver.addDenial to serve a full NSEC3 chain so the lab can test it.
  5. Document that opt-out zones cover only delegations.

Related: #437, #234


Filed by repo-audit/full-audit at a45b999. Severity: medium. Effort: L. audit-key: enhancement|internal/dns/nsec.go|DenialNSEC3

主要言語
Go
スター
1
フォーク
1
平均マージ
10時間
マージ済み PR(30日)
26

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/subenum のほかの issue

TMHSDigital/subenum の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。