MITRE ATT&CK / Techniques / T1189

Drive-by Compromise

ID
T1189
Tactics
TA0001 Initial Access
Platforms
Identity Provider, Linux, macOS, Windows
Data sources
Logon Session Creation, Process Creation, Network Connection Creation, Application Log Content, Process Modification, File Creation, Network Traffic Content, User Account Authentication, User Account Metadata
Source
attack.mitre.org
MITRE last modified
25 Oct 2025

Adversaries may gain access to a system through a user visiting a website over the normal course of browsing. Multiple ways of delivering exploit code to a browser exist (i.e., Drive-by Target), including:

  • A legitimate website is compromised, allowing adversaries to inject malicious code
  • Script files served to a legitimate website from a publicly writeable cloud storage bucket are modified by an adversary
  • Malicious ads are paid for and served through legitimate ad providers (i.e., Malvertising)
  • Built-in web application interfaces that allow user-controllable content are leveraged for the insertion of malicious scripts or iFrames (e.g., cross-site scripting)

Browser push notifications may also be abused by adversaries and leveraged for malicious code injection via User Execution. By clicking "allow" on browser push notifications, users may be granting a website permission to run JavaScript code on their browser.[9][10][11]

Often the website used by an adversary is one visited by a specific community, such as government, a particular industry, or a particular region, where the goal is to compromise a specific user or set of users based on a shared interest. This kind of targeted campaign is often referred to a strategic web compromise or watering hole attack. There are several known examples of this occurring.[12]

Typical drive-by compromise process:

1. A user visits a website that is used to host the adversary controlled content.
2. Scripts automatically execute, typically searching versions of the browser and plugins for a potentially vulnerable version. The user may be required to assist in this process by enabling scripting, notifications, or active website components and ignoring warning dialog boxes.
3. Upon finding a vulnerable version, exploit code is delivered to the browser.
4. If exploitation is successful, the adversary will gain code execution on the user's system unless other protections are in place. In some cases, a second visit to the website after the initial scan is required before exploit code is delivered.

Unlike Exploit Public-Facing Application, the focus of this technique is to exploit software on a client endpoint upon visiting a website. This will commonly give an adversary access to systems on the internal network instead of external systems that may be in a DMZ.

Detection

Mitigations (5)

M1017 User Training

Train users to be aware of access or manipulation attempts by an adversary to reduce the risk of successful spearphishing, social engineering, and other techniques that involve user interaction.

M1021 Restrict Web-Based Content

Adblockers can help prevent malicious code served through ads from executing in the first place. Script blocking extensions can also help to prevent the execution of JavaScript.

Consider disabling browser push notifications from certain applications and browsers.[1][2][3]

M1048 Application Isolation and Sandboxing

Browser sandboxes can be used to mitigate some of the impact of exploitation, but sandbox escapes may still exist.[4][5]

Other types of virtualization and application microsegmentation may also mitigate the impact of client-side exploitation. The risks of additional exploits and weaknesses in implementation may still exist for these types of systems.[5]

M1050 Exploit Protection

Security applications that look for behavior used during exploitation such as Windows Defender Exploit Guard (WDEG) and the Enhanced Mitigation Experience Toolkit (EMET) can be used to mitigate some exploitation behavior.[6] Control flow integrity checking is another way to potentially identify and stop a software exploit from occurring.[7] Many of these protections depend on the architecture and target application binary for compatibility.

M1051 Update Software

Ensuring that all browsers and plugins are kept updated can help prevent the exploit phase of this technique. Use modern browsers with security features turned on.[8]

Groups (31)

Software (11)

References

  1. mac security virus popup
  2. push notifications -infosecinstitute
  3. site notifications - krebsonsecurity
  4. Windows Blogs Microsoft Edge Sandbox
  5. Ars Technica Pwn2Own 2017 VM Escape
  6. TechNet Moving Beyond EMET
  7. Wikipedia Control Flow Integrity
  8. Browser-updates
  9. Push notifications - viruspositive
  10. push notification -mcafee
  11. push notifications - malwarebytes
  12. Shadowserver Strategic Web Compromise