A client can encode data fragments into queried subdomain names that reach an operator-controlled authoritative server through recursive resolution. Response records can carry commands or other data back. The surrounding infrastructure may resolve names correctly while transporting information it was not intended to carry.
Attackers use these channels for command and control (C2) and data exfiltration. MITRE ATT&CK (Adversarial Tactics, Techniques, and Common Knowledge) maps DNS-based C2 to T1071.004. T1048, Exfiltration Over Alternative Protocol, applies when DNS carries stolen data separately from the main C2 protocol.
Key points
Data flowQueries can carry outbound information, while responses support incoming instructions or content; encoding does not necessarily provide encryption.
Investigation evidenceUnusual query names, changing subdomains, volumes, response sizes, timing, and originating processes help distinguish tunneling from expected applications.
Defensive controlsManaged resolvers, restricted resolution paths, protective filtering, query analysis, and endpoint correlation improve visibility and constrain unauthorized channels.
Important limitationLegitimate applications can produce similar DNS patterns, and low-volume tunnels may evade thresholds. Encrypted DNS can reduce network visibility when monitoring cannot inspect the chosen resolution path.