Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

Drive-by Compromise

Drive-by Compromise is a way for attackers to gain access to a computer when a person visits a website during normal browsing.

Reviewed by
Brandefense Analyst Team
Published
Reading Time
3 min read
Dark glass dark glass trap door cover set into glass road with red glow with red neon lines, cover art for: Drive-by Compromise

The site, or something it loads, delivers malicious code to the browser. MITRE ATT&CK lists it as an Initial Access technique.

How it works

The person does not need to open an attachment or click a suspicious link in a message. Visiting a page is enough. MITRE describes several ways the code can reach the browser: a legitimate website is compromised, script files from a writeable cloud storage bucket are changed, malicious ads are served through ad providers, or a site feature that accepts user content is abused to insert scripts. Browser push notifications can also be abused if a user clicks allow.

Attackers often pick a website used by a specific community, such as a government, an industry or a region. MITRE notes that this kind of targeted campaign is often called a strategic web compromise or watering hole attack. A recent case reached iPhones and Android phones through a tampered tracker script, described in mobile watering hole walkthrough.

In a typical case, scripts on the page check the browser and its plugins for a vulnerable version. If one is found, exploit code is delivered. If it works, the attacker can run code on the user’s system unless other protections stop it.

MITRE separates this from Exploit Public-Facing Application. Here the target is software on a user’s device, which can give the attacker a route into the internal network.

A real example

MITRE ATT&CK lists these procedure examples:

  • Bad Rabbit spread through watering holes on popular sites by injecting JavaScript into the page body or a script file.
  • SocGholish was distributed through compromised websites, with malicious content often posing as browser updates.
  • Grandoreiro used compromised websites and online ads to lure victims into downloading its installer.
  • REvil infected machines through compromised websites and exploit kits.

Who uses it

Seen in incidents

How to detect

  1. Unusual browser and network activity

    Look for the browser fetching resources from domains not seen before, or script content that looks altered, using proxy, firewall and web logs.

  2. Odd child processes from the browser

    A browser that starts unexpected programs, loads unsigned modules or injects into other processes shortly after a page visit is a warning sign.

  3. File and account changes after a visit

    Watch for new files or registry changes soon after web requests, and for unusual sign-ins, token use or consent events after a suspected endpoint compromise.

  4. Detection strategy MITRE lists

    DET0176, Drive-by Compromise: Behavior-based, Multi-platform Detection Strategy (T1189).

How to defend

  1. Keep browsers and plugins updated

    Updated software closes the holes exploit code relies on. Use modern browsers with their security features turned on.

  2. Limit web content

    Ad blockers and script blocking extensions can stop malicious code served through ads or scripts. Consider disabling browser push notifications from certain applications and browsers.

  3. Contain the browser

    Browser sandboxes, other virtualization and application microsegmentation reduce the impact of an exploit, though escapes can still exist.

  4. Use exploit protection and training

    Security tools that spot exploitation behavior and control flow integrity checks can stop some exploits. Train users to recognize manipulation attempts.

Frequently Asked Questions

What is a drive-by compromise?

Drive-by Compromise is a way for attackers to gain access to a computer when a person visits a website during normal browsing. The site, or something it loads, delivers malicious code to the browser.

Do I have to click anything for a drive-by attack to work?

The person does not need to open an attachment or click a suspicious link in a message. Visiting a page is enough, for example a legitimate site that has been compromised or malicious ads served through ad providers.

What is a watering hole attack?

Attackers often pick a website used by a specific community, such as a government, an industry or a region. MITRE notes this kind of targeted campaign is often called a strategic web compromise or watering hole attack.

How do I defend against drive-by compromise?

Keep browsers and plugins updated, use modern browsers with security features on, and consider ad blockers and script blocking. Browser sandboxes and microsegmentation reduce the impact of an exploit, and user training helps.

Sources

  1. MITRE ATT&CK T1189: Drive-by CompromiseMITRE
  2. MITRE ATT&CK Tactic: Initial AccessMITRE
ShareLinkedInX
Brandefense logo

Stay Ahead of Digital Threats.

Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.

Open The Full Demo Form →