← See all resources
Drive-By Attack
Web Attacks • Attack Types

Drive-By Attack

How compromised websites automatically infect users upon visiting them.

Tags

Drive-ByBrowser ExploitWeb Security
Download infographic

File: SecPro-ataque-drive-by.png

What is a drive-by attack?

It is an infection that happens just by visiting a page, without the victim downloading or opening anything. The site — compromised, or legitimate but serving malicious advertising — loads code exploiting a vulnerability in the browser, a plugin or the JavaScript engine, and runs malware through that flaw. For the user there is no moment that looks like accepting anything.

How it arrives: visiting shady sites is not required

The most uncomfortable vector is malvertising: legitimate ad networks serving prepared ads on perfectly normal outlets. Also used are compromised popular sites, injections into third-party libraries that thousands of pages load, and chained redirects from search results. The belief that avoiding suspicious sites is enough is exactly what makes this technique effective.

How to protect yourself?

Keeping browser and system patched closes the most, because the attack depends on a known vulnerability; modern browsers also isolate each tab in its own process. Add script and ad blockers — which remove the malvertising channel — disable or isolate unnecessary plugins, and in organizations, EDR able to see anomalous execution spawned from the browser process.

More from Web Attacks • Attack Types

Explore more infographics

View full catalog

Need help with your cybersecurity? 💬