Detections · Harmful behavior
Mac malware that spreads: to iPhones, USB drives, projects and other machines
Most Mac malware stays on the Mac it infects. Some tries to go further: onto an iPhone plugged in by cable, a USB drive, a shared folder, a developer’s projects or other machines it can log into. That turns one infected Mac into a starting point for many more.
Updated November 25, 2026 · 50 detections in this category
In short
Copying a program to other devices or media: USB volumes, connected iPhones, network shares.
MacVigil has 50 detections in this category. It reads the file to find them and never runs it.
What propagation is
Propagation means copying a program, or a change that launches it, to another device or medium. The attacker gains new victims without having to trick each one: the infected Mac does the delivery.
On macOS the routes are specific. A Mac that is already paired with an iPhone or iPad can talk to it when it is connected, removable volumes appear under /Volumes/, developers share code through Git repositories and package registries, and administrators reach other machines over SSH.
How Mac malware does it
- It waits for an iPhone or iPad to connect, then uses Apple’s private MobileDevice functions to copy and install an app on it, relying on the existing pairing so nobody has to unlock the device.
- It watches for new disks and USB devices, then writes to volumes mounted under
/Volumes/or alters apps stored there so they launch its program. - It walks Xcode projects and adds a build phase script, so the payload runs on every machine that builds the project, a technique made known by XCSSET.
- It copies a file into a Git repository, commits it and pushes it to a remote repository, sometimes with credentials found on the Mac.
- It republishes packages with an added collector using a registry token found in a
.envor configuration file. - It copies itself to other machines with
scp, then usessshto run it there, using stolen SSH keys or a list of hosts. - It appends a launch line to scripts kept in a shared folder.
What MacVigil looks for
MacVigil reads the file and never runs it. Its strongest finding pairs the means to detect a connected iPhone, iPad or disk with the means to install an app on it or write to it. It traces a path under /Volumes/ to the call that writes there, and in scripts it follows a file copied to another machine with scp and then run there with ssh, or a file added, committed and pushed with git push.
Imports of the private functions that install or transfer apps to a connected device are reported on their own as high findings, while those that only open a connection or session are lower.
Broader combinations, such as project files, a build phase script and file writing, or SSH keys, a host list and remote copying, are reported as suggestions when the pieces are only separate mentions in the text. A disk or USB notification alone is informational: many programs need it.
When it is normal
Apple Configurator, device management services, backup tools and developer tools install apps on connected devices, copy files to external disks, push code to repositories and deploy over SSH. Build tools legitimately add scripts to projects. The question is whether the file does this for you, in the open, or for someone else in the background.
How to check your Mac and devices
- On your iPhone or iPad, look for apps you did not install, and check Settings > General > VPN & Device Management for profiles you do not recognize.
- A device you trusted once stays paired with that Mac; to forget every computer it trusts, open Settings > General > Transfer or Reset iPhone > Reset > Reset Location & Privacy on the device.
- In Xcode projects you share, review the Build Phases of each target for run scripts you did not write.
- Run
git logandgit statusin your repositories to spot commits or files you do not remember adding. - Check ~/.ssh for keys and an
authorized_keysfile you did not create, and remove keys you no longer use.
Related categories
- Source code and build tools: Names of the tools that build and publish software: repositories and their hooks, build projects, compilers, package registries, test runners. Code editors and build tools carry many.
- Remote control: What lets someone drive this Mac from a distance: a channel that receives commands, and the means to run them.
- Persistence: How a program arranges to start again on its own: launch agents and daemons, login items, scheduled jobs.
- Credential theft: What touches the places where passwords, keys and sessions are kept: keychains, browser profiles, wallets, SSH and cloud credentials.
Know what a file does before you open it
MacVigil reads any app, disk image, installer or script without running it, and shows the evidence behind every 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: all detection categories · what MacVigil detects · the blog