What is XprotectService on Mac? Apple's malware scan
Safe to quit? NoMade by AppleXprotectService
XprotectService is part of XProtect, the malware scanner built into macOS. Why it uses CPU, how to check it is genuine and up to date.
XprotectService is part of XProtect, the malware protection built into macOS. It is made by Apple, it is not a virus, and when it uses CPU it is scanning software, usually an app you have just downloaded or opened for the first time.
It is one of the processes you want running. Leave it alone and let it finish.
What XprotectService does
Apple describes XProtect in its security guide on protecting against malware as signature-based detection and removal of malware. The key points from that guide:
- When it scans. On macOS 10.15 and later, XProtect checks for known malicious content when an app is first launched, when an app has been changed on disk, and when XProtect's signatures are updated.
- What it does on a match. It blocks the software, notifies you and offers to move it to the Bin.
- Remediation. XProtect can also remove malware that is already on a Mac, using updated information from Apple, and keeps checking periodically.
- Updates. Apple pushes XProtect updates automatically, independently of macOS updates, and by default macOS checks for them daily.
XprotectService is the analysis service inside Apple's XprotectFramework; its signing identifier is com.apple.XprotectFramework.AnalysisService. The related XProtect app in /Library/Apple/System/Library/CoreServices/XProtect.app contains the remediation modules. On the Mac we checked, there were more than 20 of them, most named after a malware family, such as XProtectRemediatorAdload and XProtectRemediatorPirrit.
Is XprotectService a virus?
No. The real one runs as root from:
/System/Library/PrivateFrameworks/XprotectFramework.framework/Versions/A/XPCServices/XprotectService.xpc/Contents/MacOS/XprotectService
To check the running copy's path, use Terminal. This only reads:
ps -Ao pid,comm | grep -i xprotect
To check the signature:
codesign -dvv /System/Library/PrivateFrameworks/XprotectFramework.framework/Versions/A/XPCServices/XprotectService.xpc/Contents/MacOS/XprotectService 2>&1 | grep -E "Identifier|Authority"
A genuine copy shows:
Identifier=com.apple.XprotectFramework.AnalysisService
Authority=Software Signing
Authority=Apple Code Signing Certification Authority
Authority=Apple Root CA
That file sits on the signed system volume. To see which version of Apple's malware definitions you have, this reads a version number and changes nothing:
defaults read /Library/Apple/System/Library/CoreServices/XProtect.bundle/Contents/Info.plist CFBundleShortVersionString
On the Mac we checked it returned 5372, and System Information's Installations list showed it had been installed from Apple five days earlier. Your number will differ as Apple ships updates.
Why XprotectService uses high CPU
- A new download. Opening an app for the first time triggers a scan, and large apps take longer.
- Software that changed on disk, such as an app that has just updated itself.
- A signature update. When Apple ships new definitions, XProtect can check apps again.
- Remediation checks, which Apple says run periodically.
What is normal
Most of the time XprotectService is idle or not running at all. Short bursts after a download or an update are normal. It also works alongside syspolicyd, which runs Gatekeeper, so you will often see both busy when you open something new.
What to do if it stays busy
- Wait. Let a scan finish, especially after installing a large app.
- Restart. Apple menu > Restart if it seems stuck.
- Keep automatic updates on. In System Settings > General > Software Update, click the info button next to Automatic Updates and make sure security responses and system files are installed automatically. Apple's Software Update settings guide explains the options.
- Take any alert seriously. If XProtect tells you it found malware, let it move the item to the Bin, then follow the guide to checking a Mac for malware for anything that may have been left behind.
- Look at what keeps changing. An app that rewrites itself constantly can cause repeated scans. Update or remove it.
What not to do
- Do not delete, block or try to disable XProtect. It protects every app on your Mac, and macOS reinstalls it with updates anyway.
- Do not turn off System Integrity Protection. SIP is part of what stops malware tampering with XProtect.
- Do not install an "antivirus" that asks you to switch off Apple's protections. Good security software works alongside them.
How to see XprotectService in Activity Monitor
- Open Activity Monitor from Applications > Utilities.
- Choose View > All Processes.
- Type xprotect in the search field. You may see XprotectService and, at times, XProtect or one of its remediators.
- Check % CPU on the CPU tab and reads on the Disk tab.
- Double-click it for details, including its parent process.
For the certificate side of opening new software, see trustd.
How Headroom helps
Headroom's free security check includes Apple's malware definitions: it shows the XProtect version and how long ago it last updated, next to FileVault, the firewall, Gatekeeper, System Integrity Protection and automatic security updates. Headroom is not an antivirus and does not replace XProtect. It adds the places unwanted programs like to hide: startup items, shell files, configuration profiles and browser extensions. Turning off a startup item needs the $19 licence.
Download Headroom, read about the Mac security check, or see the price.
Questions
What is XprotectService?
It is part of XProtect, the anti-malware protection built into macOS. It runs from Apple's XprotectFramework and analyses software for known malware.
Is XprotectService a virus?
No, it is the opposite. It is Apple's own malware scanner, signed by Apple and stored in /System. Malware sometimes copies the names of security tools, so check the path and signature if in doubt.
Why is XprotectService using CPU?
Apple says XProtect scans apps when they first launch, when they change on disk and when its malware signatures are updated. A new app, a big download or a fresh signature update can keep it busy for a while.
How do I know XProtect is up to date?
Apple updates XProtect automatically, separately from macOS updates, and checks daily by default. Keep the security responses and system files option on in Software Update settings.