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
Lab 10: a dangling CNAME (takeover candidate) #450
The built-in labs (-simulate-zone lab1 … lab9, examples/labs/, docs/labs.md) cover wildcards, rate limits, recursion, failures, IPv6, zone transfers, NSEC walking and a dangling delegation, but none practises the most common finding: a dangling CNAME to a hosting provider (a subdomain takeover candidate).
What to do
Add examples/labs/lab10-dangling-cname.zone, modelled on lab9-dangling-delegation.zone:
a few ordinary names, plus one or two names with a CNAME to a provider suffix subenum knows (for example a *.herokudns.com or *.github.io target) that does not resolve, and one that does (so the learner sees the difference);
register it the same way lab9 is registered (search the repo for lab9: examples/labs/labs.go, docs/labs.md, docs/_data/unreleased.yml, the -simulate-zone help text and README flag table, and a CLI test like internal/cli/delegation_test.go);
write the docs/labs.md section: the command (subenum -simulate-zone lab10 -type A,CNAME -format jsonl lab.example), what to look for (takeover_candidate in the JSON), and an answer key, like the other labs;
add the needed words to examples/labs/words.txt if they are not there.
Done when
subenum -simulate-zone lab10 -type A,CNAME lab.example reports the dangling name as a takeover candidate, with no network
A CLI test checks it
go test ./... passes
Getting started
examples/labs/lab9-dangling-delegation.zone and its section in docs/labs.md
Fixed in 2ac1323: new built-in scenario lab10-dangling-cname (shop to a deleted Heroku app, docs to a deleted GitHub Pages site, old to a gone host on no provider, blog a working alias). subenum -simulate-zone lab10 -type A,CNAME -format jsonl lab.example flags shop dangling:heroku, docs dangling:github-pages, old dangling, blog nothing, with no network. It is registered in the -simulate-zone help, README, docs/_includes/flags.md and unreleased.yml, and docs/labs.md has a Lab 10 section with questions and answers. New CLI test TestE2ELabDanglingCNAME checks both runs and the report's takeover count. Also sorted the built-in scenarios by lab number, so lab10 lists after lab9, not after lab1, and removed stale unreleased tags for values v0.12.0 shipped, which the tag check flags once the values list is not empty. Gate (gofmt, vet, golangci-lint v2.15.0, full suite) passes.
Activity
TMHSDigital commentedon Nov 29, 2026
Fixed in 2ac1323: new built-in scenario lab10-dangling-cname (shop to a deleted Heroku app, docs to a deleted GitHub Pages site, old to a gone host on no provider, blog a working alias).
subenum -simulate-zone lab10 -type A,CNAME -format jsonl lab.exampleflags shopdangling:heroku, docsdangling:github-pages, olddangling, blog nothing, with no network. It is registered in the -simulate-zone help, README, docs/_includes/flags.md and unreleased.yml, and docs/labs.md has a Lab 10 section with questions and answers. New CLI test TestE2ELabDanglingCNAME checks both runs and the report's takeover count. Also sorted the built-in scenarios by lab number, so lab10 lists after lab9, not after lab1, and removed stale unreleased tags for values v0.12.0 shipped, which the tag check flags once the values list is not empty. Gate (gofmt, vet, golangci-lint v2.15.0, full suite) passes.