Drive-by cryptomining is unauthorised use of a victim’s device or browser to mine cryptocurrency. It usually runs through injected web scripts, compromised sites, or malicious adverts, consuming CPU, battery, and bandwidth while hiding from the user. The attacker’s goal is to generate coins without installing obvious malware.
What Drive-by Cryptomining Means in Practice
Drive-by cryptomining is not just “slow browsing,” it is covert compute theft. A page, ad, or compromised script quietly turns a visitor’s browser into a mining worker, often without any visible installation, which makes the abuse harder to notice than traditional malware.
Because the mining runs inside a normal web session, defenders may see only a spike in CPU use, battery drain, fan noise, or sluggish page performance. That means the security problem is as much about hidden execution and abuse of trust as it is about the cryptocurrency being mined.
How Drive-by Cryptomining Works
The usual delivery paths are injected JavaScript, malicious advertising networks, or a legitimate site that has been compromised and altered to load mining code. The script can be short-lived and domain-hopping, which helps it evade simple blocking and makes attribution difficult.
In many cases the code uses the browser’s own resources, so the victim pays the cost in processing time, electricity, mobile data, and device wear. On shared or lower-powered endpoints, even modest mining activity can become a visible performance issue.
Why It Is Difficult to Spot
Drive-by cryptomining often hides behind ordinary web behaviour, so users may only see a page that feels “heavy” rather than obviously malicious. The attacker benefits from that ambiguity because there may be no file dropper, no obvious phishing prompt, and no persistent program list entry for the user to inspect.
Security teams also face a classification problem: the activity may look like a performance anomaly, a browser extension issue, or a bad ad script before it is recognised as abuse. That is why web filtering, script control, and browser telemetry matter more than simple endpoint malware signatures alone.
Security Implications and Exposure
For organisations, the main exposure is resource abuse at scale. One infected session may be irritating; many compromised sessions can create measurable cost, user frustration, support load, and degraded service on endpoint fleets, kiosks, or shared workstations.
Drive-by cryptomining also signals a broader trust failure, because the same injection path can be reused for credential theft, redirects, or other malicious payloads. In that sense, mining code is often both the payload and a warning that the browsing environment, advertising chain, or site integrity has been compromised.
Risk and Threat Considerations
Drive-by cryptomining is dangerous because it monetises victim infrastructure without obvious persistence, which lets attackers scale abuse across many browsers while staying relatively quiet. It can also indicate that an attacker has control over a website, ad network, or script delivery path that could be used for broader compromise.
Failure mechanism: Malicious JavaScript or injected third-party content executes in the browser context, consumes local compute, and may evade casual inspection by changing domains, timing, or page behaviour.
Impact: Organisations can see degraded endpoint performance, higher power and bandwidth consumption, user disruption, and a compromised web trust chain that may support further malicious activity.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK and OWASP API Security Top 10 address the attack and risk surface, while CIS Controls v8, NIST CSF 2.0 and OWASP ASVS set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| MITRE ATT&CK | T1496 — Resource Hijacking | Drive-by cryptomining is browser-based resource hijacking for attacker profit. |
| Recommendation — Map browser mining abuse to T1496 and hunt for unusual compute consumption tied to web sessions. | ||
| CIS Controls v8 | CIS-9 — Email and Web Browser Protections | Browser and web content controls help block malicious scripts and ad-delivered mining code. |
| Recommendation — Harden browser and web filtering controls to reduce malicious script execution and drive-by payload delivery. | ||
| NIST CSF 2.0 | PR.PS-01 — Identity Management, Authentication and Access Control Are Managed | Web session and script trust depend on protective controls that limit hostile code execution paths. |
| Recommendation — Limit execution paths for untrusted web content and verify browser-side trust boundaries. | ||
| OWASP ASVS | V13 — Configuration | Browser and application configuration determine whether hostile scripts and third-party content can run. |
| Recommendation — Review application and browser configuration to reduce exposure to injected or third-party scripts. | ||
| OWASP API Security Top 10 | API8 — Security Misconfiguration | Misconfigured content delivery and web integrations can permit malicious script injection and abuse. |
| Recommendation — Check delivery and integration settings for weaknesses that let hostile scripts execute in the browser. | ||
Practitioner Guidance
Why practitioners should care: Drive-by cryptomining is a useful indicator of browser-side abuse, not just a nuisance performance issue. Treat repeated CPU spikes, unexplained battery drain, and unusual script execution as signals to inspect web content delivery and ad/script sources.
What to watch for: Pay attention to compromised sites, suspicious advertising dependencies, and browser sessions that become resource-heavy only on particular pages. Blocking risky script sources, hardening browser policy, and monitoring for abnormal web CPU patterns all reduce the window for abuse.
Related resources from NHI Mgmt Group
- How should security teams price identity platforms when non-human identities drive most activity?
- What should IAM teams review when SAML attributes drive access control?
- What breaks when protobuf schema data is allowed to drive code generation?
- How should security teams reduce risk when AI assistants can drive browser sessions?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org