title: DNS (T1071.004)
id: df00tech-t1071-004
status: experimental
description: "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. 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. The commands may be embedded into different DNS records, for example, TXT or A records."
references:
  - https://attack.mitre.org/techniques/T1071/004/
  - https://df00tech.com/detections/T1071.004
author: df00tech
date: 2026/04/13
tags:
  - attack.t1071.004
# NOTE: logsource is auto-derived and may need adjustment for your environment
logsource:
  category: network_connection
  product: windows
detection:
  # This detection logic could not be auto-translated; see the KQL/SPL query on df00tech.
  selection:
    EventID: '*'
  condition: selection
falsepositives:
  - "Content Delivery Networks (CDNs) and anti-DDoS services that use long subdomain strings for routing (e.g., Akamai, Cloudflare)"
  - "Email security services (DKIM, SPF, DMARC) that generate long TXT record queries"
  - Certificate validation services performing OCSP and CRL checks with encoded certificate data
  - Antivirus and threat intelligence services that encode file hashes in DNS queries for reputation lookups
level: critical
