What Is a Drive-by Download? A Plain-English Guide

What is a drive-by download

We are taught to be careful about what we click and download — but what if simply opening a web page could infect your device, no click required? That is the unsettling idea behind a drive-by download. Knowing how it works turns a scary mystery into something you can defend against. Our GetMyPassword team explains what a drive-by download is and how to stay safe.

What a drive-by download is
What a drive-by download is and how to stay safe.

What a drive-by download is

A drive-by download is malware that installs on your device automatically when you visit a compromised or malicious web page, without you knowingly downloading anything. Instead of tricking you into running a file, it exploits a weakness in your browser, a plug-in, or an out-of-date program to slip code onto your device in the background. You might just be reading an article or loading an ad, and the infection happens silently while the page loads.

How it sneaks in

Drive-by downloads rely on unpatched vulnerabilities. A legitimate site can be hacked to host the malicious code, or a poisoned ad — a tactic called malvertising — can deliver it on an otherwise trustworthy page. When your browser or a plug-in has a known hole that has not been updated, the hidden code uses it to run. The whole appeal for attackers is that it needs no mistake from you beyond visiting the wrong page at the wrong time.

How to protect yourself

  • Keep everything updated — your browser, operating system and apps, ideally automatically. This closes the holes drive-bys depend on.
  • Remove old plug-ins and unused extensions that add risk.
  • Use an ad and script blocker to cut off malvertising and shady scripts.
  • Run reputable security software and let it scan in the background.
  • Avoid sketchy sites and pop-ups, which are likelier to host malicious code.

A drive-by download needs an unlocked window, not your permission. Keeping your browser and software updated is what nails those windows shut.

If you suspect an infection

Watch for signs like sudden slowness, pop-ups, or unfamiliar programs. If you suspect a drive-by infection, run a full security scan, update your system, and remove anything unfamiliar. Then, because malware often aims to steal logins, change your important passwords from a device you trust — generate fresh, unique ones with our password generator and turn on two-factor authentication, so a silent infection cannot quietly become a string of stolen accounts.

Frequently asked questions

What is a drive-by download?

It is malware that installs automatically when you visit a compromised or malicious web page, without you knowingly downloading anything. It exploits an unpatched weakness in your browser, a plug-in or an out-of-date program to run in the background.

Can I get infected just by visiting a website?

Yes, if your software has an unpatched vulnerability. That is exactly how a drive-by download works. Keeping your browser, system and apps updated closes the holes it relies on and is the strongest defense.

How do I prevent drive-by downloads?

Keep your browser, operating system and apps updated automatically, remove old plug-ins and unused extensions, use an ad and script blocker, run reputable security software, and avoid sketchy sites and pop-ups.

Help your friends stay safe. Share this article!