Detection rules › Elastic

DNS Request to Crypto/DHT Services

Time window
1m
Sequence by
process.entity_id
Source
github.com/elastic/protections-artifacts

This rule detects DNS queries to crypto/DHT services via living-off-the-land executables or executables in world/user-writable directories. Malware authors may use these services to communicate with command and control infrastructure or to exfiltrate data from the target system.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
This rule detects DNS queries to crypto/DHT services via living-off-the-land executables or executables in
world/user-writable directories. Malware authors may use these services to communicate with command and control
infrastructure or to exfiltrate data from the target system.
"""
id = "fd00d51f-9a22-45e2-9247-69dd34187815"
license = "Elastic License v2"
name = "DNS Request to Crypto/DHT Services"
os_list = ["linux"]
reference = ["https://www.aikido.dev/blog/glassworm-chrome-extension-rat"]
version = "1.0.4"

query = '''
sequence by process.entity_id with maxspan=1m
  [process where event.type == "start" and event.action == "exec" and (
    process.name in (
      "curl", "wget", "bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "busybox",
      "timeout", "env", "node", "deno", "nodejs"
    ) or
    process.name like ".*" or
    process.executable like (
      "./*", "/tmp/*", "/var/tmp/*", "/dev/shm/*", "/run/*", "/var/run/*", "/boot/*", "/sys/*",
      "/lost+found/*", "/proc/*", "/var/mail/*", "/var/www/*", "/home/*/*", "/root/*",
      /* Enforce Python, Perl, PHP, Ruby, Lua, Node.js paths */
      "/bin/python*", "/usr/bin/python*", "/usr/local/bin/python*",
      "/bin/perl*", "/usr/bin/perl*", "/usr/local/bin/perl*",
      "/bin/php*", "/usr/bin/php*", "/usr/local/bin/php*",
      "/bin/ruby*", "/usr/bin/ruby*", "/usr/local/bin/ruby*",
      "/bin/lua*", "/usr/bin/lua*", "/usr/local/bin/lua*",
      "/bin/node", "/usr/bin/node", "/usr/local/bin/node"
    )
  ) and
  not (
    process.parent.command_line like "*home/*/.claude/shell-snapshots/*" or
    (process.executable like "/usr/bin/python3*" and process.args == "replenisher.py") or
    (process.parent.command_line == "s6-supervise svc-qbittorrent" and process.args == "svc-qbittorrent") or
    process.executable like ("/home/*/Games/WarThunder/launcher", "/home/*/.rbenv/versions/*/bin/ruby", "/home/*/.pyenv/versions/*/bin/python3*") or
    process.parent.executable like ("/usr/lib/systemd/systemd", "/home/*/.local/bin/rtk", "/usr/bin/gnome-shell", "/package/admin/s6-*/command/s6-supervise") or
    (process.name == "curl" and process.parent.args like "read -r RPC;*") or
    (process.executable like "/usr/bin/php*" and process.args in ("/var/tools/koalaping/bin/ping.php", "/var/tools/lean/bin/Lean.php")) or
    (process.executable like "/home/*/.local/share/uv/python/*/bin/python3*" and process.working_directory like "/home/*/shard_campaign_data_collection") or
    (process.executable == "/usr/bin/dash" and process.args == "/usr/bin/firefox")
  )]
  [dns where event.action == "lookup_result" and dns.question.name like~ (
    /* Solana */
    "api.mainnet-beta.solana.com", "solana-mainnet.gateway.tatum.io", "go.getblock.us", "solana-rpc.publicnode.com",
    "api.blockeden.xyz", "solana.drpc.org", "solana.leorpc.com", "solana.api.onfinality.io", "solana.api.pocket.network",

    /* Ethereum */
    "*ethereum.org", "*infura.io", "*alchemy.com", "*alchemyapi.io", "*ankr.com", "*quiknode.pro", "*tatum.io",
    "*thirdweb.com", "*tenderly.co", "*flashbots.net", "*mevblocker.io", "*drpc.org", "*blockpi.network",
    "*llamarpc.com", "*1rpc.io", "*0xrpc.io", "*nodies.app", "*blastapi.io", "*nownodes.io", "*pokt.network",
    "*merkle.io", "*blinklabs.xyz", "*leorpc.com", "*publicnode.com", "*cloudflare-eth.com", "*payload.de",
    "*etherscan.io", "*ethplorer.io", "*blockchair.com", "*pokt.io", "*getblock.io", "*chainstack.com",
    "*moralis.io", "*quicknode.com", "*quiknode.com", "*figment.io", "*nodesmith.io", "*blockdaemon.com",
    "*onfinality.io", "*ankr-rpc.com", "*hardhat.org", "*foundry.paradigm.xyz", "*paradigm.xyz",
    "*ethrpc.com", "*web3api.com", "*.icp0.io",

    /* BNB Smart Chain (UNC5342 (DPRK) reads JADESNOW payloads via Binplorer); */
    "*binplorer.com", "*bscscan.com", "*bnbchain.org",

    /* Polygon (DeadLock ransomware proxy address storage (Group-IB, Jan 2026) */
    "polygon-rpc.com", "*polygonscan.com",

    /* Bitcoin (Glupteba OP_RETURN dead-drop, Akamai cryptominer botnet C2 backup) */
    "*blockchain.info", "*blockchain.com", "*blockstream.info", "*mempool.space", "*blockcypher.com",

    /* Tron (heavy abuse for laundering, dusting attacks, emerging C2) */
    "*trongrid.io", "*tronscan.org",

    /* Crypto */
    "*binance.org", "*ninicoin.io", "*defibit.io",

    /* DHT lookup domains */
    "dht.libtorrent.org", "router.bittorrent.com", "router.utorrent.com"
  ) and
  not dns.question.name == "www.alchemy.com"]
'''

min_endpoint_version = "9.3.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1

[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0

[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 1

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"



[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"
[[threat.technique.subtechnique]]
id = "T1071.004"
name = "DNS"
reference = "https://attack.mitre.org/techniques/T1071/004/"


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


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

[internal]
min_endpoint_version = "9.3.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 1m, correlated by process.entity_id.

Stage 1: process

[process where event.type == "start" and event.action == "exec" and (
    process.name in (
      "curl", "wget", "bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish", "busybox",
      "timeout", "env", "node", "deno", "nodejs"
    ) or
    process.name like ".*" or
    process.executable like (
      "./*", "/tmp/*", "/var/tmp/*", "/dev/shm/*", "/run/*", "/var/run/*", "/boot/*", "/sys/*",
      "/lost+found/*", "/proc/*", "/var/mail/*", "/var/www/*", "/home/*/*", "/root/*",
      "/bin/python*", "/usr/bin/python*", "/usr/local/bin/python*",
      "/bin/perl*", "/usr/bin/perl*", "/usr/local/bin/perl*",
      "/bin/php*", "/usr/bin/php*", "/usr/local/bin/php*",
      "/bin/ruby*", "/usr/bin/ruby*", "/usr/local/bin/ruby*",
      "/bin/lua*", "/usr/bin/lua*", "/usr/local/bin/lua*",
      "/bin/node", "/usr/bin/node", "/usr/local/bin/node"
    )
  ) and
  not (
    process.parent.command_line like "*home/*/.claude/shell-snapshots/*" or
    (process.executable like "/usr/bin/python3*" and process.args == "replenisher.py") or
    (process.parent.command_line == "s6-supervise svc-qbittorrent" and process.args == "svc-qbittorrent") or
    process.executable like ("/home/*/Games/WarThunder/launcher", "/home/*/.rbenv/versions/*/bin/ruby", "/home/*/.pyenv/versions/*/bin/python3*") or
    process.parent.executable like ("/usr/lib/systemd/systemd", "/home/*/.local/bin/rtk", "/usr/bin/gnome-shell", "/package/admin/s6-*/command/s6-supervise") or
    (process.name == "curl" and process.parent.args like "read -r RPC;*") or
    (process.executable like "/usr/bin/php*" and process.args in ("/var/tools/koalaping/bin/ping.php", "/var/tools/lean/bin/Lean.php")) or
    (process.executable like "/home/*/.local/share/uv/python/*/bin/python3*" and process.working_directory like "/home/*/shard_campaign_data_collection") or
    (process.executable == "/usr/bin/dash" and process.args == "/usr/bin/firefox")
  )]

Stage 2: dns

[dns where event.action == "lookup_result" and dns.question.name like~ (
    "api.mainnet-beta.solana.com", "solana-mainnet.gateway.tatum.io", "go.getblock.us", "solana-rpc.publicnode.com",
    "api.blockeden.xyz", "solana.drpc.org", "solana.leorpc.com", "solana.api.onfinality.io", "solana.api.pocket.network",
    "*ethereum.org", "*infura.io", "*alchemy.com", "*alchemyapi.io", "*ankr.com", "*quiknode.pro", "*tatum.io",
    "*thirdweb.com", "*tenderly.co", "*flashbots.net", "*mevblocker.io", "*drpc.org", "*blockpi.network",
    "*llamarpc.com", "*1rpc.io", "*0xrpc.io", "*nodies.app", "*blastapi.io", "*nownodes.io", "*pokt.network",
    "*merkle.io", "*blinklabs.xyz", "*leorpc.com", "*publicnode.com", "*cloudflare-eth.com", "*payload.de",
    "*etherscan.io", "*ethplorer.io", "*blockchair.com", "*pokt.io", "*getblock.io", "*chainstack.com",
    "*moralis.io", "*quicknode.com", "*quiknode.com", "*figment.io", "*nodesmith.io", "*blockdaemon.com",
    "*onfinality.io", "*ankr-rpc.com", "*hardhat.org", "*foundry.paradigm.xyz", "*paradigm.xyz",
    "*ethrpc.com", "*web3api.com", "*.icp0.io",
    "*binplorer.com", "*bscscan.com", "*bnbchain.org",
    "polygon-rpc.com", "*polygonscan.com",
    "*blockchain.info", "*blockchain.com", "*blockstream.info", "*mempool.space", "*blockcypher.com",
    "*trongrid.io", "*tronscan.org",
    "*binance.org", "*ninicoin.io", "*defibit.io",
    "dht.libtorrent.org", "router.bittorrent.com", "router.utorrent.com"
  ) and
  not dns.question.name == "www.alchemy.com"]

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argseq/usr/bin/firefoxexcludes:process.args field:"process.args" value:"/usr/bin/firefox"
process.executableeq/usr/bin/dashexcludes:process.executable field:"process.executable" value:"/usr/bin/dash"
process.argseqreplenisher.pyexcludes:process.args field:"process.args" value:"replenisher.py"
process.executablestarts_with/usr/bin/python3excludes:process.executable field:"process.executable" value:"/usr/bin/python3"
process.argseqsvc-qbittorrentexcludes:process.args field:"process.args" value:"svc-qbittorrent"
process.parent.command_lineeqs6-supervise svc-qbittorrentexcludes:process.parent.command_line field:"process.parent.command_line" value:"s6-supervise svc-qbittorrent"
process.argsin/var/tools/koalaping/bin/ping.php, /var/tools/lean/bin/Lean.phpexcludes:process.args field:"process.args" value:"/var/tools/koalaping/bin/ping.php" field:"process.args" value:"/var/tools/lean/bin/Lean.php"
process.executablestarts_with/usr/bin/phpexcludes:process.executable field:"process.executable" value:"/usr/bin/php"
process.executablewildcard/home/*/.local/share/uv/python/*/bin/python3*excludes:process.executable field:"process.executable" value:"/home/*/.local/share/uv/python/*/bin/python3*"
process.working_directorywildcard/home/*/shard_campaign_data_collectionexcludes:process.working_directory field:"process.working_directory" value:"/home/*/shard_campaign_data_collection"
process.nameeqcurlexcludes:process.name field:"process.name" value:"curl"
process.parent.argsstarts_withread -r RPC;excludes:process.parent.args field:"process.parent.args" value:"read -r RPC;"
process.executablewildcard/home/*/Games/WarThunder/launcher, /home/*/.rbenv/versions/*/bin/ruby, /home/*/.pyenv/versions/*/bin/python3*excludes:process.executable field:"process.executable" value:"/home/*/Games/WarThunder/launcher" field:"process.executable" value:"/home/*/.rbenv/versions/*/bin/ruby" field:"process.executable" value:"/home/*/.pyenv/versions/*/bin/python3*"
process.parent.command_linewildcard*home/*/.claude/shell-snapshots/*excludes:process.parent.command_line field:"process.parent.command_line" value:"*home/*/.claude/shell-snapshots/*"
process.parent.executablewildcard/usr/lib/systemd/systemd, /home/*/.local/bin/rtk, /usr/bin/gnome-shell, /package/admin/s6-*/command/s6-superviseexcludes:process.parent.executable
dns.question.nameeqwww.alchemy.comexcludes:dns.question.name field:"dns.question.name" value:"www.alchemy.com"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
dns.question.namewildcard
  • *.icp0.io
  • *0xrpc.io
  • *1rpc.io
  • *alchemy.com
  • *alchemyapi.io
  • *ankr-rpc.com
  • *ankr.com
  • *binance.org
  • *binplorer.com
  • *blastapi.io
  • *blinklabs.xyz
  • *blockchain.com
  • *blockchain.info
  • *blockchair.com
  • *blockcypher.com
  • *blockdaemon.com
  • *blockpi.network
  • *blockstream.info
  • *bnbchain.org
  • *bscscan.com
  • *chainstack.com
  • *cloudflare-eth.com
  • *defibit.io
  • *drpc.org
  • *ethereum.org
  • *etherscan.io
  • *ethplorer.io
  • *ethrpc.com
  • *figment.io
  • *flashbots.net
  • *foundry.paradigm.xyz
  • *getblock.io
  • *hardhat.org
  • *infura.io
  • *leorpc.com
  • *llamarpc.com
  • *mempool.space
  • *merkle.io
  • *mevblocker.io
  • *moralis.io
  • +33 more values (see full rule source)
field:"QueryName" kind:wildcard
event.actioneq
  • exec
  • lookup_result
field:"EventType" kind:eq
event.typeeq
  • start
field:"event.type" kind:eq value:"start"
process.executablewildcard
  • ./*
  • /bin/lua*
  • /bin/node
  • /bin/perl*
  • /bin/php*
  • /bin/python*
  • /bin/ruby*
  • /boot/*
  • /dev/shm/*
  • /home/*/*
  • /lost+found/*
  • /proc/*
  • /root/*
  • /run/*
  • /sys/*
  • /tmp/*
  • /usr/bin/lua*
  • /usr/bin/node
  • /usr/bin/perl*
  • /usr/bin/php*
  • /usr/bin/python*
  • /usr/bin/ruby*
  • /usr/local/bin/lua*
  • /usr/local/bin/node
  • /usr/local/bin/perl*
  • /usr/local/bin/php*
  • /usr/local/bin/python*
  • /usr/local/bin/ruby*
  • /var/mail/*
  • /var/run/*
  • /var/tmp/*
  • /var/www/*
field:"Image" kind:wildcard
process.namein
  • bash
  • busybox
  • csh
  • curl
  • dash
  • deno
  • env
  • fish
  • ksh
  • node
  • nodejs
  • sh
  • tcsh
  • timeout
  • wget
  • zsh
field:"process_name" kind:in
process.namewildcard
  • .*
field:"process_name" kind:wildcard value:".*"