Subscribe to the Non-Human & AI Identity Journal

DNS Exfiltration

A data theft technique that encodes stolen information into DNS queries so it blends with normal name-resolution traffic. It is effective because many environments monitor web traffic more closely than DNS, leaving the exfiltration path under-observed.

Expanded Definition

DNS exfiltration is a covert technique that hides stolen data inside DNS requests or responses, allowing information to leave an environment through a channel that is often treated as routine infrastructure traffic. In NHI security, the risk is amplified because service accounts, API keys, and agent credentials can be used to generate the traffic that carries the payload.

Definitions vary across vendors on how broadly to apply the term. Some use it only for deliberate attacker-controlled exfiltration, while others include accidental leakage through overly verbose telemetry, misconfigured resolvers, or agent tool calls that embed sensitive material. The operational distinction is whether the DNS channel is being used to move data out of the environment rather than merely resolve names. Guidance on detection is often aligned to NIST Cybersecurity Framework 2.0 monitoring and anomaly-detection concepts, but no single standard governs this term yet.

The most common misapplication is treating every unusual DNS query as exfiltration, which occurs when teams do not distinguish between benign resolver activity, tunneling, and actual data theft.

Examples and Use Cases

Implementing DNS controls rigorously often introduces inspection overhead and resolver tuning complexity, requiring organisations to weigh visibility against latency and the risk of false positives.

  • Attackers encode chunks of a stolen secrets file into subdomains and send them to a domain they control, using the organization’s recursive resolver as the relay.
  • A compromised CI/CD runner with access to an API key makes DNS lookups whose labels contain fragments of the key, turning build infrastructure into an exfiltration path.
  • An agentic workflow with broad tool access leaks sensitive context into DNS requests when a prompt injection causes the agent to query attacker-owned domains.
  • Security teams correlate resolver logs with identity telemetry from the Ultimate Guide to NHIs to determine whether an NHI or human account initiated the suspicious pattern.
  • Detection engineering baselines normal DNS traffic against known resolution behavior from RFC 1035 so that long, high-entropy labels stand out.

Why It Matters in NHI Security

DNS exfiltration matters because NHI compromise often produces high-volume, automated, and persistent leakage rather than a single stolen credential. NHI Management Group notes that Ultimate Guide to NHIs reports 79% of organisations have experienced secrets leaks, and 77% of those incidents caused tangible damage. That combination makes covert DNS channels especially dangerous when secrets are stored outside managed vaults or when service accounts are overprivileged.

Practitioners should connect DNS monitoring to identity governance, secret rotation, and egress controls rather than treating it as a standalone network issue. The security impact is greatest when attackers can use valid NHI credentials to blend malicious traffic into ordinary infrastructure activity, bypassing controls that focus only on web proxies or endpoint telemetry. DNS inspection, resolver policy, and privilege reduction should be considered together with CISA DNS attack guidance and the broader monitoring discipline in the NIST Cybersecurity Framework 2.0.

Organisations typically encounter the full significance of DNS exfiltration only after secrets appear outside the environment or an incident response team traces unexplained outbound DNS patterns back to a compromised service account, at which point the term becomes operationally unavoidable to address.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST Zero Trust (SP 800-207) and NIST AI RMF set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-04 Covers abuse of NHI credentials and anomalous outbound activity.
NIST CSF 2.0 DE.CM Detection and monitoring map directly to spotting covert DNS channels.
NIST Zero Trust (SP 800-207) SC-7 Zero Trust requires controlled egress and inspection of outbound paths.
OWASP Agentic AI Top 10 A-03 Agent tool abuse can turn name resolution into a covert exfiltration channel.
NIST AI RMF Risk management guidance applies when AI or agents can leak data via tools.

Restrict NHI privileges and monitor abnormal DNS egress from service identities.