← All Threat Hunting ReportsThreat Hunting Exercise

Threat Hunting Exercise: Analyzing Proxy DNS-over-HTTPS Exfiltration Bypass Dataset

This hunt uses a simulated web-proxy dataset (proxy_doh_bypass_2022-11-16T112000.json) capturing T1071.004: DNS combined with T1048: Exfiltration Over Alternative Protocol, where an attacker uses a public DNS-over-HTTPS (DoH) resolver to both bypass DNS-layer security controls and covertly tunnel data, since DoH traffic is encrypted HTTPS and often invisible to traditional DNS monitoring.

Step 1: Hypothesis Formation

Hypothesis: A host establishes repeated HTTPS connections to a known public DoH resolver endpoint (e.g., Cloudflare 1.1.1.1/cloudflare-dns.com, Google dns.google) from a process other than the operating system's configured DNS stack or an approved browser, with request/response sizes and cadence inconsistent with normal name resolution, indicating DoH is being used to bypass DNS security controls and/or tunnel data. Indicators:

Null Hypothesis: A modern browser with DoH enabled by default (e.g., Firefox, Chrome with secure-DNS) is performing legitimate encrypted name resolution as part of standard, policy-permitted browsing. Invalidate by confirming the process is a sanctioned browser and that DoH usage is covered by existing security policy/monitoring exceptions.

Rationale: DoH collapses DNS queries into ordinary-looking HTTPS traffic, which defeats DNS-layer security controls (sinkholing, RPZ, DNS-based threat-intel blocking) entirely unless the organization explicitly inspects or blocks DoH endpoints, making it an attractive both reconnaissance-evasion and low-bandwidth exfiltration channel.

Step 2: Data Sources and Scope

Step 3: Key Findings

Parsed events (5 shown) confirm SVR-DEVOPS-06 issued 2,140 DoH requests over 45 minutes from a non-browser scripting process, with query lengths far exceeding normal hostname sizes.

Timestamp (UTC)HostEventDetailIOC/Why Suspicious?
2022-11-16 11:20:08SVR-DEVOPS-06ProxyPOST https://cloudflare-dns.com/dns-query, Content-Type: application/dns-message, body 412 bytesVolume/Size IOC: DoH query bodies are typically under 100 bytes for a standard hostname lookup; a 412-byte body suggests an oversized, encoded subdomain payload rather than a real name-resolution request.
2022-11-16 11:20:08 - 12:05:41SVR-DEVOPS-06Proxy (aggregate)2,140 POST requests to the same DoH endpoint in 45 minutes, avg. interval 1.3sCadence IOC: this request volume and near-constant interval vastly exceeds what any legitimate application's name-resolution needs would generate.
2022-11-16 11:20:05SVR-DEVOPS-06(EDR process event)Process python3 executing script dns_exfil.py, no browser process presentProcess IOC: the requests originate from a custom Python script rather than a sanctioned browser or the OS DNS client, ruling out legitimate secure-DNS browsing.
2022-11-16 11:20:00 - 12:05:41SVR-DEVOPS-06Standard DNS LogsZero standard UDP/53 DNS queries logged for this host in the same windowGap IOC: a complete absence of standard DNS activity, combined with heavy DoH traffic, confirms DoH is being used to fully bypass the organization's DNS-layer security stack, not supplement it.
--(Payload analysis)Decoded DoH query names follow the pattern <base32-chunk>.exfil.attacker-domain.net, consistent with DNS-tunneling encodingConfirms the DoH channel is carrying encoded exfiltration data rather than genuine hostname lookups.

Validation:

Step 4: Recommendations & Next Steps

Hypothesis confirmed - a DevOps server ran a custom Python script issuing over 2,100 oversized DoH requests encoding tunneled data to a public resolver, completely bypassing standard DNS security monitoring!