sodcalculator

10 Tech How-To

Malware Keyloggers: What They Are & How to Detect Them on macOS

Guide 10-45493 · Updated · Step by step

Malware keyloggers are programs that record every keystroke you type, then send that data to an attacker — they can capture passwords, credit card numbers, and private messages without you noticing. On macOS, you can detect them by checking for suspicious processes, reviewing login items and extensions, and looking for apps that request Accessibility or Input Monitoring permissions. This article explains how keyloggers work, the signs of an infection, and step-by-step methods to find and remove them from your Mac.

What Is a Keylogger?

A keylogger (short for keystroke logger) is a type of spyware that records the keys pressed on a keyboard. Some keyloggers are hardware devices plugged between the keyboard and computer, but malware keyloggers are software that runs in the background. They can capture everything from usernames and passwords to search queries and private conversations.

On macOS, a keylogger typically works by taking advantage of the Accessibility or Input Monitoring APIs, which are designed for legitimate assistive tools (like screen readers or text expanders). Once granted permission, the malware can read all keyboard input, even in other apps and secure web forms.

How Do Keyloggers Get on a Mac?

Macs are generally more secure than Windows PCs due to built-in protections like Gatekeeper and sandboxing, but they are not immune. Common infection vectors include:

  • Downloading cracked software or pirated apps from untrusted sources
  • Opening malicious email attachments or links (phishing)
  • Installing fake Adobe Flash Player or other bogus updates
  • Plugging in infected USB drives
  • Exploiting vulnerabilities in outdated software

Once installed, the keylogger often hides its presence by using a innocuous name (like “Google Update” or “System Preferences”) and may not show up in the Dock or Activity Monitor under an obvious label.

Signs That Your Mac Might Have a Keylogger

Keyloggers are designed to be stealthy, but they often leave clues. Look for these warning signs:

  • Your Mac feels sluggish or the fan runs constantly even when idle
  • Unexpected pop-ups, toolbars, or browser redirects
  • Your online accounts get compromised or you notice unauthorized purchases
  • Apps you don’t remember installing appear in your Applications folder
  • System Settings shows new profiles or configuration profiles you didn’t create
  • Your keyboard input lags or characters appear after a delay

Keep in mind that these symptoms can also be caused by other malware or even legitimate software, so they are not definitive proof of a keylogger.

How to Detect a Keylogger on macOS

If you suspect a keylogger, follow these steps to investigate. Start with the least invasive checks and work up to more thorough scans.

1. Check Accessibility and Input Monitoring Permissions

Go to System Settings → Privacy & Security → Accessibility and Input Monitoring. Look for any app you don’t recognize or that you didn’t grant permission to. A keylogger often needs one of these permissions to capture keystrokes. If you see an unfamiliar entry, select it and click the minus button to remove it. Be careful: some legitimate apps (like window managers or keyboard utilities) need these permissions, so only remove what you’re sure about.

2. Review Login Items and Extensions

Go to System Settings → General → Login Items. This shows apps that launch automatically when you start your Mac. Malware often adds itself here to run at boot. Remove anything you don’t recognize. Also check System Settings → General → Extensions for suspicious browser extensions or system extensions. In Safari, go to Settings → Extensions and disable anything unfamiliar.

3. Inspect Activity Monitor for Suspicious Processes

Open Activity Monitor (in Applications/Utilities). Sort by CPU or memory usage and look for processes with odd names, high resource usage, or no obvious parent app. Right-click a process and choose “Inspect” to see its path. If the path is in /tmp, /var/tmp, or ~/Library/Containers, that’s a red flag. Legitimate system processes live in /System/Library or /usr/libexec.

4. Use the Built-in Malware Removal Tool

macOS includes a built-in tool called XProtect that automatically detects and removes known malware. To trigger a manual check, update your Mac (Apple menu → System Settings → General → Software Update). XProtect runs in the background and will remove known keyloggers. However, it only catches malware that Apple has already identified, so new or custom keyloggers may slip through.

5. Run a Third-Party Malware Scanner

For a deeper scan, use a reputable antivirus or anti-malware app designed for macOS. Options include Malwarebytes, Bitdefender, and Kaspersky. Download from the official website, install, and run a full system scan. These tools use heuristics and signature databases to detect known and emerging threats. Avoid free “Mac cleaner” apps that pop up in ads — many are scams themselves.

6. Check Network Activity

A keylogger must send your keystrokes to a remote server, so it generates network traffic. Use Activity Monitor’s “Network” tab to see which apps are sending data. If a suspicious process is sending data to an unknown IP address, that’s a strong indicator. You can also use the lsof -i command in Terminal to list open network connections and their associated processes.

What to Do If You Find a Keylogger

If you confirm a keylogger on your Mac, act quickly:

  1. Disconnect from the internet — this stops the data exfiltration.
  2. Quit the malicious process — in Activity Monitor, select it and click the X button. If it’s a system process, don’t force quit it without research.
  3. Remove the app — drag it to Trash, then empty the Trash. Also delete any associated files in ~/Library/LaunchAgents, /Library/LaunchAgents, and ~/Library/Application Support.
  4. Change your passwords — do this from a different device (like your phone) after the malware is removed. Change passwords for all critical accounts: email, banking, social media, and any site you use for payments.
  5. Enable two-factor authentication on all accounts that support it.
  6. Run a full malware scan again to ensure nothing remains.

If you can’t remove the keylogger yourself, consider backing up your important files and reinstalling macOS. This wipes the system and gives you a clean slate. After reinstalling, restore only your personal files, not applications or system settings.

How to Prevent Future Infections

Prevention is better than detection. Follow these habits to keep your Mac keylogger-free:

  • Only download software from the Mac App Store or the developer’s official website
  • Never click on suspicious links in emails, messages, or pop-ups
  • Keep macOS and all apps updated to patch security vulnerabilities
  • Use a standard (non-admin) user account for daily tasks
  • Install a reputable antivirus and keep it running
  • Disable automatic login and require a password after sleep

Remember that keyloggers are just one type of malware. Staying vigilant about what you install and click is your best defense.

Frequently Asked Questions

Can a keylogger be invisible to Activity Monitor?

Yes. Advanced keyloggers can hide their process by using rootkits or by masquerading as a legitimate system process. They might also inject code into another process, so they don’t appear as a separate entry. In such cases, a third-party scanner or a clean reinstall is the safest route.

Does macOS have built-in keylogger detection?

macOS includes XProtect, which automatically detects and removes known malware, including some keyloggers. It also has a feature called “Notarization” that checks apps for malicious code before they run. However, these are reactive — they only work for known threats. For new or custom keyloggers, you need additional tools or manual checks.

Can a keylogger capture passwords in Safari or Chrome?

Yes. If the keylogger has Accessibility or Input Monitoring permissions, it can read keystrokes even in password fields. Some keyloggers also take screenshots or capture clipboard content. That’s why it’s crucial to check those permission lists regularly.

Is it safe to type passwords on a Mac that might have a keylogger?

No. If you suspect a keylogger, do not type any sensitive information on that Mac. Use a different device to change passwords or access sensitive accounts until you’ve cleaned the system.

Can a hardware keylogger be detected on a Mac?

Hardware keyloggers are physical devices that plug between the keyboard and the computer. They are rare on laptops but possible on desktops. To detect one, inspect the USB ports and cables for any extra components. They don’t show up in software scans, so physical inspection is the only way.

Should I use a password manager if I’m worried about keyloggers?

Yes. Password managers like 1Password or Bitwarden store your passwords encrypted and auto-fill them, which means you don’t type them manually. This prevents keyloggers from capturing your actual passwords. However, the master password you type to unlock the manager could still be captured, so ensure your Mac is clean before using one.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →