Cryptojacking — blocking in-browser miners and persistent crypto miners at the DNS layer
What this threat is
Cryptojacking is the unauthorised use of someone else's compute to mine cryptocurrency for the attacker's wallet. It comes in two main forms:
- In-browser miners. A JavaScript loader runs while the victim has a tab open. The compromised site (or its compromised third-party ad provider) silently borrows the CPU and burns through the user's battery and electricity bill. The original Coinhive project popularised the pattern; the descendants are still around.
- Persistent crypto miners. Malware installed on an endpoint or server runs a long-lived mining process at low priority. On servers — especially cloud workloads with billing tied to CPU minutes — this can rack up enormous bills before anyone notices.
Both variants have to reach a mining pool to be useful. That pool is almost always referenced by hostname.
How it abuses DNS
Mining traffic shows up in DNS several ways:
- Pool hostnames. Each mining pool exposes hostnames such as
pool.example-mining[.]comand a handful of geo-routed subdomains. Stratum, the standard mining protocol, runs over TCP and is initiated by a DNS lookup like any other application. - Coin-specific subdomains. Pools that serve multiple cryptocurrencies separate them by subdomain (
xmr.pool[.]example,eth.pool[.]example) so the operator can route the worker to the correct stratum endpoint. - In-browser miner CDNs. Browser-based miners load their JavaScript and WebAssembly payloads from a small number of hosting domains, often the same domain that proxies the pool connection back to the attacker.
- Proxy networks. Some operators front the real pool behind a chain of proxy domains to evade blocklists. Those proxies are themselves hostnames that have to resolve.
Each lookup is an opportunity to interrupt the connection before any compute is spent.
How SecDNS blocks it
The default "Cryptomining" category combines:
- Curated pool list. We maintain a list of mining pool apex domains and stratum hostnames sourced from public pool directories, our own crawler, and partner feeds focused on cryptojacking. Domains that exist only to host mining pools are blocked by default; mixed-use hosts go through a stricter scoring path.
- In-browser miner script hosts. A separate list covers the JavaScript and WebAssembly hosting domains used by Coinhive-derived projects and their forks. These can also be blocked at the URL level by other layers, but DNS-layer blocking catches them earliest.
- Stratum-pattern detection. Some pools obfuscate their hostnames, but the surrounding traffic shape — short query bursts to a single apex followed by a stable long-lived TCP session — is recognisable in resolver telemetry and feeds back into the scoring.
- Mining-friendly hoster reputation. A handful of hosting providers and registrars are heavily over-represented in mining infrastructure. They are not blocked wholesale but contribute to the composite score for new hostnames hosted there.
The blocked response defaults to NXDOMAIN. For browser-based mining the immediate effect is that the miner script simply fails to load; the page renders without the miner active.
Example
A compromised WordPress plugin injects a script tag pointing at lib.miner-cdn[.]bar/wasm-loader.js. When a visitor lands on the page, the browser asks the resolver for lib.miner-cdn[.]bar. The apex is on the cryptojacking feed, registered 11 days ago, and hosted on an ASN with a high mining concentration. The resolver returns NXDOMAIN; the script tag fails; the page loads normally without the miner. Across a 10,000-seat school district that translates into noticeably cooler classroom laptops and a measurable reduction in helpdesk tickets about slow Chromebooks.
Stats
Across the production resolver fleet we blocked approximately N cryptomining-category queries in <month> this year, with roughly N% from compromised legitimate sites and the remainder from persistent miners on endpoints. Data placeholder pending Q1 2026 transparency report.