Blog · Guide · Already on your Mac
Where Mac malware hides: the 64 places to check
Mac malware has few ways to stay. It asks macOS to start it again, it gets loaded by a program you use, it changes a setting that works for it, or it just sits on the disk. Each leaves something in a known place. Here are the 64 places MacVigil’s Scan My Mac reads, grouped as it shows them, with what is normal in each and what is not.
Updated November 15, 2026 · 13 min read
The short answer
- Start with what starts: Login Items & Extensions in System Settings, then
~/Library/LaunchAgents,/Library/LaunchAgentsand/Library/LaunchDaemons. - Then what other programs load: your shell startup files, your Terminal history, browser and editor extensions, plug-ins.
- Then the settings that work for an intruder: privacy permissions, trusted certificates, configuration profiles, proxies, sudo rules, AI agent hooks.
- Finally the disk: Downloads, Applications, hidden folders and programs sitting in your Library.
Normal software uses most of these places. A place tells you where to look; what a program does is in its code.
Running now (2 places)
- Programs running right now. Each process’s file, its app, and the script an interpreter was started with. Normal: apps you opened and their helpers. Look twice at a program running from a hidden folder or
/tmp. A program started by something none of the other 63 places shows is only found here. Apple’s programs are left out; the command lines of root and other accounts can’t be read. - Programs reading the keyboard. Event taps that receive keys: the program behind each, and whether it only listens or can change what you type. Normal: a launcher or text expander you installed. A keylogger needs one too; a tap held by a program no developer certificate vouches for is flagged. When macOS returns no tap at all, MacVigil can’t tell from its sandbox whether none is open, and says so.
On startup (12 places)
After a restart, a program only runs again if something asks macOS to start it. These are the places that ask. The step-by-step check shows how to read the first ones by hand.
- Login and background items registered with macOS. The list System Settings shows under General › Login Items & Extensions, kept in a database in
/private/var/db/com.apple.backgroundtaskmanagementthat only an app with Full Disk Access can read. Suspicious: a name you don’t know, or an item with no app behind it. - Startup agents of your account.
~/Library/LaunchAgents. Each.plistaskslaunchdto start a program at login or on a schedule. Normal: a file named after a vendor, starting a program inside that vendor’s app. The classic malicious one claims to be Apple’s, starts a program from a hidden folder in your home, and asks to be restarted whenever it stops. - Startup agents shared by all accounts and System services.
/Library/LaunchAgentsstarts its programs in every account’s session;/Library/LaunchDaemonsruns its programs for the whole system, as root unless told otherwise, before anyone logs in. Writing to either takes an administrator password, which is why malware asks for yours. - Startup files of the other accounts. Their startup agents and shell startup files: only what their owners leave open to everyone is read, and the rest is noted as not read.
- Startup agents and login items inside applications. Agents, services and login items that apps in
/Applicationscarry inContents/Library, started once the app registers them. Normal for many apps; worth a look in a cracked copy or an app you don’t remember installing. - Privileged helper tools.
/Library/PrivilegedHelperTools: programs an app installed to run as root on its behalf, after asking for an administrator password once. Normal: the helper of a VPN or backup tool you use. A helper whose app is gone deserves attention. - Legacy startup items, Login and logout hooks, Legacy startup hooks. The old ways in:
/Library/StartupItems; theLoginHookandLogoutHookof the login window’s preferences, which run a script as root at every login or logout;/etc/rc.local,/etc/launchd.conf, emond rules and~/.MacOSX/environment.plist. Current macOS ignores most of them; their presence alone is unusual. - Periodic maintenance scripts and Cron and at jobs.
/etc/periodicand/usr/local/etc/periodichold scripts run as root every day, week or month./usr/lib/cron/tabs,/var/at/tabs,/etc/crontaband/var/at/jobshold commands scheduled with cron or at, including@rebootlines, with no launchd job of their own. A line that downloads or decodes something is a red flag.
Loaded by other programs (13 places)
These run when you use something else: a shell, a browser, an editor, an Office app. Scan My Mac files your Terminal history here too, beside the shell startup files it so often explains.
- SSH login scripts.
~/.ssh/rcand/etc/ssh/sshrc, run each time someone logs in to this Mac remotely. Most Macs have neither. - Terminal history and Terminal window histories.
~/.zsh_history,~/.bash_history, fish’s history, and~/.zsh_sessions, where Terminal keeps each window’s commands until it closes. A command pasted from a page that asked you to “verify you are human” is often the only trace such an infection leaves: look forcurlpiped into a shell,base64orosascript, and read pasted a command into Terminal. - Shell startup files.
~/.zshenv,~/.zprofile,~/.zshrc,~/.zlogin,~/.zlogout,~/.bash_profile,~/.bashrc,~/.profileand their relatives. A line added here runs with every new shell. Normal: lines from you, Homebrew or a version manager. Suspicious: a line that downloads, decodes or starts a hidden program in the background. - Shell startup files shared by all accounts and Startup files of the root account.
/etc/zshenv,/etc/zshrc,/etc/profile,/etc/bashrc,/etc/pathsand/etc/paths.dapply to every account./var/rootholds what runs whenever a shell or session opens as root. - Programs your browsers may start. The
NativeMessagingHostsfolders of Chrome, Brave, Edge, Chromium, Vivaldi, Arc and Firefox, in~/Library/Application Supportand/Library. A browser extension can start the program each file names. Normal: the companion of a password manager you use. Suspicious: a program in a hidden folder. - Browser extensions. Extensions installed in Chrome, Brave, Edge, Chromium, Vivaldi, Arc and Firefox: their manifest, which lists what they may do, and the scripts it names. Adware and stealers both like an extension that can read every site you visit.
- Editor extensions. Extensions installed in VS Code, Cursor, Windsurf, VSCodium and Antigravity IDE, under folders such as
~/.vscode/extensions. A marketplace listing is not a signature: nothing there is signed. - Plug-ins that macOS and its apps load. Spotlight and Quick Look plug-ins, screen savers, preference panes, kernel and system extensions, input methods, scripting additions, audio and camera drivers and more, in folders such as
/Library/QuickLook,/Library/Input Methodsand their twins in~/Library, loaded without asking. Suspicious: a plug-in from no developer you know. - Scripts, services and shortcuts that run on their own.
~/Library/Scripts, Application Scripts, Automator actions, PDF Services, folder actions and Shortcuts; Hammerspoon’sinit.lua; xbar, BitBar and SwiftBar plug-ins; sleepwatcher’s~/.wakeupand~/.sleep; Mail rules that run an AppleScript; apps macOS reopens at login from outside/Applications; XQuartz’sxinitrc.d. Each runs when its trigger fires. - Office and Adobe startup scripts. The Startup folders of Word, Excel and PowerPoint, Word’s Normal template, Acrobat’s JavaScripts folders and Adobe startup scripts: code these apps run every time they open.
- Patched Electron apps. Files a stealer rewrites inside an installed Electron app so its code runs under that app’s name each time it opens. Discord’s desktop core, in
~/Library/Application Support/discord, is the best-known target: itsindex.jsis normally a single line.
In your settings (13 places)
A setting can do an intruder’s work without a program of its own.
- launchd overrides and environment. In
/private/var/db/com.apple.xpc.launchd:disabled.plist, which turns services on or off, andconfig/user.plistandsystem.plist, the environment given to every program launchd starts, where a library can be injected into all of them. - Terminal and iTerm2 settings. Profiles that run a command when a window opens, and iTerm2’s AutoLaunch scripts.
- SSH configuration.
~/.ssh/config,/etc/ssh/ssh_configandsshd_config. AProxyCommand, aLocalCommand, aForceCommandor an authorized key with acommand=prefix runs a program at every connection. - Authentication modules and sudo.
/etc/pam.d,/etc/sudoers.dand/etc/sudo.conf. A sudo rule can give root without a password; a module outside/usr/lib/pamcan see the passwords it checks. - User accounts. An account hidden from the login window, or a system-range account with a home folder and a shell, is how some adware keeps a foothold.
- Network settings.
/etc/hosts,/etc/resolver, proxies and PAC files, pf firewall anchors, PPP scripts, snmpd and postfix: settings that redirect traffic or run a command when a connection comes up. - Certificates this Mac was told to trust. Certificates trusted as a root, by an administrator or in your account. One added by adware lets it read your encrypted web traffic.
- Configuration profiles and managed settings. Profiles and managed preferences in
/Library/Managed Preferences: what a company, or adware posing as one, forces on browsers and the system, such as an extension installed without asking. A personal Mac usually has none. - Protection updates from Apple.
/Library/Preferences/com.apple.SoftwareUpdate.plist: whether this Mac still checks for updates and installs the security data Apple publishes (XProtect). A switch turned off is flagged with what it stops. The XProtect version is shown as read; whether it is the latest can’t be known offline. - Privacy permissions granted to apps. What the privacy database (TCC) has allowed: Accessibility, Screen Recording, Full Disk Access, Microphone, Camera, Input Monitoring. An app you don’t know in any of them, or one whose job has nothing to do with that access, is worth a look.
- Default apps for links and files. The apps macOS opens for
http,https,mailtoand common file types. A handler outside/Applications, or unsigned, is unusual. - Developer tool settings. Git, Docker, kubectl, AWS, direnv, editors and debuggers: settings such as
~/.gitconfigor~/.kube/configthat name a program to run at every command, every prompt or every folder change. - AI assistants and MCP servers. Claude, Cursor, Codex, Gemini and other assistants: hooks that run a command, MCP servers, which are programs started without a click, and what they take as instructions: rules files, commands, agents, skills and plug-ins. Suspicious: a hook or server that starts something from a hidden folder.
Why settings count: a proxy, a trusted root certificate or a sudo rule can outlive the program that set it. Removing the app doesn’t undo them.
In your files (24 places)
A stealer that runs once from a disk image installs nothing. What remains is on the disk: the image in Downloads, the fake app in Applications, a program in your Library, and the keys it was after.
The Dock
- Apps pinned in the Dock. Pinned apps that live outside
/Applications. Nothing starts them, which is why the Dock sits here, but a fake app pinned there gets opened without a second look.
What a thief would take
These four are not where malware hides but what it comes for. Scan My Mac reads them itself and never hands these files to the engine; a key, token or password it finds in a text is shown in the row’s detail panel, so you see what a stealer would get.
- SSH and private keys.
~/.ssh, then the Desktop, Documents, Downloads, cloud folders, the Shared folder and the top of your home: files whose header shows a private key, with or without a passphrase. A key outside~/.ssh, readable by other accounts or synced to a cloud is what a stealer copies first. - API keys and tokens in clear text and Passwords in clear text. Shell startup files,
.envfiles, Terminal histories, launchd environment variables, MCP settings and the text files of your Desktop, Documents, Downloads and cloud folders: tokens recognized by their shape or by the name they’re given,PASSWORD=lines, passwords inside web addresses or typed in a command, and files whose name says they hold passwords. - Credential files. The files programs keep their sign-ins in:
~/.netrc,~/.aws/credentials,~/.git-credentials, Kubernetes, Docker and npm tokens and others. Listed by presence, with who else can read them; not read.
What waits on the disk
- Hidden folders in your Application Support, Hidden folders in the system’s Application Support, Hidden folders in your home. Folders whose name starts with a dot in
~/Library/Application Support, in/Library/Application Support, and at the top of your home (other than those of shells, SSH and package managers). Finder doesn’t show them. - Programs in your Library and Programs in the system’s Library. Programs sitting directly in
~/Libraryand/Libraryfolders such as Application Support and Caches, or in folders macOS doesn’t create. Some adware keeps its program here under a name of its own. - The home folder of root and Temporary folders of root and system services.
/var/root, and the temporary folders of root and of macOS’s services under/var/foldersand in/var/install. Nothing you install belongs in the first; a program that ran as administrator can leave something in either. Only root can read them. - The Shared folder.
/Users/Shared: every account can write here without a password, so hidden items and programs here are worth a look. - Programs in temporary folders.
/tmp,/var/tmpand your session’s own temporary folders under/var/folders. A program a script downloaded and started often lands here first. - Trash.
~/.Trashand the Trash of mounted volumes. A program runs from the Trash as well as from anywhere else. - Downloads, Desktop, Documents. Where downloads arrive and installers, archives and scripts get left. In Documents, only what can run is read.
- Messages and WhatsApp attachments.
~/Library/Messages/Attachmentsand WhatsApp’s media folders: what arrived by message, read only when it can run. - iCloud Drive and cloud folders. iCloud Drive in
~/Library/Mobile Documentsand the Dropbox, Google Drive and OneDrive folders in~/Library/CloudStorage. Only what is already on this disk is read; nothing is downloaded. - Applications.
/Applicationsand~/Applications, each app read whole. A cracked or fake app that never registered a startup item is only found here. - External volumes.
/Volumes: disks and disk images mounted right now, other than the startup disk. - Virtual machines and Wine bottles. The disks of Parallels, VMware, VirtualBox, UTM, Lima and Docker machines, and Wine bottles. What they hold is beyond MacVigil’s reach; they are listed so you know.
- Home folder. The rest of your home, apart from
~/Libraryand the places above. Developer folders such asnode_modulesand.gitare skipped.
What Scan My Mac does with the 64 places
Once MacVigil is available, Scan My Mac reads all 64 places in one pass, with nothing to tick. The files it lists go to the same engine that reads a file you drop on MacVigil’s window. For a startup entry, it also reads the program the entry launches, so you see what that program would do instead of a bare file name. It runs nothing, and nothing leaves your Mac.
Results are listed by place, with the full report beside each item, and what could not be read is said apart, with the reason. Scan My Mac needs Full Disk Access, because macOS keeps several of these places closed to other apps; places only root can read go through MacVigil’s reader, once you allow it to run in the background. Mail and package managers (Homebrew, npm, pip, cargo) are left out on purpose. It only reads: what to remove stays your decision.
If you find something
- Don’t delete it right away. Write down the full path of the file and of the program it starts. Deleting a
.plistleaves its program in place and erases the trail to it. - Check who it belongs to. Many odd-looking entries come from software you use.
- If you think something is active right now, quit the app it belongs to and disconnect from Wi-Fi.
- If you typed your Mac password into something you now doubt, or pasted a command from a website, change your important passwords from another device, starting with your email. If a key, token or password was lying in clear text, change it too.
- Once you know what it is, remove the app with its developer’s uninstaller, or move the startup file out of its folder so it doesn’t start after the next restart. Undo any setting it changed: a proxy, a profile, a trusted certificate, a line in a startup file.
See everything that starts on your Mac, and what it does
MacVigil reads any app, disk image, installer or script without running it, and Scan My Mac reads the places where malware stays, with the evidence for each finding. Nothing leaves your Mac.
Free for 7 days, then $29.95 a year for 2 Macs, a launch price: the regular price will be $59 a year. Requires macOS 15 Sequoia or later on a Mac with Apple silicon.
More: check your Mac for malware, step by step · pasted a command into Terminal? · fake password prompts · what MacVigil detects · all posts and guides