heroui logo

DNS over HTTPS via Unsigned or Untrusted Binary

Elastic Detection Rules

View Source
Summary
This macOS-focused detection rule identifies connection attempts that originate from unsigned or untrusted Mach-O binaries executed from staging or user-writable directories and target known public DNS resolvers over port 443. By bypassing the system resolver and using DNS-over-HTTPS (DoH), such activity may obscure DNS queries associated with command-and-control (C2) channels. The rule analyzes metadata (process and network data) rather than examining application-layer traffic, so an alert may reflect a blocked or unsuccessful connection and does not by itself prove DoH usage. It flags only when: the outgoing connection is to a public DoH resolver (listed IPs on port 443), the process executable resides in common staging paths (e.g., /tmp, Downloads, /Users/Shared, /Volumes, /Users/*/Library/Application Support/*), and the process is unsigned or untrusted (code_signature.trusted == false or code_signature.exists == false). MITRE mappings include T1071.004 (DNS) under T1071: Application Layer Protocol and T1572 (Protocol Tunneling), within TA0011 (Command and Control). False positives may arise from unsigned helper tools implementing DoH or ad-hoc tools launched from Downloads or /tmp signed by a trusted developer. Investigation should validate the binary’s origin, verify the destination as a public resolver, inspect additional outbound connections from the same process, and check for downstream persistence or payloads. Remediation includes terminating the unsigned process, quarantining the executable, blocking the hash, and scanning for persistence or follow-on downloads; if the same hash appears on other hosts, isolate affected hosts and review the download/source chain. This rule requires Elastic Defend integration on macOS endpoints.
Categories
  • Endpoint
  • Network
  • macOS
Data Sources
  • Process
  • Network Traffic
  • File
ATT&CK Techniques
  • T1071
  • T1071.004
  • T1572
Created: 2026-10-29