Generic DNS Tools
dns.generic
Protects against destructive or risky DNS tooling usage (nsupdate deletes, zone transfers).
- 4blocking rules
- 3safe patterns
- 2High
- 2Medium
[packs]
enabled = ["dns.generic"]Evaluated when a command contains nsupdate, dig, host, nslookup.
Blocking rules
Each rule ID is dns.generic:<name>. Use it in allowlists and [policy.rules].
Highdns-nsupdate-deletensupdate delete commands remove DNS records.
Explanation
nsupdate delete removes DNS records from the authoritative server using dynamic DNS updates (RFC 2136). Changes take effect immediately and can break services relying on those records. Safer alternatives: - Test in a non-production zone first - Use 'prereq' commands to verify record state before delete - Keep backup of zone file or export current records
Highstdin-unverifiednsupdate receives indirect input that dcg cannot statically verify.
Explanation
Materialize and review the exact nsupdate commands before piping, redirecting, or loading them into the client.
Mediumdns-dig-zone-transferdig AXFR/IXFR zone transfers can exfiltrate full zone data.
Explanation
Zone transfers (AXFR/IXFR) download complete DNS zone data, revealing all hostnames, internal IPs, and infrastructure topology. This information aids reconnaissance for attacks. Most zones should restrict transfers to known secondary servers. Safer alternatives: - Use standard dig queries for specific records - Request zone transfer permissions through proper channels - Check if zone transfer is authorized for your IP
Mediumdns-nsupdate-localnsupdate -l applies local updates which can modify DNS records.
Explanation
nsupdate -l uses local (loopback) TSIG authentication, allowing DNS modifications without network credentials. This is convenient for local testing but can accidentally modify production DNS if run on the wrong server. Safer alternatives: - Verify you are on the intended server before running - Use explicit server and key options for clarity - Test changes with 'show' before 'send'
Safe patterns
Checked first. A command that matches one is never blocked by this pack.
dns-dig-safedns-host-safedns-nslookup-safe