Mac Rootkit Scanner Guide - How to Check a Mac for Rootkits and Malware
The classic rootkit, malicious code inside the operating system kernel that hides files and processes, has become uncommon on the Mac. That is not because Macs are immune. It is because Apple has spent several macOS releases locking the system down to the point where installing kernel-level code takes deliberate, visible steps from the user.
Mac malware has not gone away. It has moved to places that are easier to reach: apps, browser extensions, login items and launch agents. So checking a Mac for a rootkit is mostly a matter of confirming the protections are on, then looking at what is set to run automatically.
For how rootkits work in general, see what is a rootkit.
How macOS keeps rootkits out
System Integrity Protection (SIP)
SIP has been on by default since OS X 10.11 El Capitan. Apple’s security guide says it “restricts components to read-only in specific critical file system locations,” and the restriction applies even to processes running as the administrator. Modifying the system the way an old Unix rootkit would is blocked unless SIP is first switched off, which can only be done from the Recovery environment.
The signed system volume
Starting with macOS 11 Big Sur, the system lives on a signed system volume (SSV). Every file on it is hashed, and those hashes roll up into a single cryptographic “seal”. Apple’s documentation says the Mac “rejects any data, code and noncode, without a valid cryptographic signature from Apple.” A tampered system file simply fails verification.
Kernel extensions are deprecated
Kernel extensions (kexts) are the Mac equivalent of Windows drivers: code that runs inside the kernel. They are what a kernel-mode rootkit would use. Apple told developers in 2019 that macOS Catalina 10.15 would be the last version to fully support legacy kernel extensions, and has since moved most of their jobs to system extensions, which run outside the kernel.
Apple’s security guide recommends choosing software that does not extend the kernel at all. Where kexts are still allowed, the rules are strict:
- Since macOS 11, third-party kexts cannot be loaded on demand. They are merged into an auxiliary kernel collection at startup.
- With SIP on, each kext’s signature is checked before it is included.
- On Apple silicon Macs, enabling third-party kexts at all means starting up in recoveryOS and lowering the security policy to Reduced Security, with an administrator password.
A rootkit on a current Mac would have to get through these steps, which is why most attackers do not try.
Gatekeeper, notarization and XProtect
- Gatekeeper checks apps before they run and blocks ones that are not signed and notarized, or that Apple has revoked.
- Notarization is Apple scanning software distributed outside the App Store for known malware before it is approved.
- XProtect is macOS’s built-in antivirus. Apple describes it as signature-based detection and removal of malware, plus a behavioural engine for unknown malware. It checks apps when they first launch and when they change, and macOS checks for XProtect updates daily by default. When it finds malware, it blocks it and alerts you.
Step 1: confirm the protections are on
Open Terminal (in Applications > Utilities) and run:
csrutil status
You want System Integrity Protection status: enabled. A result of disabled, or enabled (Custom Configuration), means some protections are off. Developers and some hobbyists turn SIP off deliberately. If you did not, find out who did.
Keep macOS updated through System Settings > General > Software Update. XProtect and Gatekeeper updates arrive in the background, but security fixes for macOS itself need the regular updates.
Step 2: review login items and background items
Most Mac malware persists as a login item or a background item, not a rootkit.
- Open System Settings.
- Go to General > Login Items & Extensions.
- Review Open at Login and the Allow in the Background list.
Apple explains that “Allow in the Background” lets an app “perform tasks when the app isn’t open,” such as checking for updates. Switch off anything you do not recognise, then look up the developer name before deleting the app.
The same section lists extensions, including system extensions such as network filters and endpoint security tools. Unknown network or endpoint extensions are worth researching, because they can see your traffic.
Launch agents and daemons
Under the hood, many background items are property list files in these folders, which launchd reads at startup or login:
| Folder | What lives there |
|---|---|
~/Library/LaunchAgents |
Agents installed by or for your user account |
/Library/LaunchAgents |
Agents for every user, installed by an administrator |
/Library/LaunchDaemons |
System-wide background services, installed by an administrator |
Apple’s own items live under /System/Library, which is on the sealed volume. To look at the others in Finder, choose Go > Go to Folder and paste a path. Files with random-looking names, or names that imitate Apple’s (com.apple.something outside /System) are a common malware pattern.
Step 3: scan with Objective-See’s free tools
Objective-See is a non-profit Mac security project founded by researcher Patrick Wardle. Its tools are free and open source, and the ones below are all listed as current on its site.
- KnockKnock scans every location where software can install itself to run automatically: launch agents and daemons, login items, kernel and system extensions, browser extensions and more. For each item it shows whether it is correctly signed and, with a free VirusTotal API key, how many antivirus engines flag it. This is the closest thing to a Mac version of Windows’ Autoruns, and the most useful single check.
- KextViewr lists loaded kernel extensions with their signing status, path and VirusTotal results. On most modern Macs the list of third-party kexts should be short or empty.
- BlockBlock watches persistence locations continuously and alerts you when something new tries to install itself, so you can block it.
- TaskExplorer lists running processes with code-signing status and VirusTotal results.
- LuLu is a free firewall that alerts you when an app makes an outgoing connection, useful for spotting software calling home.
- ReiKey checks for keyboard event taps, which keyloggers use to capture typing.
When reviewing results, an item signed by Apple or a developer you recognise, with zero VirusTotal detections, is almost always fine. Unsigned items in persistence locations, and anything with several detections, deserve research.
Step 4: run a second-opinion scanner
Malwarebytes for Mac has a free version that scans for and removes malware already on the Mac. Real-time protection, scheduled scans and web protection are paid features. Run a scan after reviewing login items, because it catches adware and potentially unwanted programs that KnockKnock lists but does not judge.
Keyboard and input monitoring
Some Mac malware is a keylogger rather than a rootkit. macOS requires apps to be granted Input Monitoring permission to watch your keyboard while you use other apps. Check it in System Settings > Privacy & Security > Input Monitoring and switch off anything you do not recognise. The keyloggers guide covers this in more detail.
What a real Mac compromise looks like
If KnockKnock, Malwarebytes and the checks above are clean, SIP is enabled and macOS is current, a rootkit is very unlikely. Be more concerned if:
- SIP is disabled and nobody in your household or company turned it off
- an unknown kernel extension is loaded, or a security policy was lowered to Reduced Security
- you received an Apple threat notification, which Apple sends when it believes someone was individually targeted by mercenary spyware
For the rare targeted case, Apple offers Lockdown Mode on macOS Ventura and later, an optional setting that sharply limits features to reduce what spyware can attack.
If you find something
Remove ordinary adware and unwanted apps with Malwarebytes or by deleting the app and its launch agent. For anything that touched kernel extensions or system security settings, back up your documents, erase the Mac and reinstall macOS. Then restore files, not apps, from the backup and reinstall apps from their original sources. How to remove a rootkit covers the reinstall process, and the best rootkit scanners compares cross-platform options. For other platforms, see the Windows, Linux and Android guides.
Frequently asked questions
- Can a Mac get a rootkit?
- It is possible but rare on a current Mac. Since macOS Big Sur the system volume is cryptographically sealed, System Integrity Protection blocks changes to protected system locations, and third-party kernel extensions are deprecated and need explicit approval. Most Mac malware today runs as an ordinary app or background item rather than a rootkit.
- Does a Mac need an antivirus?
- macOS includes XProtect, which detects and removes known malware and updates automatically. Many users add a second scanner such as the free Malwarebytes for Mac for on-demand checks. Real-time protection from third-party tools is a paid feature in Malwarebytes.
- How do I check if System Integrity Protection is on?
- Open Terminal and run csrutil status. It should report "System Integrity Protection status enabled." If it says disabled or custom configuration and you did not change it yourself, investigate.
- Which free tools can find persistent malware on a Mac?
- Objective-See's free, open-source KnockKnock lists everything installed to run automatically, with signing status and optional VirusTotal results. BlockBlock alerts you when something new tries to install itself persistently.
- Are kernel extensions a sign of a rootkit?
- Not by themselves. Some older hardware drivers and security products still use them. But any kernel extension you cannot tie to software you installed deserves a close look, because loading one on a modern Mac requires deliberate approval.