Adversaries may gain access to a system through a user visiting a website over the normal course of browsing. With this technique, the user's web browser is typically targeted for exploitation, but adversaries may also use compromised websites for non-exploitation behavior such as acquiring Application Access Token.
Multiple ways of delivering exploit code to a browser exist, including:
Often the website used by an adversary is one visited by a specific community, such as government, a particular industry, or 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.
Typical drive-by compromise process:
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.
Adversaries may also use compromised websites to deliver a user to a malicious application designed to Steal Application Access Tokens, like OAuth tokens, to gain access to protected applications and information. These malicious applications have been delivered through popups on legitimate websites.
Andariel has used watering hole attacks, often with zero-day exploits, to gain initial access to victims within a specific IP range.
APT19 performed a watering hole attack on forbes.com in 2014 to compromise targets.
APT28 has compromised targets via strategic web compromise utilizing custom exploit kits.
APT32 has infected victims by tricking them into visiting compromised watering hole websites.
APT38 has conducted watering holes schemes to gain initial access to victims.
BRONZE BUTLER compromised three Japanese websites using a Flash exploit to perform watering hole attacks.
Bundlore has been spread through malicious advertisements on websites.
During C0010, UNC3890 actors likely established a watering hole that was hosted on a login page of a legitimate Israeli shipping company that was active until at least November 2021.
Dark Caracal leveraged a watering hole to serve up malicious code.
Darkhotel used embedded iframes on hotel login portals to redirect selected victims to download malware.
Dragonfly has compromised targets via strategic web compromise (SWC) utilizing a custom exploit kit.
Earth Lusca has performed watering hole attacks.
Elderwood has delivered zero-day exploits and malware to victims by injecting malicious code into specific public Web pages visited by targets within a particular sector.
Grandoreiro has used compromised websites and Google Ads to bait victims into downloading its installer.
KARAE was distributed through torrent file-sharing websites to South Korean victims, using a YouTube video downloader application as a lure.
Lazarus Group delivered RATANKBA and other malicious code to victims via a compromised legitimate website.
LoudMiner is typically bundled with pirated copies of Virtual Studio Technology (VST) for Windows and macOS.
Machete has distributed Machete through a fake blog website.
Magic Hound has conducted watering-hole attacks through media and magazine websites.
|C0016||Operation Dust Storm||
During Operation Dust Storm, the threat actors used a watering hole attack on a popular software reseller to exploit the then-zero-day Internet Explorer vulnerability CVE-2014-0322.
Patchwork has used watering holes to deliver files with exploits to initial victims.
PLATINUM has sometimes used drive-by attacks against vulnerable browser plugins.
POORAIM has been delivered through compromised sites acting as watering holes.
PROMETHIUM has used watering hole attacks to deliver malicious versions of legitimate installers.
REvil has infected victim machines through compromised websites and exploit kits.
RTM has distributed its malware via the RIG and SUNDOWN exploit kits, as well as online advertising network
Threat Group-3390 has extensively used strategic web compromises to target victims.
Transparent Tribe has used websites with malicious hyperlinks and iframes to infect targeted victims with Crimson, njRAT, and other malicious tools.
Windigo has distributed Windows malware via drive-by downloads.
Windshift has used compromised websites to register custom URL schemes on a remote system.
|M1048||Application Isolation and Sandboxing||
Browser sandboxes can be used to mitigate some of the impact of exploitation, but sandbox escapes may still exist.
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.
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.  Control flow integrity checking is another way to potentially identify and stop a software exploit from occurring.  Many of these protections depend on the architecture and target application binary for compatibility.
|M1021||Restrict Web-Based Content||
For malicious code served up through ads, adblockers can help prevent that code from executing in the first place.
Ensure all browsers and plugins kept updated can help prevent the exploit phase of this technique. Use modern browsers with security features turned on.
|ID||Data Source||Data Component||Detects|
|DS0015||Application Log||Application Log Content||
Firewalls and proxies can inspect URLs for potentially known-bad domains or parameters. They can also do reputation-based analytics on websites and their requested resources such as how old a domain is, who it's registered to, if it's on a known bad list, or how many other users have connected to it before.
Monitor for newly constructed files written to disk to gain access to a system through a user visiting a website over the normal course of browsing.
|DS0029||Network Traffic||Network Connection Creation||
Monitor for newly constructed network connections to untrusted hosts that are used to send or receive data.
|Network Traffic Content||
Monitor for other unusual network traffic that may indicate additional tools transferred to the system. Use network intrusion detection systems, sometimes with SSL/TLS inspection, to look for known malicious scripts (recon, heap spray, and browser identification scripts have been frequently reused), common script obfuscation, and exploit code.
Look for behaviors on the endpoint system that might indicate successful compromise, such as abnormal behaviors of browser processes. This could include suspicious files written to disk, evidence of Process Injection for attempts to hide execution, or evidence of Discovery.