TTemp90
T
← Back to BlogPrivacy

What Is a Drive-by Download?

Drive-by downloads explained: how malware can infect your device just from visiting a web page, why they are dangerous, and how to stay protected.

What Is a Drive-by Download?

What Is a Drive-by Download?

A drive-by download is malware that gets onto your device when you simply visit a web page — often without you clicking anything or knowingly downloading a file. Unlike threats that require you to download and run a malicious file, a drive-by download can occur automatically by exploiting vulnerabilities in your browser or software while you view a compromised or malicious page. This makes them especially dangerous, because the usual advice to "not download suspicious files" is not enough. This guide explains what drive-by downloads are, how they work, and how to protect yourself, in plain terms.

How Drive-by Downloads Work

Drive-by downloads exploit software vulnerabilities:

Exploiting vulnerabilities: When you visit a page hosting a drive-by download, malicious code on the page attempts to exploit vulnerabilities in your browser, plugins, or other software. If a vulnerability is present and unpatched, the exploit can install malware automatically.

Little or no interaction: Crucially, this can happen with little or no action from you — sometimes just viewing the page is enough if your software is vulnerable. You may not click anything or knowingly download a file.

Where they lurk: Drive-by downloads are found on compromised legitimate sites (as in watering hole attacks), malicious sites, and through malvertising (malicious ads), so you can encounter them even in trusted contexts.

The payload: They can install various malware — spyware, ransomware, cryptojacking, banking trojans, and more.

Why Drive-by Downloads Are Dangerous

Drive-by downloads are concerning for several reasons:

Minimal interaction required: Because they can occur from simply visiting a page, the common advice to avoid downloading suspicious files does not protect against them. This makes them stealthy.

Can appear in trusted contexts: They can be delivered via compromised legitimate sites and malvertising, so even careful browsing of trusted sites carries some risk if your software is vulnerable.

Exploit unpatched software: They rely on vulnerabilities, so outdated, unpatched software is especially at risk.

Silent infection: Victims often do not realize they have been infected, since there is no obvious download or action.

How to Protect Yourself from Drive-by Downloads

Because drive-by downloads exploit vulnerabilities, the defenses center on closing those vulnerabilities:

Keep everything updated: This is the most important defense. Since drive-by downloads exploit vulnerabilities in browsers, plugins, and software, keeping everything updated (patch management) closes the holes they rely on. Enable automatic updates.

Use a modern, updated browser: Modern browsers have strong protections against drive-by downloads and warn about malicious sites. Keep yours updated.

Remove or update plugins: Outdated browser plugins have historically been a major drive-by target. Remove unnecessary plugins and keep needed ones updated.

Use security software: Security software can detect and block some exploits and malware.

Use an ad blocker: Since malvertising delivers some drive-by downloads, an ad blocker reduces exposure.

Script-blocking extensions: Extensions that block scripts can prevent some malicious code from running, adding protection (with some browsing tradeoffs).

Least privilege: Using a non-admin account limits what a successful drive-by infection can do.

Be cautious with suspicious sites: While drive-by downloads can appear on trusted sites, suspicious and malicious sites carry higher risk. Avoid them where possible.

Defense in depth: No single measure is perfect, so layer these protections.

Frequently Asked Questions

What is a drive-by download in simple terms?

A drive-by download is malware that gets onto your device when you simply visit a web page — often without clicking anything or knowingly downloading a file. It works by exploiting vulnerabilities in your browser, plugins, or software while you view a compromised or malicious page, installing malware automatically if your software is vulnerable. This makes drive-by downloads especially dangerous, because the usual advice to avoid downloading suspicious files does not protect against them — sometimes just viewing the page is enough.

Can I really get malware just from visiting a website?

Yes, if your software is vulnerable. A drive-by download exploits unpatched vulnerabilities in your browser, plugins, or other software, and can install malware with little or no action from you — sometimes simply viewing the page is enough. These can be delivered via compromised legitimate sites and malvertising, so even trusted contexts carry some risk if your software is outdated. This is precisely why keeping your software updated is so important — it closes the vulnerabilities drive-by downloads rely on.

How do I protect myself from drive-by downloads?

The most important defense is keeping everything updated — your browser, plugins, and software — since drive-by downloads exploit vulnerabilities, and patching closes the holes they rely on (enable automatic updates). Also use a modern, updated browser with its protections, remove or update browser plugins (a historic drive-by target), use security software, use an ad blocker (since malvertising delivers some drive-by downloads), consider script-blocking extensions, and use a non-admin account to limit any infection. Layering these protections (defense in depth) provides strong protection against drive-by downloads.

Conclusion

A drive-by download is malware that gets onto your device when you simply visit a web page, often without clicking anything or knowingly downloading a file — by exploiting vulnerabilities in your browser, plugins, or software while you view a compromised or malicious page. This makes them especially dangerous, because they can occur with little or no interaction, can appear even on compromised legitimate sites and through malvertising, and silently infect victims who do not realize anything happened — meaning the common advice to avoid downloading suspicious files is not enough. Because drive-by downloads rely on vulnerabilities, the central defense is closing those vulnerabilities: keeping your browser, plugins, and software updated (the single most important protection), using a modern updated browser, removing or updating plugins, using security software and an ad blocker, considering script-blocking extensions, and using a non-admin account to limit any infection. By understanding that malware can arrive just from visiting a vulnerable page and prioritizing the updates and layered defenses that close the door on these exploits, you can protect yourself against one of the stealthiest ways malware spreads.

More from Temp90

Privacy resources made simple

FAQCommon temporary email questions. Trust CenterService status and transparency. Privacy PolicyHow Temp90 protects privacy. Terms of UseRules for using Temp90 safely.