Command and Control (TA0011)(external, opens in a new tab or window)
text code block:network where host.os.type == "macos" and event.type == "start" and event.action == "connection_attempted" and destination.port == 443 and cidrmatch(destination.ip, /* Cloudflare, including malware-blocking resolvers */ "1.1.1.1/32", "1.0.0.1/32", "1.1.1.2/32", "1.0.0.2/32", "1.1.1.3/32", "1.0.0.3/32", /* Google */ "8.8.8.8/32", "8.8.4.4/32", /* Quad9 */ "9.9.9.9/32", "149.112.112.112/32", "9.9.9.10/32", "149.112.112.10/32", "9.9.9.11/32", "149.112.112.11/32", /* OpenDNS */ "208.67.222.222/32", "208.67.220.220/32", /* AdGuard */ "94.140.14.14/32", "94.140.15.15/32") and (process.code_signature.trusted == false or process.code_signature.exists == false) and process.executable like ( "/tmp/*", "/private/tmp/*", "/private/var/tmp/*", "/var/tmp/*", "/Users/Shared/*", "/Users/*/Downloads/*", "/private/var/folders/*", "/var/folders/*", "/Volumes/*", "/Users/*/Library/Application Support/*")
Install detection rules in Elastic Security
Detect DNS over HTTPS via Unsigned or Untrusted Binary in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).