scanrootkit

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:

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

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.

  1. Open System Settings.
  2. Go to General > Login Items & Extensions.
  3. 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.

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:

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.