Skip to content

require dnsresolve when DNS_NAME consumers are enabled#3102

Merged
liquidsec merged 3 commits into
devfrom
require-dnsresolve-for-dns-name-consumers
May 18, 2026
Merged

require dnsresolve when DNS_NAME consumers are enabled#3102
liquidsec merged 3 commits into
devfrom
require-dnsresolve-for-dns-name-consumers

Conversation

@liquidsec

Copy link
Copy Markdown
Collaborator

Summary

dnsresolve is the intercept module that resolves every event, tags wildcards/unresolved, and rewrites wildcard hits to _wildcard.parent. Modules that watch DNS_NAME (dnsbrute, dnsbrute_mutations, the entire passive subdomain-enum family, etc.) rely on those tags to filter false positives. Disabling dnsresolve while keeping those modules enabled produces a flood of unverified and wildcard-tainted names with no warning -- the secondary defenses in helpers.dns.brute (massdns canary check, etc.) are coarse backstops, not replacements.

This adds a single check at the end of bake() that catches all three opt-out paths and refuses the preset when any DNS_NAME consumer is enabled:

  • -em dnsresolve (or exclude_modules: [dnsresolve] in a preset)
  • top-level dnsresolve: false
  • dns.disable: true

Pure IP-range scans with no DNS_NAME consumers (e.g. -t 1.2.3.0/24 -m portscan without speculate/portscan-style DNS handling) still pass. The error message points users at dns.minimal: true for the legitimate "reduce DNS overhead" use case, which keeps dnsresolve running but skips MX/NS/SRV expansion.

Catches all three opt-out paths in one preset-bake check:
  - `-em dnsresolve`
  - top-level `dnsresolve: false`
  - `dns.disable: true`

Points users at `dns.minimal: true` for the reduce-DNS-overhead case.
@liquidsec liquidsec requested a review from ausmaster May 18, 2026 14:08
The previous "dnsresolve not in modules" check tripped on
--list-module-options, which intentionally sets _default_internal_modules
to [] to suppress internal modules from the listing. Switch to checking
the three explicit user actions directly so inspection-mode code paths
that strip internal modules don't trigger the gate.
@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

🚀 Performance Benchmark Report

⚠️ No current benchmark data available

This might be because:

  • Benchmarks failed to run
  • No benchmark tests found
  • Dependencies missing

@codecov

codecov Bot commented May 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90%. Comparing base (d423533) to head (e70ab34).
⚠️ Report is 10 commits behind head on dev.

Additional details and impacted files
@@          Coverage Diff          @@
##             dev   #3102   +/-   ##
=====================================
- Coverage     90%     90%   -0%     
=====================================
  Files        444     444           
  Lines      38339   38350   +11     
=====================================
+ Hits       34282   34288    +6     
- Misses      4057    4062    +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@liquidsec liquidsec merged commit 6f82e01 into dev May 18, 2026
20 checks passed
@liquidsec liquidsec mentioned this pull request Jun 9, 2026
@ausmaster ausmaster deleted the require-dnsresolve-for-dns-name-consumers branch June 11, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants