Every Mac ships with an antivirus, and it checks for updates every day.
The belief that Macs are immune was built on real experience and real engineering. It is also, in the narrowest technical sense, close to true. That is exactly what makes it dangerous, because the things that do get into Macs never needed to be viruses.
Your friend's laptop is crawling. Pop-ups, a toolbar nobody installed, a fan that never stops. You sympathise, and somewhere in the back of your mind a small, smug voice says: this is why I have a Mac. Macs don't get viruses.
Maybe you have said it out loud, to a parent choosing a new computer, or to yourself when a download asked you to click "Open" on something from a site you had never heard of. It is a comfortable belief, and it changes what you do. If the machine is immune, warnings are just noise, and caution is for other people.
The belief is not silly. It grew out of years of genuinely different experience. But it is answering a question from 2005, and the people trying to get into your Mac stopped asking that question a long time ago.
The intuition, stated fairly
Here is the belief in its strongest form:
Windows PCs have always been plagued by viruses and Macs have not. macOS is built on a sturdy Unix foundation, Apple controls the hardware and software together, and every Mac owner I know has gone years without a problem. Whatever the reason, Macs don't get viruses, so I don't need to worry the way Windows users do.
Most of that is true. For a long stretch, Mac owners really did see far less malicious software than Windows owners. The design of macOS really does make some attacks hard. And plenty of Mac owners really have gone a decade without an incident.
The problem is the jump from "I have not been hit" and "the system is well defended" to "nothing can get in." Those are different claims, and the gap between them is where the modern attacks live.
The crack
Here is a fact that does not fit the belief: every Mac already has an antivirus program built in. Apple calls it XProtect. According to Apple's own platform security guide, it uses signatures (descriptions of known malicious files) to check apps when they are first launched, when they change, and when the signatures are updated, and macOS checks for new signatures every day by default. When it finds something, it blocks it, moves it to the Trash, and alerts you.
Nobody builds and maintains a malware scanner, and pushes it daily, for a platform that has no malware. And Apple has said as much out loud. Testifying in a 2021 court case, Apple's head of software engineering, Craig Federighi, told the court: "today, we have a level of malware on the Mac that we don't find acceptable."
So something is getting in. To see what, and why the belief still feels true, you need two things: a clearer word than "virus," and a sense of how attackers decide what to attack.
"Virus" is the wrong word
In everyday speech, "virus" means any bad software. Security people use it more narrowly, and the distinction is the whole story here:
- A virus, strictly, is code that copies itself into other programs or files, so that running an infected program spreads the infection.
- A worm spreads itself from computer to computer across a network, without anyone running anything.
- A trojan is malicious software disguised as something you want, which you install and run yourself.
- An infostealer is a trojan with one job: copy your saved passwords, browser cookies, documents and cryptocurrency wallets, and send them to someone else.
The first two spread on their own. The last two need you. Keep that split in mind, because macOS is very good at stopping the first kind and structurally unable to fully stop the second.
Attackers follow the money
Writing working malware takes effort, and the people who do it professionally treat it as a business. A rough way to think about what they target is a product of three things: how many machines they can reach, what fraction of attempts succeed, and how much each success is worth.
For most of the history of personal computers, Windows was platform A. It ran on the overwhelming majority of desktops; Apple's share was small. By web-traffic measures such as StatCounter's, macOS today still runs on a minority of the world's desktop computers, somewhere around an eighth to a quarter depending on the month and how you count. Part of the Mac's clean record was never about the Mac. It was that attackers had a bigger, easier target.
That part erodes as the Mac becomes worth attacking. If Mac owners are numerous enough, or if a Mac owner's passwords and crypto wallets are valuable enough, the arithmetic tips. And it has. In 2012 a trojan called Flashback exploited a flaw in Java, which Apple had not yet patched on the Mac, and infected Macs simply by visiting compromised websites. The antivirus firm Dr.Web estimated about 600,000 infected Macs; other firms could not confirm the exact count, but nobody disputed that it was large. In 2023 a Mac infostealer called Atomic macOS Stealer was being rented to criminals on Telegram for $1,000 a month, and by May 2024 the security company Sophos reported the price had risen to about $3,000 a month. You do not charge three thousand dollars a month for a tool that does not work.
What macOS does stop
None of this means Apple's protections are weak. They are layered, and Apple's own security guide describes three layers: stop malware from being launched at all, block it from running if it gets onto the machine, and clean it up if it does run.
The first layer is Gatekeeper with notarization. Software sold outside the App Store is expected to be submitted to Apple, which scans it for known malware and, if it is clean, issues a notarization ticket. Gatekeeper checks for that ticket before an app opens, and Apple can revoke tickets for apps later found to be malicious. The second layer is XProtect's signatures. The third is a remediation engine that removes known infections.
Underneath all of that sit two features that make the strict, old-fashioned virus nearly obsolete on a modern Mac. Apps are code-signed, so if anything modifies an app, its signature no longer matches and the system can tell. And System Integrity Protection keeps the operating system's own files read-only, even to administrator accounts. A virus's whole method is rewriting other programs. On macOS, the programs most worth rewriting are the ones the system watches most closely.
The twist: in the strict sense, the belief is nearly right
Here is where the belief deserves real credit. If "virus" means what security people mean by it, code that spreads by infecting other programs, then classic viruses really are rare on a modern Mac. Code signing and System Integrity Protection make that style of attack hard to pull off and easy to notice. Someone who says "Macs don't get viruses" in that narrow sense is close to correct.
The trouble is that almost nobody on any platform worries about that narrow sense any more. The malware that matters today is mostly trojans, infostealers and adware, plus scams that use no malware at all: a fake "your Mac is infected" web page with a phone number to call, a phishing email asking you to "verify" your Apple account. None of those need to infect a single program. They need you to run one, or type something.
That is visible in what Apple itself changed. In macOS Sequoia, released in 2024, Apple removed the quick Control-click shortcut that let users override Gatekeeper for an app that was not signed or notarized. To run such software now, you have to go to System Settings, open Privacy & Security, and approve it there. You do not add friction to a door unless people are being talked through it.
macOS is very good at stopping software that breaks in. It cannot stop software you invite in, because from the computer's point of view, you are the owner, and the owner said yes.
So the belief is right about one thing and wrong about the thing that matters. It is right that the old, self-spreading virus is mostly a Windows-era memory on the Mac. It is wrong that this makes the Mac safe, because the threats moved to the one part of the system Apple cannot patch.
What to actually do
- Treat security prompts as real. If macOS says an app "cannot be opened" or "is damaged and should be moved to the Trash," believe it. Overriding that warning is the single most common way malware gets onto a Mac.
- Get apps from the App Store or the developer's own site. Not from search ads, not from links in messages, and never "cracked" versions of paid software, which are a favourite wrapper for infostealers.
- Be suspicious of unexpected password prompts. A dialog asking for your Mac password right after you opened a download, or one that appears out of nowhere, deserves a pause. Close it and ask yourself what just asked.
- Keep macOS and your apps updated. Flashback spread through a hole that already had a fix elsewhere. Leave automatic security updates on too, since that is how new XProtect signatures arrive in the background.
- Never call a phone number from a "your Mac is infected" web page. That page is the attack. Close the tab; if it will not close, quit the browser.
- Turn on two-factor authentication for important accounts. An infostealer that grabs a password does far less damage if the password alone is not enough.
The general lesson: a defence can be excellent and still guard the wrong door. When a well-defended system stops seeing the old kind of attack, attackers do not give up; they move to whatever the defence was not designed for. The useful question is never "is this system safe?" but "safe against what, and what is left?" For a modern Mac, what is left is mostly the person at the keyboard.
How we know this
- Apple Platform Security guide, "Protecting against malware in macOS": the three layers of defence; Gatekeeper and notarization; XProtect's signature-based detection, its daily update checks and its remediation engine.
- Apple Developer News, "Updates to runtime protection in macOS Sequoia" (2024): the removal of the Control-click Gatekeeper override, with approval now made in System Settings under Privacy & Security.
- Apple documentation on code signing and System Integrity Protection, at organization level.
- Craig Federighi's testimony in Epic Games v. Apple (May 2021), as reported by CNBC and other outlets: the single quoted sentence about the level of Mac malware.
- Dr.Web, as reported in 2012 by outlets including MacRumors: Flashback's use of a Java vulnerability and an estimate of about 600,000 infected Macs. Other security firms said they could not confirm the exact figure.
- Sophos, on Atomic macOS Stealer: sold on Telegram for $1,000 a month in 2023 and about $3,000 a month by May 2024, distributed through fake installers and malicious advertising.
- StatCounter desktop operating system share: macOS as a minority of desktops, which we describe only as roughly an eighth to a quarter because its monthly figures vary and split Apple across two rows.
- Standard computer security definitions of virus, worm, trojan and infostealer.
Which numbers are illustrative. The payoff arithmetic (machine counts, success rate, value per victim) is invented to show the shape of an attacker's decision. The diagram is a simplified schematic of Apple's described layers, not a complete model of macOS security. The Flashback infection count is a vendor estimate. This guide does not recommend or discourage any product, including third-party security software.