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#
- 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.
- You visit. You follow a search result, a link in an email or a bookmark you've used for years.
- The page probes your device. Code checks your browser, its plugins and your operating system for flaws it knows how to exploit.
- 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
Related terms
- MalwareMalware is any software or file built to harm a device or steal its data, from viruses and trojans to ransomware and spyware. Most of it still arrives through email attachments and links.
- Zero-day vulnerabilityA zero-day vulnerability is a flaw attackers can exploit before a fix exists. Here's how the zero-day window works and what limits the damage when there's no patch to install.
- Endpoint securityEndpoint security protects the laptops, phones and desktops people use to reach data. Here's what it covers and why it matters more when data is end-to-end encrypted.
- SpywareSpyware is software installed secretly to watch what you do on a device. Here's how it gets in, why encryption can't stop it, and what keeps it out.
- KeyloggerA keylogger records what you type, passwords included, and passes it to an attacker. Here's how keyloggers work, what limits the damage and what to do if you suspect one.
- PhishingPhishing is impersonation used to trick people into handing over passwords, approving payments or opening malware. Here's how it works and what actually stops it.
- Attack surfaceYour attack surface is every point where an attacker could get in, cause harm or take data out, from accounts and apps to shared links, people and the providers that hold your data.
Where Foxcolab uses it

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.