Detections · Harmful behavior
Mac ransomware: your files encrypted in place and held for ransom
Ransomware encrypts your documents where they sit, then asks for payment in exchange for the key. Macs are a smaller target than Windows PCs, but ransomware for macOS exists, and the mechanism is the same: without a backup, the files are gone unless you pay, and paying guarantees nothing.
Updated November 25, 2026 · 42 detections in this category
In short
Encrypting files in place, the mechanism ransomware relies on.
MacVigil has 42 detections in this category. It reads the file to find them and never runs it.
What ransomware encryption is
Encryption itself is ordinary: FileVault, password managers and backup apps all use it. Ransomware turns it against you. It reads each file, writes back a scrambled version that only a secret key can undo, and keeps that key away from your Mac.
The attacker gains leverage. Your photos, contracts and projects are still on the disk, but unreadable, and a note explains how to pay for their return.
How Mac malware does it
- It walks your folders, Documents first, and opens each file for reading and writing.
- It passes the bytes through a cipher such as AES or a stream cipher like Salsa20 or ChaCha, then writes the result over the same file.
- It renames each file, often with an extension such as
.encryptedor.locked, or writes an encrypted copy and deletes the original. - It wraps the file key with the attacker’s RSA public key, so only the attacker can recover it, and removes anything that would have allowed recovery.
- It deletes local Time Machine snapshots so you cannot roll back.
- It writes a ransom note naming the encrypted files and the payment it demands.
- Some versions send the key or a victim identifier out over the network before deleting it locally.
What MacVigil looks for
MacVigil reads the file and never runs it. Its strongest findings follow the data itself: a file reached by walking a folder, read, passed through a cipher routine and written back over that same file, tied by the handle or mapping the engine followed. It reads this in native programs and in Go and Rust code, where it traces each value between calls, and it notes when a program also carries ransom wording or hides itself, with no accountable publisher behind it.
In scripts, it links a list of selected files to AES-encrypted copies and then to the planned deletion of the originals, or a key wrapped with RSA before the file that held it is deleted. A shell loop that hands each file to an encrypting tool and then removes the original is reported too.
Static reading does not prove that a loop runs or that the writes complete, and MacVigil says so. Ransom vocabulary next to cryptography is only a suggestion, and encryption alone, without walking folders and rewriting files, is not enough for a dangerous verdict.
When it is normal
Encrypted backup tools walk your folders, encrypt and write files too, and user-run encryption tools delete originals after making encrypted copies. Antivirus software, security research collections, games and simulators can contain ransom wording without any intent to use it. What matters is whether the files are rewritten in place and whether the key leaves your control.
How to protect your files
- Keep a Time Machine backup on a disk you disconnect after each backup, set up in System Settings > General > Time Machine.
- Keep a second copy of important files in iCloud Drive or another location, and check that you can restore one.
- Review System Settings > Privacy & Security > Files and Folders and remove access you did not mean to grant.
- If files suddenly change extension or refuse to open, disconnect from the network and unplug backup disks before doing anything else.
- Check who signed an unfamiliar app with
codesign -dvin Terminal before you open it.
Related categories
- File destruction: Deleting or overwriting files in bulk, beyond what an uninstaller or a cache cleanup needs.
- Data exfiltration: Data leaving this Mac for a remote server: files, archives or collected values handed to an upload.
- Analysis resistance: What makes a program harder to examine: packing, obfuscation, debugger and virtual-machine checks, erased traces.
- Persistence: How a program arranges to start again on its own: launch agents and daemons, login items, scheduled jobs.
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