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
- Ransomware group Interlock Interlock is a ransomware group first observed in late September 2024. Active · Since 2024 · Not stated in the advisory (opportunistic and financially motivated, per the FBI)
- Ransomware group LockBit LockBit is a ransomware as a service operation first seen in January 2020. Disrupted · Since 2020 · Ransomware as a service
Seen in incidents
How to detect
-
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.
-
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.
-
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.
-
Detection strategy MITRE lists
DET0176, Drive-by Compromise: Behavior-based, Multi-platform Detection Strategy (T1189).
How to defend
-
Keep browsers and plugins updated
Updated software closes the holes exploit code relies on. Use modern browsers with their security features turned on.
-
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.
-
Contain the browser
Browser sandboxes, other virtualization and application microsegmentation reduce the impact of an exploit, though escapes can still exist.
-
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.
