Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

DNS Tunneling

Direct answer

DNS tunneling hides data or command-and-control traffic inside DNS queries and responses, such as long encoded subdomains. Detect it by unusually long names, high query volumes and rare TXT or NULL records.

When to use this

Use this when data or command-and-control may be hidden in DNS queries.

First 30 seconds

1. DNS tunnelling hides data or C2 in DNS queries (TXT/NULL, long labels).

2. Detect by volume, entropy, query types.

3. Block direct outbound DNS.

4. Protective DNS services detect it.

5. Investigate hosts.

Operational verification

data → encoded in DNS queries → attacker domain

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common gaps
  • Endpoints allowed to query external DNS directly (UDP/TCP 53, DoH, DoT).
  • Logging only blocked queries, not all queries.
  • Ignoring TXT and NULL record volume.
  • Allow-listing CDNs and cloud domains that attackers also use for tunnels.
Platform / version applicability
Network security
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformNetwork security
Scope / prerequisiteUse this when data or command-and-control may be hidden in DNS queries.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Detection Verify boundary
  • Long, high-entropy subdomains (a9f3k...x.evil.com) and many unique names under one domain.
  • High query volume or TXT/NULL record queries from one host.
  • Queries directly to external resolvers bypassing the internal one.

Tools: DNS analytics in the SIEM, Zeek dns.log, Infoblox/Cisco Umbrella detection. Block direct outbound DNS so all queries pass through monitored resolvers.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Long, random subdomains are a sign.
  • High query volume to one domain is a sign.
  • TXT and NULL records carry data.
Key checks
  • DNS logs: long/high-entropy subdomains, high volume to one domain — tunnelling signs
  • zeek dns.log analysis — queries
  • Protective DNS alerts — detection
ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

DNS tunnelling hides data or command-and-control traffic inside DNS queries and responses, typically by encoding data in long subdomains of an attacker-controlled domain. Because DNS is allowed almost everywhere, it can bypass firewalls that block other outbound traffic.

Detection signals:

SignalWhy
Long, high-entropy subdomainsEncoded data
High query volume to one domainData transfer
Unusual record types (TXT, NULL) at volumePayload transport
Many unique subdomains per domainEach query carries new data

Prevention: force all clients to use internal resolvers (block outbound UDP/TCP 53 and known DoH endpoints elsewhere), use protective DNS with tunnelling detection, and log queries for analysis.

Signals

  • Long, high-entropy subdomains (a9f3k2...x.tunnel.evil.com).
  • Many unique subdomains under one domain.
  • Unusual record types (TXT, NULL) in large volumes.
  • Steady query rate from one host at odd hours.

Tools: iodine and dnscat2 create tunnels; Zeek dns.log, Suricata rules and protective DNS services detect them. Block by forcing all DNS through internal resolvers.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docNetwork security current

Authoritative/upstream documentation reviewed for bounded claims in DNS Security → DNS Tunneling. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc4033 · confidence 94%
Confirmation

Confirm action

Continue?