Detection rules › Elastic

DNS to Commonly Abused Web Services

Status
production
Kind
building block (feeds higher-level correlation rules; not a standalone alert)
Severity
low
Time window
9m
Author
Elastic
Source
github.com/elastic/detection-rules

Adversaries may implement command and control (C2) communications that use common web services to hide their activity. This attack technique is typically targeted at an organization and uses web services common to the victim network, which allows the adversary to blend into legitimate traffic activity. These popular services are typically targeted since they have most likely been used before compromise, which helps malicious traffic blend in.

MITRE ATT&CK coverage

Rule body elastic

[metadata]
bypass_bbr_timing = true
creation_date = "2026/05/04"
integration = ["endpoint"]
maturity = "production"
min_stack_version = "9.3.0"
min_stack_comments = "DNS for Linux support was introduced in 9.3.0"
updated_date = "2026/05/26"

[rule]
author = ["Elastic"]
building_block_type = "default"
description = """
Adversaries may implement command and control (C2) communications that use common web services to hide their activity.
This attack technique is typically targeted at an organization and uses web services common to the victim network, which
allows the adversary to blend into legitimate traffic activity. These popular services are typically targeted since they
have most likely been used before compromise, which helps malicious traffic blend in.
"""
from = "now-9m"
index = ["logs-endpoint.events.network-*"]
language = "eql"
license = "Elastic License v2"
name = "DNS to Commonly Abused Web Services"
risk_score = 21
rule_id = "8248323e-f888-4134-a26f-37a6362f7231"
severity = "low"
tags = [
    "Domain: Endpoint",
    "Domain: Network",
    "OS: Linux",
    "Use Case: Threat Detection",
    "Tactic: Command and Control",
    "Tactic: Exfiltration",
    "Data Source: Elastic Defend",
    "Rule Type: BBR",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
network where host.os.type == "linux" and dns.question.name != null and process.name != null and
dns.question.name like~ (
  /* Google services */
  "drive.google.com", "docs.google.com", "script.google.com", "script.googleusercontent.com",
  "*googleapis.com", "calendar.app.google*",

  /* Dropbox */
  "api.dropboxapi.com", "content.dropboxapi.com", "*dl.dropboxusercontent.com",

  /* Microsoft / OneDrive / SharePoint */
  "api.onedrive.com", "*.onedrive.org", "onedrive.live.com", "*files.1drv.com", "graph.microsoft.com",
  "*.sharepoint.com", "login.live.com", "g.live.com",

  /* Slack */
  "*slack.com", "slack-redir.net", "slack-files.com",

  /* Discord */
  "discord.com", "cdn.discordapp.com", "discordapp.com",

  /* Telegram */
  "api.telegram.org", "t.me",

  /* Azure / Cloud storage */
  "apis.azureedge.net", "*.blob.core.windows.net", "*.blob.storage.azure.net", "*azurewebsites.net",

  /* GitHub / Dev hosting */
  "api.github.com", "raw.githubusercontent.*", "gist.githubusercontent.com", "rawcdn.githack.*",
  "*.notabug.org",

  /* Developer tunnels / reverse proxies */
  "*.devtunnels.ms", "*global.rel.tunnels.api.visualstudio.com", "*.ngrok.io", "*.ngrok-free.app",
  "*.portmap.*", "serveo.net", "*localtunnel.me", "*pagekite.me", "*.trycloudflare.com",

  /* AWS */
  "*s3.amazonaws.com",

  /* Paste services */
  "pastebin.*", "paste4btc.com", "paste.ee", "ghostbin.com", "paste.nrecom.net", "zerobin.net",
  "controlc.com", "pastecode.dev", "paste.rs", "hastebin.com", "dpaste.org", "dpaste.com", "0bin.net",
  "paste.ofcode.org", "paste.wakas.org", "nopaste.net",

  /* File sharing / exfiltration */
  "filebin.net", "file.io", "transfer.sh", "*.gofile.io", "workupload.com", "*upload.ee", "*anonfiles.com",
  "api.anonfile.com", "*bayfiles.com", "*bublup.com", "*dropfiles.org", "*dropmefiles.com", "*easyupload.io",
  "*filetransfer.io", "*sendspace.com", "*share.riseup.net", "*temp.sh", "*tempsend.com", "*ufile.io",
  "*send.now", "*send.cm", "*sendit.sh", "*pixeldrain.com", "*megaupload.com", "*mediafire.com",
  "*bashupload.com", "*bujang.online", "mediafire.zip", "*.4shared.com", "filecloud.me", "*.pcloud.com",
  "*catbox.moe",

  /* CDN / hosting / generic file infra */
  "*cdnmegafiles.com", "www.uplooder.net", "?.top4top.io", "top4top.io", "*.b-cdn.net", "cdn*.space",
  "i.ibb.co", "i.imgur.com",

  /* Webhooks / testing / bins */
  "webhook.site", "run.mocky.io", "mockbin.org", "requestbin.net",

  /* Public hosting / misc infra */
  "*.publicvm.com", "*.blogspot.com", "*infinityfreeapp.com", "free.keep.sh", "*.aternos.me",
  "*hosting-profi.de",

  /* IP / network utilities */
  "api.mylnikov.org", "ipbase.com", "*.getmyip.com", "myexternalip.com", "*.geojs.io",
  "*api.2ip.ua", "*api.db-ip.com", "*api.ip.sb", "*api.ipify.org", "*api.myip.com",
  "*api.npoint.io", "*api64.ipify.org", "*bot.whatismyipaddress.com", "*checkip.amazonaws.com",
  "*checkip.dyndns.org", "*curlmyip.com", "*eth0.me", "*freegeoip.app", "*freegeoip.net",
  "*freeipapi.com", "*geoiptool.com", "*geolocation-db.com", "*httpbin.org",
  "*icanhazip.com", "*ident.me", "*ifcfg.me", "*ifconfig.me", "*inet-ip.info", "*ip-api.com",
  "*ip.appspot.com", "*ip.tyk.nu", "*ip4.seeip.org", "*ipecho.net", "*ipinfo.io", "*iplogger.*",
  "*ipof.in", "*ipwho.is", "*ipwhois.app", "*ipv4.icanhazip.com", "*ipv6.icanhazip.com",
  "*myip.dnsomatic.com", "*myip.ipip.net", "*myip.opendns.com", "*portmap.io", "*wgetip.com",
  "*whatismyip.akamai.com", "*wtfismyip.com",

  /* Social / platforms */
  "mbasic.facebook.com", "*.zulipchat.com", "stackoverflow.com",

  /* Package hosting */
  "files.pythonhosted.org",

  /* Databases / backend platforms */
  "*.supabase.co", "*.elastic-cloud.com", "*.cloud.es.io",

  /* Misc / suspicious */
  "*up.freeo*.space", "*icp0.io", "updates.peer2profit.com", "meacz.gq", "rwrd.org", "lobfile.com",
  "ftpupload.net", "the.earth.li",

  /* URL shorteners */
  "*shorturl.at", "*tinyurl.com", "*bit.ly", "*cutt.ly", "*is.gd", "*rebrand.ly", "*rebrandly.com",
  "*adf.ly", "*rb.gy", "tiny.one", "t.ly", "urlz.fr", "rentry.co",
  
  /* Crypto mining pools */
  "*.nicehash.com", "stratum*.nicehash.com",
  "*.2miners.com", "*.moneroocean.stream", "*.supportxmr.com",
  "*.nanopool.org", "*.f2pool.com", "*.poolbinance.com",
  "*.antpool.com", "*.viabtc.com", "*.braiins.com", "*.slushpool.com",

  /* Decentralized */
  "ipfs.io", "*.ipfs.io", "dweb.link", "*.dweb.link",
  "*.ipfs.dweb.link", "*.ipns.dweb.link",
  "gateway.pinata.cloud", "*.mypinata.cloud",
  "web3.storage", "*.web3.storage",
  "nftstorage.link", "*.nftstorage.link",
  "arweave.net", "*.arweave.net",
  "ar.io", "*.ar.io",
  "ic0.app", "*.ic0.app",
  "icp0.io", "*.icp0.io",
  "*.storjshare.io"
) and
not process.executable like (
  "/opt/google-cloud-ops-agent/subagents/fluent-bit/bin/fluent-bit", "/usr/lib/systemd/systemd-resolved",
  "/opt/Elastic/Agent/data/elastic-agent-*/components/elastic-otel-collector", "/usr/bin/dockerd",
  "/usr/bin/google_osconfig_agent", "/snap/firefox/*/usr/lib/firefox/firefox", "/usr/bin/warp-svc",
  "/var/lib/docker/overlay2/*/merged/usr/local/bin/node", "/snap/chromium/*/usr/lib/chromium-browser/chrome",
  "/opt/google-cloud-ops-agent/subagents/opentelemetry-collector/otelopscol", "/usr/local/bin/rclone",
  "/var/lib/elastic-agent/data/elastic-agent-*/components/elastic-otel-collector", "/opt/google/chrome/chrome",
  "/usr/bin/pihole-FTL"
)
'''

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"

[[rule.threat.technique.subtechnique]]
id = "T1071.001"
name = "Web Protocols"
reference = "https://attack.mitre.org/techniques/T1071/001/"

[[rule.threat.technique]]
id = "T1090"
name = "Proxy"
reference = "https://attack.mitre.org/techniques/T1090/"

[[rule.threat.technique.subtechnique]]
id = "T1090.002"
name = "External Proxy"
reference = "https://attack.mitre.org/techniques/T1090/002/"

[[rule.threat.technique]]
id = "T1102"
name = "Web Service"
reference = "https://attack.mitre.org/techniques/T1102/"

[[rule.threat.technique.subtechnique]]
id = "T1102.001"
name = "Dead Drop Resolver"
reference = "https://attack.mitre.org/techniques/T1102/001/"

[[rule.threat.technique.subtechnique]]
id = "T1102.002"
name = "Bidirectional Communication"
reference = "https://attack.mitre.org/techniques/T1102/002/"

[[rule.threat.technique]]
id = "T1568"
name = "Dynamic Resolution"
reference = "https://attack.mitre.org/techniques/T1568/"

[[rule.threat.technique.subtechnique]]
id = "T1568.002"
name = "Domain Generation Algorithms"
reference = "https://attack.mitre.org/techniques/T1568/002/"

[rule.threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1567"
name = "Exfiltration Over Web Service"
reference = "https://attack.mitre.org/techniques/T1567/"

[[rule.threat.technique.subtechnique]]
id = "T1567.001"
name = "Exfiltration to Code Repository"
reference = "https://attack.mitre.org/techniques/T1567/001/"

[[rule.threat.technique.subtechnique]]
id = "T1567.002"
name = "Exfiltration to Cloud Storage"
reference = "https://attack.mitre.org/techniques/T1567/002/"

[[rule.threat.technique.subtechnique]]
id = "T1567.003"
name = "Exfiltration to Text Storage Sites"
reference = "https://attack.mitre.org/techniques/T1567/003/"

[rule.threat.tactic]
id = "TA0010"
name = "Exfiltration"
reference = "https://attack.mitre.org/tactics/TA0010/"

Stages and Predicates

Stage 1: network

network where host.os.type == "linux" and dns.question.name != null and process.name != null and
dns.question.name like~ (
  "drive.google.com", "docs.google.com", "script.google.com", "script.googleusercontent.com",
  "*googleapis.com", "calendar.app.google*",
  "api.dropboxapi.com", "content.dropboxapi.com", "*dl.dropboxusercontent.com",
  "api.onedrive.com", "*.onedrive.org", "onedrive.live.com", "*files.1drv.com", "graph.microsoft.com",
  "*.sharepoint.com", "login.live.com", "g.live.com",
  "*slack.com", "slack-redir.net", "slack-files.com",
  "discord.com", "cdn.discordapp.com", "discordapp.com",
  "api.telegram.org", "t.me",
  "apis.azureedge.net", "*.blob.core.windows.net", "*.blob.storage.azure.net", "*azurewebsites.net",
  "api.github.com", "raw.githubusercontent.*", "gist.githubusercontent.com", "rawcdn.githack.*",
  "*.notabug.org",
  "*.devtunnels.ms", "*global.rel.tunnels.api.visualstudio.com", "*.ngrok.io", "*.ngrok-free.app",
  "*.portmap.*", "serveo.net", "*localtunnel.me", "*pagekite.me", "*.trycloudflare.com",
  "*s3.amazonaws.com",
  "pastebin.*", "paste4btc.com", "paste.ee", "ghostbin.com", "paste.nrecom.net", "zerobin.net",
  "controlc.com", "pastecode.dev", "paste.rs", "hastebin.com", "dpaste.org", "dpaste.com", "0bin.net",
  "paste.ofcode.org", "paste.wakas.org", "nopaste.net",
  "filebin.net", "file.io", "transfer.sh", "*.gofile.io", "workupload.com", "*upload.ee", "*anonfiles.com",
  "api.anonfile.com", "*bayfiles.com", "*bublup.com", "*dropfiles.org", "*dropmefiles.com", "*easyupload.io",
  "*filetransfer.io", "*sendspace.com", "*share.riseup.net", "*temp.sh", "*tempsend.com", "*ufile.io",
  "*send.now", "*send.cm", "*sendit.sh", "*pixeldrain.com", "*megaupload.com", "*mediafire.com",
  "*bashupload.com", "*bujang.online", "mediafire.zip", "*.4shared.com", "filecloud.me", "*.pcloud.com",
  "*catbox.moe",
  "*cdnmegafiles.com", "www.uplooder.net", "?.top4top.io", "top4top.io", "*.b-cdn.net", "cdn*.space",
  "i.ibb.co", "i.imgur.com",
  "webhook.site", "run.mocky.io", "mockbin.org", "requestbin.net",
  "*.publicvm.com", "*.blogspot.com", "*infinityfreeapp.com", "free.keep.sh", "*.aternos.me",
  "*hosting-profi.de",
  "api.mylnikov.org", "ipbase.com", "*.getmyip.com", "myexternalip.com", "*.geojs.io",
  "*api.2ip.ua", "*api.db-ip.com", "*api.ip.sb", "*api.ipify.org", "*api.myip.com",
  "*api.npoint.io", "*api64.ipify.org", "*bot.whatismyipaddress.com", "*checkip.amazonaws.com",
  "*checkip.dyndns.org", "*curlmyip.com", "*eth0.me", "*freegeoip.app", "*freegeoip.net",
  "*freeipapi.com", "*geoiptool.com", "*geolocation-db.com", "*httpbin.org",
  "*icanhazip.com", "*ident.me", "*ifcfg.me", "*ifconfig.me", "*inet-ip.info", "*ip-api.com",
  "*ip.appspot.com", "*ip.tyk.nu", "*ip4.seeip.org", "*ipecho.net", "*ipinfo.io", "*iplogger.*",
  "*ipof.in", "*ipwho.is", "*ipwhois.app", "*ipv4.icanhazip.com", "*ipv6.icanhazip.com",
  "*myip.dnsomatic.com", "*myip.ipip.net", "*myip.opendns.com", "*portmap.io", "*wgetip.com",
  "*whatismyip.akamai.com", "*wtfismyip.com",
  "mbasic.facebook.com", "*.zulipchat.com", "stackoverflow.com",
  "files.pythonhosted.org",
  "*.supabase.co", "*.elastic-cloud.com", "*.cloud.es.io",
  "*up.freeo*.space", "*icp0.io", "updates.peer2profit.com", "meacz.gq", "rwrd.org", "lobfile.com",
  "ftpupload.net", "the.earth.li",
  "*shorturl.at", "*tinyurl.com", "*bit.ly", "*cutt.ly", "*is.gd", "*rebrand.ly", "*rebrandly.com",
  "*adf.ly", "*rb.gy", "tiny.one", "t.ly", "urlz.fr", "rentry.co",
  "*.nicehash.com", "stratum*.nicehash.com",
  "*.2miners.com", "*.moneroocean.stream", "*.supportxmr.com",
  "*.nanopool.org", "*.f2pool.com", "*.poolbinance.com",
  "*.antpool.com", "*.viabtc.com", "*.braiins.com", "*.slushpool.com",
  "ipfs.io", "*.ipfs.io", "dweb.link", "*.dweb.link",
  "*.ipfs.dweb.link", "*.ipns.dweb.link",
  "gateway.pinata.cloud", "*.mypinata.cloud",
  "web3.storage", "*.web3.storage",
  "nftstorage.link", "*.nftstorage.link",
  "arweave.net", "*.arweave.net",
  "ar.io", "*.ar.io",
  "ic0.app", "*.ic0.app",
  "icp0.io", "*.icp0.io",
  "*.storjshare.io"
) and
not process.executable like (
  "/opt/google-cloud-ops-agent/subagents/fluent-bit/bin/fluent-bit", "/usr/lib/systemd/systemd-resolved",
  "/opt/Elastic/Agent/data/elastic-agent-*/components/elastic-otel-collector", "/usr/bin/dockerd",
  "/usr/bin/google_osconfig_agent", "/snap/firefox/*/usr/lib/firefox/firefox", "/usr/bin/warp-svc",
  "/var/lib/docker/overlay2/*/merged/usr/local/bin/node", "/snap/chromium/*/usr/lib/chromium-browser/chrome",
  "/opt/google-cloud-ops-agent/subagents/opentelemetry-collector/otelopscol", "/usr/local/bin/rclone",
  "/var/lib/elastic-agent/data/elastic-agent-*/components/elastic-otel-collector", "/opt/google/chrome/chrome",
  "/usr/bin/pihole-FTL"
)

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
process.executablewildcard/opt/google-cloud-ops-agent/subagents/fluent-bit/bin/fluent-bit, /usr/lib/systemd/systemd-resolved, /opt/Elastic/Agent/data/elastic-agent-*/components/elastic-otel-collector, /usr/bin/dockerd, /usr/bin/google_osconfig_agent, /snap/firefox/*/usr/lib/firefox/firefox, /usr/bin/warp-svc, /var/lib/docker/overlay2/*/merged/usr/local/bin/node, /snap/chromium/*/usr/lib/chromium-browser/chrome, /opt/google-cloud-ops-agent/subagents/opentelemetry-collector/otelopscol, /usr/local/bin/rclone, /var/lib/elastic-agent/data/elastic-agent-*/components/elastic-otel-collector, /opt/google/chrome/chrome, /usr/bin/pihole-FTL

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
dns.question.nameis_not_null
  • (no value, null check)
dns.question.namewildcard
  • *.2miners.com
  • *.4shared.com
  • *.antpool.com
  • *.ar.io
  • *.arweave.net
  • *.aternos.me
  • *.b-cdn.net
  • *.blob.core.windows.net
  • *.blob.storage.azure.net
  • *.blogspot.com
  • *.braiins.com
  • *.cloud.es.io
  • *.devtunnels.ms
  • *.dweb.link
  • *.elastic-cloud.com
  • *.f2pool.com
  • *.geojs.io
  • *.getmyip.com
  • *.gofile.io
  • *.ic0.app
  • *.icp0.io
  • *.ipfs.dweb.link
  • *.ipfs.io
  • *.ipns.dweb.link
  • *.moneroocean.stream
  • *.mypinata.cloud
  • *.nanopool.org
  • *.nftstorage.link
  • *.ngrok-free.app
  • *.ngrok.io
  • *.nicehash.com
  • *.notabug.org
  • *.onedrive.org
  • *.pcloud.com
  • *.poolbinance.com
  • *.portmap.*
  • *.publicvm.com
  • *.sharepoint.com
  • *.slushpool.com
  • *.storjshare.io
  • *.supabase.co
  • *.supportxmr.com
  • *.trycloudflare.com
  • *.viabtc.com
  • *.web3.storage
  • *.zulipchat.com
  • *adf.ly
  • *anonfiles.com
  • *api.2ip.ua
  • *api.db-ip.com
  • *api.ip.sb
  • *api.ipify.org
  • *api.myip.com
  • *api.npoint.io
  • *api64.ipify.org
  • *azurewebsites.net
  • *bashupload.com
  • *bayfiles.com
  • *bit.ly
  • *bot.whatismyipaddress.com
  • *bublup.com
  • *bujang.online
  • *catbox.moe
  • *cdnmegafiles.com
  • *checkip.amazonaws.com
  • *checkip.dyndns.org
  • *curlmyip.com
  • *cutt.ly
  • *dl.dropboxusercontent.com
  • *dropfiles.org
  • *dropmefiles.com
  • *easyupload.io
  • *eth0.me
  • *files.1drv.com
  • *filetransfer.io
  • *freegeoip.app
  • *freegeoip.net
  • *freeipapi.com
  • *geoiptool.com
  • *geolocation-db.com
  • *global.rel.tunnels.api.visualstudio.com
  • *googleapis.com
  • *hosting-profi.de
  • *httpbin.org
  • *icanhazip.com
  • *icp0.io
  • *ident.me
  • *ifcfg.me
  • *ifconfig.me
  • *inet-ip.info
  • *infinityfreeapp.com
  • *ip-api.com
  • *ip.appspot.com
  • *ip.tyk.nu
  • *ip4.seeip.org
  • *ipecho.net
  • *ipinfo.io
  • *iplogger.*
  • *ipof.in
  • *ipv4.icanhazip.com
  • *ipv6.icanhazip.com
  • *ipwho.is
  • *ipwhois.app
  • *is.gd
  • *localtunnel.me
  • *mediafire.com
  • *megaupload.com
  • *myip.dnsomatic.com
  • *myip.ipip.net
  • *myip.opendns.com
  • *pagekite.me
  • *pixeldrain.com
  • *portmap.io
  • *rb.gy
  • *rebrand.ly
  • *rebrandly.com
  • *s3.amazonaws.com
  • *send.cm
  • *send.now
  • *sendit.sh
  • *sendspace.com
  • *share.riseup.net
  • *shorturl.at
  • *slack.com
  • *temp.sh
  • *tempsend.com
  • *tinyurl.com
  • *ufile.io
  • *up.freeo*.space
  • *upload.ee
  • *wgetip.com
  • *whatismyip.akamai.com
  • *wtfismyip.com
  • 0bin.net
  • ?.top4top.io
  • api.anonfile.com
  • api.dropboxapi.com
  • api.github.com
  • api.mylnikov.org
  • api.onedrive.com
  • api.telegram.org
  • apis.azureedge.net
  • ar.io
  • arweave.net
  • calendar.app.google*
  • cdn*.space
  • cdn.discordapp.com
  • content.dropboxapi.com
  • controlc.com
  • discord.com
  • discordapp.com
  • docs.google.com
  • dpaste.com
  • dpaste.org
  • drive.google.com
  • dweb.link
  • file.io
  • filebin.net
  • filecloud.me
  • files.pythonhosted.org
  • free.keep.sh
  • ftpupload.net
  • g.live.com
  • gateway.pinata.cloud
  • ghostbin.com
  • gist.githubusercontent.com
  • graph.microsoft.com
  • hastebin.com
  • i.ibb.co
  • i.imgur.com
  • ic0.app
  • icp0.io
  • ipbase.com
  • ipfs.io
  • lobfile.com
  • login.live.com
  • mbasic.facebook.com
  • meacz.gq
  • mediafire.zip
  • mockbin.org
  • myexternalip.com
  • nftstorage.link
  • nopaste.net
  • onedrive.live.com
  • paste.ee
  • paste.nrecom.net
  • paste.ofcode.org
  • paste.rs
  • paste.wakas.org
  • paste4btc.com
  • pastebin.*
  • pastecode.dev
  • raw.githubusercontent.*
  • rawcdn.githack.*
  • rentry.co
  • requestbin.net
  • run.mocky.io
  • rwrd.org
  • script.google.com
  • script.googleusercontent.com
  • serveo.net
  • slack-files.com
  • slack-redir.net
  • stackoverflow.com
  • stratum*.nicehash.com
  • t.ly
  • t.me
  • the.earth.li
  • tiny.one
  • top4top.io
  • transfer.sh
  • updates.peer2profit.com
  • urlz.fr
  • web3.storage
  • webhook.site
  • workupload.com
  • www.uplooder.net
  • zerobin.net
process.nameis_not_null
  • (no value, null check)