
What IT infrastructure security covers, the layers to protect from network to endpoints and cloud, the main threats, and a best-practice checklist.
What DNS cache snooping is, how to confirm the scanner finding with dig or nmap, and how to fix it on Windows DNS Server and BIND.


Content writer, trio.so
DNS cache snooping is when someone asks a DNS resolver whether a domain is already in its cache, usually with a query that has the recursion flag turned off. If the server answers, the domain was looked up recently, which tells the asker which sites, cloud services or partners the people behind that resolver use. Vulnerability scanners report it as "DNS Server Cache Snooping Remote Information Disclosure" (Nessus plugin 12217, rated Medium). The fix is to let only your own clients query the resolver's cache and use recursion, and to keep internal and internet-facing DNS separate.
If a scan report brought you here, go straight to the fix section below; the rest of the post explains how the attack works and how to watch for it.
From a machine outside the network the scanner tested from, pick a popular domain and ask the server without recursion:
dig @203.0.113.10 www.example.com A +norecurse
If the reply contains an answer for a domain the server is not authoritative for, it is serving its cache to you. Nmap's dns-cache-snoop script checks a list of popular domains in one go:
nmap -sU -p 53 --script dns-cache-snoop 203.0.113.10
Its output reads like "10 of 100 tested domains are cached." The script is classed as intrusive, so run it only against servers you are allowed to test.
Set-DnsServerRecursion -Enable $false in PowerShell.In named.conf, limit recursion and cache answers to your own networks with an access list:
acl internal { 10.0.0.0/8; 192.168.0.0/16; localhost; };
options {
allow-recursion { internal; };
allow-query-cache { internal; };
};
On an authoritative-only BIND server, set recursion no; instead. Reload with rndc reconfig and repeat the dig test from outside: the reply should now be refused.
Tenable notes that if the server is internal and cannot be reached from outside, an attacker would have to be on your network already, which includes employees, contractors and guest Wi-Fi users. That is lower risk but not none: keep guest networks off your internal resolvers, then rescan and document the decision.
DNS cache snooping, also called DNS cache probing, is a way to learn what a DNS resolver has looked up recently by asking it whether a name is in its cache. The attacker does not need access to the computers behind the resolver, only the ability to send queries to it. That is why resolvers that answer anyone on the internet, or anyone on a guest network, are the main target.
A resolver keeps answers in its cache for a while (the record's time to live) so that the next lookup is fast. An attacker uses that in two ways:
For example, an attacker asks the resolver about a company's VPN provider, its payroll service and a supplier's portal. Every cached answer confirms that someone behind the resolver uses that service, and the remaining TTL hints at when.
Snooping does not change anything on the server. Its risk is what it reveals:
Treat it as part of vulnerability management: low impact on its own, worth fixing because the fix is a configuration change.
Most of what is written about real snooping is research and penetration testing rather than reported breaches. Typical scenarios look like this:
DNS firewalls and protective DNS services filter queries and block known malicious domains, and many log every query, which helps with detection. Managed resolvers also take the job of running and securing a resolver off your team. DNSSEC is often mentioned here, but it solves a different problem: it signs DNS answers so they cannot be forged, which defends against cache poisoning, not snooping. A DNSSEC-validating resolver still reveals what is in its cache if it answers outsiders.
DNS cache snooping reads what a resolver has cached, and the scanner finding usually means a resolver answers people it should not. Confirm it with dig or nmap, decide what the server is for, restrict recursion and cache answers to your own clients, and rescan.
Related reading: preventing DNS cache poisoning, DNSSEC benefits, DHCP server best practices and network segmentation.
trio.so brings device management, patching and security policies for Windows, macOS, Linux, iOS/iPadOS and Android into one console. Enroll a device and see it in the console within minutes.
trio.so brings device management, patching and security policies for Windows, macOS, Linux, iOS/iPadOS and Android into one console. Enroll a device and see it in the console within minutes.





Have questions? We've got answers. This section covers some of the most commonly asked questions related to this topic.
dig @server domain A +norecurse from outside your network, or nmap with the dns-cache-snoop script. An answer for a domain the server does not host means it serves its cache to you.Related
The related industry news, interviews, technologies, and resources.

What IT infrastructure security covers, the layers to protect from network to endpoints and cloud, the main threats, and a best-practice checklist.

We'll discuss remote code execution vulnerability and its risks. Learn how to protect your systems from this critical cybersecurity threat.

What’s the difference between IOA vs IOC? Here, we’ll talk about their unique roles in cybersecurity to better protect your digital assets.

What a threat actor is, the five main types with their motives and typical attacks, real examples, and how a small IT team reduces its exposure.

Discover how Continuous Adaptive Risk and Trust Assessment (CARTA) revolutionizes cybersecurity by enabling real-time risk evaluations.

Learn about shoulder surfing in computer security, its risks, and effective prevention strategies. Safeguard your sensitive corporate information.

Protect sensitive data & strengthen your network security by understanding how LDAP injection attacks work & learning effective strategies to prevent them.

Explore the significance of observability in cybersecurity. Learn how observability tools, real-time data, and best practices help protect against modern cyber threats.
14-day free trial. No credit card required.
trio.so for MSPs: one console, separate clients