What Is DNS Tunneling, and How Can You Spot It? (Explained Clearly) - Security+
CompTIA Security+ SY0-801: Cybersecurity Fundamentals
Learn what DNS tunneling is, why blocking web uploads won’t stop it, and how to spot suspicious activity in DNS and endpoint logs in this Security+ guide.
👉 Master your Security+ skills with Pluralsight here: Pluralsight
You’ll learn what DNS tunneling is, why blocking web uploads doesn’t stop it, and how attackers can misuse DNS traffic for data exfiltration or command and control (C2). This beginner-friendly Security+ guide shows you how to use DNS and device logs to tell suspicious activity from normal network noise.
Chapters:
0:00 Intro
0:15 What is DNS tunneling, and how does it work?
1:02 Why would attackers use DNS tunneling?
1:51 What does DNS tunneling look like in an alert?
2:43 How can defenders reduce the risk of DNS tunneling?
3:42 Outro
Affiliate notice: Some links may earn a commission. Thanks for your support.
- DNS tunneling carries extra data inside DNS queries or replies. It can enable data theft or command and control even when web uploads are blocked. A successful lookup doesn’t mean the exchange was harmless.
- Look for patterns, not a single red flag. Many long, distinct names under one domain, unusual timing, or unexpected TXT activity warrant a closer look but don’t prove tunneling.
- Correlate DNS and endpoint logs. Compare queries with the device’s usual activity and with similar devices, then identify which process made the requests. Even a strong alert doesn’t show what, if anything, was transferred.
- Use approved resolvers and monitor query behavior. Include encrypted DNS in your policy, and pair domain filtering with monitoring. NIST’s DNS deployment guide covers these controls in more depth.
- Treat domain blocking as containment, not cleanup. Blocking can interrupt the exchange, but it won’t remove malware. Preserve logs and check for other affected devices.
- 👉 Try Pluralsight to build hands-on security skills with guided labs and feedback, then use practice exams to focus your Security+ study.
DNS tunneling uses Domain Name System (DNS) queries or responses to carry information that isn’t needed for ordinary name resolution. An attacker can use it to send data out of a network or communicate with a compromised device, even when web uploads are blocked. The DNS lookup can still work as expected: a successful response tells you the lookup worked, not whether the exchange was harmless.
How DNS tunneling works
In a normal DNS lookup, your device asks a recursive resolver for information about a name, such as a website’s IP address. The resolver can answer from its cache or, if needed, consult the authoritative name server that serves records for the domain. The name requested in the query is called the QNAME.
In DNS tunneling, the queried name can carry extra data out, and a DNS reply can carry information back. Think of it as asking for someone’s address when the question itself contains a hidden note. A TXT record is one possible way for a reply to carry information, but tunnels don’t have to use TXT records.
FAQ
Quick answers to the questions people usually ask about this topic.
Can DNS tunneling alerts be false positives?
Can DNS tunneling alerts be false positives?
Yes. Legitimate services can generate long query names, use TXT records, or make requests at regular intervals. Before treating an alert as evidence of compromise, check which process made the requests, whether the pattern is new for that device, and whether similar devices running the same software behave the same way.
Can a firewall detect DNS tunneling?
Can a firewall detect DNS tunneling?
A firewall can help if it inspects DNS traffic and records query details. A firewall that only logs connection metadata, such as IP addresses and ports, can show that a device reached a resolver but not what names it queried. Use resolver and endpoint logs to fill that gap, especially when DNS traffic is encrypted. NIST’s Secure Domain Name System Deployment Guide covers DNS logging and security controls.
How do you find the device behind a DNS tunneling alert if the logs only show a shared resolver?
How do you find the device behind a DNS tunneling alert if the logs only show a shared resolver?
Start with logs from the resolver that received the client requests, if available. Match the query name and timestamp to the recorded client IP, then use DHCP records to identify which device had that address at the time. Endpoint telemetry can help confirm which process made the request. If the logs you have only identify the shared resolver, they aren’t enough to attribute the query to a specific device.
Can DNS logs prove that data was stolen through DNS tunneling?
Can DNS logs prove that data was stolen through DNS tunneling?
Not on their own. DNS logs can show which names were queried and, depending on what was logged, which device made the requests. A suspicious pattern can justify an investigation, but it doesn’t establish what data, if any, left the network. Preserve the DNS and endpoint evidence so responders can compare query activity with process behavior and file access.
What should I practice after learning about DNS tunneling for Security+?
What should I practice after learning about DNS tunneling for Security+?
Practice explaining why an alert is suspicious, what benign activity could look similar, and which logs you’d check next. If you want structured practice and feedback, try Pluralsight for guided security labs, assessments, and practice exams that can help you decide what to study next.
Comments
Add a comment...Pinned by @jaymayor
@jaymayor👉 Master your Security+ skills with Pluralsight here: https://www.jaymayor.com/go/security-plus
Some links may earn a commission. Thanks for your support.
