MITRE ATT&CK · T1071.004

DNS

MITRE · cited in 9 of our lessons

Explanation

What attackers do. Attackers hide command and control traffic inside DNS queries and responses, since DNS is needed almost everywhere and is often lightly monitored. This sub-technique serves the Command and Control tactic.

How to defend. Force all endpoints to use internal DNS resolvers and block direct DNS to the internet. Log DNS queries centrally, use protective DNS services with threat intelligence, and consider blocking newly registered domains. Watch for DNS over HTTPS to unapproved resolvers, which bypasses these controls.

Signs to look for. Look for long or random-looking subdomains, high query volumes to a single domain, unusual record types such as TXT used heavily, and hosts querying external resolvers directly. A common gap is not retaining DNS logs at all.

The official text
Adversaries may communicate using the Domain Name System (DNS) application layer protocol to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server. The DNS protocol serves an administrative function in computer networking and thus may be very common in environments. DNS traffic may also be allowed even before network authentication is completed. DNS packets contain many fields and headers in which data can be concealed. Often known as DNS tunneling, adversaries may abuse DNS to communicate with systems under their control within a victim network while also mimicking normal, expected traffic. DNS beaconing may be used to send commands to remote systems via DNS queries. A DNS beacon is created by tunneling DNS traffic (i.e. Protocol Tunneling). The commands may be embedded into different DNS records, for example, TXT or A records. DNS beacons may be difficult to detect because the beacons infrequently communicate with infected devices. Infrequent communication conceals the malicious DNS traffic with normal DNS traffic.

© The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation (MITRE ATT&CK®).

Lessons that cite it

Real incidents where this item mattered.