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
Commit e821702
Browse filesBrowse the repository at this point in the historyBrowse files
Let lab scenarios serve zone transfers, and add Lab 7 (#434)
-axfr was the one discovery feature labs could not practise:
-simulate-zone refused it, because a transfer dials the zone's real
name servers.
axfr.Options gains Server. When set, every transfer and the denial
probe go there instead of the name servers' addresses, which are still
looked up. In lab mode the CLI sets it to the lab server, so -axfr is
no longer refused and nothing leaves the machine. A scenario's
$TRANSFER allow makes the lab server answer a transfer of the scanned
domain with every name it defines; without it, or for a name below the
apex, the transfer is refused.
examples/labs/lab7-zone-transfer.zone and a Lab 7 section show an
allowed transfer whose names come back with source axfr, and a refused
one.
Fixes#434
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
17
17
-`subenum report -stats run.json [-results results.jsonl] [-changes changes.jsonl] [-limit 50]` prints a run's Markdown summary: the verdict and its reason, a table of the targets, the takeover candidates, and with `-diff` the names added, removed and changed. GitLab CI, cron jobs and a terminal now get the summary the GitHub Action writes to the job page, and the Action calls it instead of building the summary with `jq`. Each list stops at `-limit` entries and ends with `...and N more`, where the Action's lists used to stop at 50 without saying how many were left out (#421).
18
18
-`-follow-records` also tests the names under the target that found names' `CNAME`, `MX` and `NS` records point at, such as `lb-7.int.example.com` behind `app.example.com CNAME lb-7.int.example.com`, which no wordlist is likely to hold. Each is tested once, unless it is already a candidate, and its own records are followed in turn. Targets outside the domain or ruled out by `-exclude` are never queried. They count against `-max-queries` and `-max-duration`, their results' `sources` is `records`, the `-stats` report counts them as `records_found`, and a resumed scan queues the targets of the names it restored again. `pkg/subenum` has `Config.FollowRecords`. Off by default, so query counts do not change (#432).
19
19
-`-srv` looks up a built-in list of 48 service names (`_sip._tcp`, `_autodiscover._tcp`, `_ldap._tcp`, `_xmpp-server._tcp`, ...) under each target, after the wordlist, and reports the ones with SRV records with `sources: ["srv"]`. It needs `SRV` in `-type`, so the extra query per name is a choice. The names count against `-max-queries`, `-dry-run` counts them, and they do not seed `-permute`. With `SRV` in `-type`, a service whose target host does not exist is a `dangling-srv` takeover candidate, with its own SARIF rule. The result schema's `takeover_candidate` pattern now also allows `dangling-ns`, which it wrongly rejected (#419).
20
+
- Lab mode allows `-axfr`: the transfer and its DNSSEC probe go to the lab server, whatever address the scenario gives its name servers, so nothing leaves the machine. A scenario's `$TRANSFER allow` makes the lab server answer a transfer of the scanned domain with every name it defines; without it transfers are refused, as most real servers do. The new Lab 7 (`-simulate-zone lab7`) practises it: names only the transfer gives come back with source `axfr` (#434).
20
21
21
22
### Changed
22
23
- With `-axfr` and passive sources (`-ct`, `-sources`), a target's zone transfer now runs while the sources are asked, instead of after them, so a slow crt.sh answer no longer adds the transfer's time on top. Messages and candidates come in the same order as before (#365).
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -292,7 +292,7 @@ This table describes `main`, which can be ahead of the latest release: a release
292
292
|`-simulate`|`false`| Simulation mode: no real DNS queries |
293
293
|`-hit-rate <n>`|`15`| Simulated resolution rate, percent (1-100), applied uniformly to every name |
294
294
|`-seed <n>`|`0`| Simulation seed; the same seed reproduces the same results (line order can vary unless `-t 1`). `0` picks a random seed and prints it |
295
-
|`-simulate-zone <file>`| n/a | Lab mode: answer every query from a scenario file, or a built-in scenario such as `lab1` (`lab1`-`lab6`, with their own wordlist when `-w` is not given), via a local DNS server on `127.0.0.1`; no traffic leaves the machine. See [Labs](docs/labs.md)|
295
+
|`-simulate-zone <file>`| n/a | Lab mode: answer every query from a scenario file, or a built-in scenario such as `lab1` (`lab1`-`lab7`, with their own wordlist when `-w` is not given), via a local DNS server on `127.0.0.1`; no traffic leaves the machine. See [Labs](docs/labs.md)|
296
296
|**Modes**|||
297
297
|`-tui`|`false`| Launch the interactive Terminal UI |
298
298
|`-dry-run`|`false`| Print the plan without scanning: candidates after dedupe and `-exclude`, query and duration estimates (at `-rate`, or `-rate-per-resolver` times the `-r` pool size when that is lower), and the resolver preflight (its only DNS query, also sent once to each `-r` pool resolver, paced by `-rate` and skipped for a target `-exclude` rules out; a failing pool resolver is reported but does not fail the run), then exit; JSON with `-format json` or `jsonl`|
The same step asks one name server about a name that does not exist, with DNSSEC records requested. A zone signed with plain NSEC proves the absence by naming its neighbours, so anyone can walk the chain to list every name, transfer or not: subenum reports that as `Zone walkable` and records `zone_denial` (`nsec`, `nsec3` or `none`) in the report. It does not walk the zone itself.
497
497
498
-
The transfers and the probe go straight to the target's name servers, not through `-dns-server`: at most 8 servers and 2 addresses each, one query per address, at most 100,000 names kept (a larger zone is cut there and the cut is reported), plus the NS and address lookups and one denial probe, all counted in the report's `queries_sent` but not paced by `-rate`. Simulation ignores `-axfr`, lab mode refuses it, and a resumed scan reuses the names the interrupted run got.
498
+
The transfers and the probe go straight to the target's name servers, not through `-dns-server`: at most 8 servers and 2 addresses each, one query per address, at most 100,000 names kept (a larger zone is cut there and the cut is reported), plus the NS and address lookups and one denial probe, all counted in the report's `queries_sent` but not paced by `-rate`. Simulation ignores `-axfr`, lab mode sends it to the lab server (Lab 7 practises it), and a resumed scan reuses the names the interrupted run got.
Copy file name to clipboardExpand all lines: docs/_includes/flags.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@
42
42
|`-show-records`| - | In text format, append each result's records (TYPE=value) |
43
43
|`-silent`| - | Pipeline mode: bare result names on stdout, and only errors (and a simulation warning) on stderr |
44
44
|`-simulate`| - | Run in simulation mode without actual DNS queries (for testing) |
45
-
|`-simulate-zone <string>`| - | Lab mode: answer every query from this scenario file, or a built-in scenario such as lab1 (lab1-lab6), via a local DNS server, so no traffic leaves the machine (see the Labs page) |
45
+
|`-simulate-zone <string>`| - | Lab mode: answer every query from this scenario file, or a built-in scenario such as lab1 (lab1-lab7), via a local DNS server, so no traffic leaves the machine (see the Labs page) lab7: {% include unreleased.html value="simulate-zone=lab7" %}|
46
46
|`-sources <string>`| - | Comma-separated keyless passive sources whose names become candidates and -permute seeds: ct (Certificate Transparency, crt.sh), wayback (Wayback Machine); one HTTPS request per source and target |
47
47
|`-srv` {% include unreleased.html flag="srv" %} | - | Also look up a built-in list of about 50 service names (\_sip.\_tcp, \_autodiscover.\_tcp, \_ldap.\_tcp, ...) under each target; needs SRV in -type |
48
48
|`-state <string>`| subenum-resume.json | Where a run that was interrupted, ran out of -max-duration or was aborted saves its state for -resume |
a.logf(o.Info, "Zone transfer: %s (%s) allowed AXFR of %s, but it was stopped: %v. Anyone can list this zone; restrict transfers to your secondaries.", a.host, addr, target, err)
0 commit comments