Foxcolab

Glossary

Drive-by download

Definition

Drive-by download: Malware that installs itself when someone visits a compromised or malicious web page, without knowingly downloading anything, by exploiting unpatched flaws in the browser, its plugins or the operating system.

Also known asdrive-by attackdrive-by installweb-based malware

In short

A drive-by download is malware that installs itself when you visit a compromised or malicious web page, without you knowingly downloading anything. Code on the page probes your browser and system for known flaws and, if it finds one, installs attacker tools. Keeping your browser and operating system updated closes the flaws these pages depend on.

Key takeaways

  • Visiting the page can be enough; there's no file to click.
  • The attack depends on unpatched flaws in the browser, its plugins or the operating system.
  • Legitimate sites get hacked, so "I only visit trusted sites" isn't a defense.
  • Automatic updates and everyday accounts without admin rights block most attempts.

Last reviewed 3 December 2026 by Foxcolab Team

A drive-by download is malware that installs itself when you visit a compromised or malicious web page, without you knowingly downloading anything. NIST describes it as web-based malware where "a user's web browsing is redirected to an infected website, often with little or no use of social engineering techniques," and the site "then attempts to exploit vulnerabilities on the user's host and ultimately to install rootkits or other attacker tools" (NIST SP 800-83 Rev. 1).

How it works#

  1. The trap is set. An attacker plants code on a website, either a legitimate site they've hacked, a malicious ad that runs on many sites, or a page of their own.
  2. You visit. You follow a search result, a link in an email or a bookmark you've used for years.
  3. The page probes your device. Code checks your browser, its plugins and your operating system for flaws it knows how to exploit.
  4. The payload installs. If it finds one that hasn't been patched, it installs malware, often a keylogger or remote-access tool, with nothing on screen to show it.

When attackers hack the sites a specific group visits, it's called a watering hole attack.

A worked example#

A supplier's website at example.com was hacked last week, and a script on its homepage checks each visitor's browser version. An office manager whose browser has been asking to restart for an update for three weeks opens the site to check delivery times. The page exploits the flaw that update fixed and installs spyware. Nothing visible happens.

Common mistakes#

  • "I didn't download anything." With a drive-by, visiting was the download.
  • "I only use trusted sites." Trusted sites get hacked, and ads come from networks the site doesn't control.
  • Putting off updates. The exploit needs an unpatched flaw. The Canadian Centre for Cyber Security recommends turning on "automatic updates and patches for security tools and operating systems on devices" (Cyber Centre).
  • Browsing as an administrator. An everyday account without admin rights limits what a payload can install.

In Foxcolab#

Many drive-by pages arrive as a link in an email. On the web, Foxcolab Mail shows each message in a sandboxed frame where scripts can't run, so the email itself can't probe your browser. Remote images stay hidden until you choose Show images, and a link whose text doesn't match where it really goes asks you to Check this link before you open it. Keep your browser updated, then create a free account.

Keep exploring

All terms

Foxcolab

Private work tools, without the ads.

Mail, files, documents, spreadsheets and meetings in one account. Files, documents and spreadsheets are end-to-end encrypted.

Jump to