Getting your computer offline is the best way to start dealing with the issue.
A persistent claim among Mac fans is that their computers are safer than Windows PCs, and that is true, broadly speaking. But a significant reason for that is that the Mac userbase is smaller. If you’re a hacker with criminal intent, it just makes sense to focus on the largest target, especially with Windows being preferred by many businesses and government organizations.
That doesn’t exempt Macs from security threats, and there have been plenty incidents over the years that reflect that. It’s equally as important for Mac owners to put up defenses, and to be ready to react if a hacker slips through the barricades.
While antivirus tools should be one of your weapons, that’s not all you need to think about. You should also be concerned about locking down access and accounts, and possibly starting from a clean slate if you’re not sure a threat has been wiped out.
How to cut off malware and scan your system
If you seriously suspect you’ve been hacked, you’ll want to temporarily shut off your Mac’s Wi-Fi and/or Ethernet connections. Malware is frequently about inflicting ongoing damage — it can create a tunnel for real-time surveillance, for instance, or expand a botnet for tasks like crypto mining. The only surefire way of blocking subsequent attacks is to shut off internet access.
As for finding, containing and removing infections, macOS already performs these tasks automatically by way of XProtect. If you’re dealing with a hack as we speak, there’s a strong chance that’s XProtect alerted you to it by way of Finder. The tool can also upload suspected malware samples to Apple, which you should probably do before you go offline.
If you have a third-party antivirus tool, this is the time to initiate the deepest possible scan. It’s likely to be redundant with XProtect, but there is a chance it might catch and remove something Apple missed.
Backing up and securing your accounts
Now that there’s (hopefully) no imminent danger, it’s wise to make sure critical files have copies elsewhere. You might already be set — but if not, the safest option is to copy files to an external SSD or USB thumb stick. One concern here is that if infected files make their way to the cloud, they could sync with other devices and make the problem worse. You may want to re-scan backups once the issue has been contained.
By this point, you should be using other devices to lock down accounts a hacker may have had access to, such as your Apple and Google logins. Usually, password resets will suffice. But this might also be a good time to enable two-factor authentication (2FA) on accounts that don’t have it, and lock your bank cards until the coast is clear or you absolutely need the money. Yes, there is a chance that you might need to talk to your bank about replacement cards, as well as fraud if there are any suspicious transactions.
Apple also provides a feature called Lockdown Mode, available via Apple menu > System Settings > Privacy & Security > Lockdown Mode. This is usually meant to prevent attacks in risky situations rather than cope with the aftermath of one, for instance by severely restricting Messages, FaceTime and other services. But this could offer some peace of mind, especially if there’s no choice but to continue using a Mac when you’re not sure the danger is gone.
When to consider a factory reset
Performing a factory reset on a hacked Mac isn’t strictly necessary. If XProtect or another antivirus tool has already flagged, blocked and wiped malware, and there’s been no suspicious activity on your accounts after a round of password resets, you can probably go back to your daily routine. As Ellen Ripley would say, though, a factory reset is the only way to be sure.
That’s because a reset wipes your Mac clean of everything except macOS itself — that means all your apps, files and settings. You’ll have to set up your machine again as if it were new. That’s going to be a royal pain, and you’ll lose some files permanently if you forgot to make backups of them. But since it’s unlikely that any malware will survive the process, that may be a worthwhile sacrifice.
If you’re sure you’re want to proceed, head to Apple menu > System Settings > General, then click on Transfer or Reset in the main panel. When you hit Erase All Content and Settings, you’ll actually be asked for multiple logins first, such as administrator credentials and/or your Apple Account. When you see a second Erase All Content & Settings button, that’s your last chance to back out.



