You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Detect NSEC-walkable zones before brute-forcing #234
Split from #85, whose zone-transfer half shipped as -axfr. A zone signed with plain NSEC (not NSEC3) can be walked to list every name, so a scan should say when a target's zone is walkable, before it brute-forces.
Where
main_axfr.go (the pre-scan step to extend, next to the zone transfer)
internal/dns/axfr.go (the raw dnsmessage client pattern to reuse)
internal/dnsserver/server.go (the test server would need NSEC/NSEC3 answers)
Proposal
Ask one of the target's authoritative name servers for a random nonexistent name, with the DNSSEC OK bit (EDNS0 DO) set, and read the authority section of the NXDOMAIN answer:
NSEC means the zone is walkable: print a notice and add nsec_walkable: true to the report.
NSEC3 or no proof means it is not walkable.
One query per target, counted in queries_sent, and behind a flag (or as part of -axfr).
Actually walking the zone (-nsec-walk) can come later.
Acceptance criteria
An NSEC-signed zone on the test server is reported as walkable; NSEC3 and unsigned zones are not
The query is counted, and lab mode refuses it like -axfr
Getting started
Relevant files: listed above
How to run tests: go test ./internal/dns/ ./internal/dnsserver/ .
Fixed in 33ca905 (test race fixed in 76c0174). -axfr now also sends one DNSSEC probe per target to an authoritative address. It asks about a random name that doesn't exist, with the DO bit set in an EDNS0 OPT record, over UDP, and falls back to TCP if the answer is truncated.
internal/dns.ProbeDenial reads the authority section of the answer:
Plain NSEC: the zone is walkable. This is reported on stderr as Zone walkable and in the run-quality report as zone_denial: "nsec".
NSEC3 or no DNSSEC proof: reported as zone_denial: "nsec3" or "none".
The probe counts in queries_sent, the result is kept in the resume state, and lab mode refuses it along with -axfr. subenum doesn't walk the zone itself; ROADMAP now lists -nsec-walk as possible future work.
Verified:
Unit tests cover NSEC, NSEC3, unsigned, NODATA, SERVFAIL and a silent server.
E2E tests cover a walkable zone and an NSEC3 zone; the test DNS server signs negative answers via Reply.Denial.
go test -race and lint pass.
CI is green on every job at 76c0174. The first CI run caught a race in the new test, which 76c0174 fixes.
Activity
feat(dns): -axfr tries a zone transfer before brute-forcing (#85)
test(dns): guard the probed name in TestProbeDenial (#234)
TMHSDigital commentedon Nov 13, 2026
Fixed in 33ca905 (test race fixed in 76c0174).
-axfrnow also sends one DNSSEC probe per target to an authoritative address. It asks about a random name that doesn't exist, with the DO bit set in an EDNS0 OPT record, over UDP, and falls back to TCP if the answer is truncated.internal/dns.ProbeDenialreads the authority section of the answer:Zone walkableand in the run-quality report aszone_denial: "nsec".zone_denial: "nsec3"or"none".The probe counts in
queries_sent, the result is kept in the resume state, and lab mode refuses it along with-axfr. subenum doesn't walk the zone itself; ROADMAP now lists-nsec-walkas possible future work.Verified:
Reply.Denial.go test -raceand lint pass.